Merge pull request #808 from dylanaraps/kde
theme: Show KDE and GTK output if both are available.
This commit is contained in:
commit
af80438a6f
1 changed files with 9 additions and 8 deletions
17
neofetch
17
neofetch
|
@ -835,6 +835,8 @@ get_wm_theme() {
|
|||
elif [[ -f "$kdebugrc" ]]; then
|
||||
wm_theme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kdebugrc")"
|
||||
fi
|
||||
|
||||
wm_theme="${wm_theme/'theme='}"
|
||||
;;
|
||||
|
||||
"Quartz Compositor")
|
||||
|
@ -1615,15 +1617,12 @@ get_style() {
|
|||
if [[ -f "${kde_config_dir}/kdeglobals" ]]; then
|
||||
kde_config_file="${kde_config_dir}/kdeglobals"
|
||||
|
||||
theme="$(grep "^${kde}" "$kde_config_file")"
|
||||
theme="${theme/${kde}*=}"
|
||||
theme="$(uppercase "$theme")"
|
||||
|
||||
gtk_shorthand="on"
|
||||
kde_theme="$(grep "^${kde}" "$kde_config_file")"
|
||||
kde_theme="${kde_theme/${kde}*=}"
|
||||
kde_theme="$(uppercase "$kde_theme") [KDE], "
|
||||
else
|
||||
err "Theme: KDE config files not found, skipping."
|
||||
fi
|
||||
return
|
||||
;;
|
||||
|
||||
*"Cinnamon"*)
|
||||
|
@ -1704,7 +1703,7 @@ get_style() {
|
|||
[[ "$gtk3" == "off" ]] && unset gtk3_theme
|
||||
|
||||
# Format the string based on which themes exist.
|
||||
if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then
|
||||
if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then
|
||||
gtk3_theme+=" [GTK2/3]"
|
||||
unset gtk2_theme
|
||||
|
||||
|
@ -1718,12 +1717,14 @@ get_style() {
|
|||
fi
|
||||
|
||||
# Final string.
|
||||
theme="${gtk2_theme}${gtk3_theme}"
|
||||
theme="${kde_theme}${gtk2_theme}${gtk3_theme}"
|
||||
theme="${theme%, }"
|
||||
|
||||
# Make the output shorter by removing "[GTKX]" from the string.
|
||||
if [[ "$gtk_shorthand" == "on" ]]; then
|
||||
theme="${theme// '[GTK'[0-9]']'}"
|
||||
theme="${theme/ '[GTK2/3]'}"
|
||||
theme="${theme/ '[KDE]'}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue