[PR] #163 from mcneb10: Display global KDE Plasma theme
Display global KDE Plasma theme and fix bug with DE listing on windows
This commit is contained in:
commit
65d82be06e
1 changed files with 13 additions and 4 deletions
17
neofetch
17
neofetch
|
@ -2438,7 +2438,7 @@ get_de() {
|
||||||
# TODO:
|
# TODO:
|
||||||
# - New config option + flag: --de_display_server on/off ?
|
# - New config option + flag: --de_display_server on/off ?
|
||||||
# - Add display of X11, Arcan and anything else relevant.
|
# - Add display of X11, Arcan and anything else relevant.
|
||||||
[[ $de ]] &&
|
[[ $de ]] && [[ $os != "Windows" ]] &&
|
||||||
de+=" (${XDG_SESSION_TYPE})"
|
de+=" (${XDG_SESSION_TYPE})"
|
||||||
|
|
||||||
de_run=1
|
de_run=1
|
||||||
|
@ -3943,8 +3943,13 @@ get_style() {
|
||||||
qt_theme="$(grep "^${kde}" "$kde_config_file")"
|
qt_theme="$(grep "^${kde}" "$kde_config_file")"
|
||||||
qt_theme="${qt_theme/*=}"
|
qt_theme="${qt_theme/*=}"
|
||||||
|
|
||||||
kde_theme="$(grep "^${kde}" "$kde_config_file")"
|
if [[ "$kde" == "widgetStyle" ]] && grep -q "\[Theme\]" "$HOME/.config/plasmarc"; then
|
||||||
kde_theme="${kde_theme/*=}"
|
kde_theme="$(awk '/name=/ {gsub(/name=/,"",$0);print $0;exit}' "$HOME/.config/plasmarc")"
|
||||||
|
else
|
||||||
|
kde_theme="$(grep "^${kde}" "$kde_config_file")"
|
||||||
|
kde_theme="${kde_theme/*=}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$kde" == "font" ]]; then
|
if [[ "$kde" == "font" ]]; then
|
||||||
kde_font_size="${kde_theme#*,}"
|
kde_font_size="${kde_theme#*,}"
|
||||||
kde_font_size="${kde_font_size/,*}"
|
kde_font_size="${kde_font_size/,*}"
|
||||||
|
@ -3961,7 +3966,7 @@ get_style() {
|
||||||
kde_theme="$(grep "${kde}" "$kde_config_file")"
|
kde_theme="$(grep "${kde}" "$kde_config_file")"
|
||||||
kde_theme="${kde_theme/*=}"
|
kde_theme="${kde_theme/*=}"
|
||||||
fi
|
fi
|
||||||
kde_theme="$kde_theme [KDE], "
|
#kde_theme="$kde_theme [KDE], "
|
||||||
else
|
else
|
||||||
err "Theme: KDE config files not found, skipping."
|
err "Theme: KDE config files not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
@ -4132,11 +4137,13 @@ get_style() {
|
||||||
gtk2_theme="$(trim "$gtk2_theme")"
|
gtk2_theme="$(trim "$gtk2_theme")"
|
||||||
gtk3_theme="$(trim "$gtk3_theme")"
|
gtk3_theme="$(trim "$gtk3_theme")"
|
||||||
qt_theme="$(trim "$qt_theme")"
|
qt_theme="$(trim "$qt_theme")"
|
||||||
|
kde_theme="$(trim "$kde_theme")"
|
||||||
|
|
||||||
# Remove quotes.
|
# Remove quotes.
|
||||||
gtk2_theme="$(trim_quotes "$gtk2_theme")"
|
gtk2_theme="$(trim_quotes "$gtk2_theme")"
|
||||||
gtk3_theme="$(trim_quotes "$gtk3_theme")"
|
gtk3_theme="$(trim_quotes "$gtk3_theme")"
|
||||||
qt_theme="$(trim_quotes "$qt_theme")"
|
qt_theme="$(trim_quotes "$qt_theme")"
|
||||||
|
kde_theme="$(trim_quotes "$kde_theme")"
|
||||||
|
|
||||||
# Handle Qt theme engines that load external themes
|
# Handle Qt theme engines that load external themes
|
||||||
case "$qt_theme" in
|
case "$qt_theme" in
|
||||||
|
@ -4155,6 +4162,7 @@ get_style() {
|
||||||
[[ "$gtk2" == "off" ]] && unset gtk2_theme
|
[[ "$gtk2" == "off" ]] && unset gtk2_theme
|
||||||
[[ "$gtk3" == "off" ]] && unset gtk3_theme
|
[[ "$gtk3" == "off" ]] && unset gtk3_theme
|
||||||
[[ "$qt" == "off" ]] && unset qt_theme
|
[[ "$qt" == "off" ]] && unset qt_theme
|
||||||
|
# TODO: kde theme visibility
|
||||||
|
|
||||||
# Format the string based on which themes exist.
|
# Format the string based on which themes exist.
|
||||||
# append_theme theme toolkit
|
# append_theme theme toolkit
|
||||||
|
@ -4170,6 +4178,7 @@ get_style() {
|
||||||
}
|
}
|
||||||
theme=''
|
theme=''
|
||||||
local cur_theme=''
|
local cur_theme=''
|
||||||
|
append_theme "$kde_theme" 'KDE'
|
||||||
append_theme "$fly_theme" 'Fly'
|
append_theme "$fly_theme" 'Fly'
|
||||||
append_theme "$qt_theme" 'Qt'
|
append_theme "$qt_theme" 'Qt'
|
||||||
append_theme "$gtk2_theme" 'GTK2'
|
append_theme "$gtk2_theme" 'GTK2'
|
||||||
|
|
Loading…
Reference in a new issue