Add support for kwin
This commit is contained in:
parent
1ce7a904d1
commit
c8e8cf5f99
1 changed files with 31 additions and 10 deletions
41
neofetch
41
neofetch
|
@ -822,7 +822,7 @@ getwmtheme () {
|
||||||
'Cinnamon' | 'Muffin')
|
'Cinnamon' | 'Muffin')
|
||||||
detheme="$(gsettings get org.cinnamon.theme name)"
|
detheme="$(gsettings get org.cinnamon.theme name)"
|
||||||
wmtheme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
|
wmtheme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
|
||||||
wmtheme="${detheme} (${wmtheme})"
|
wmtheme="$detheme (${wmtheme})"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Compiz' | 'Mutter'* | 'GNOME Shell' | 'Gala')
|
'Compiz' | 'Mutter'* | 'GNOME Shell' | 'Gala')
|
||||||
|
@ -873,6 +873,18 @@ getwmtheme () {
|
||||||
wmtheme="$(xfconf-query -c xfwm4 -p /general/theme)"
|
wmtheme="$(xfconf-query -c xfwm4 -p /general/theme)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
'KWin'*)
|
||||||
|
kdeconfigdir
|
||||||
|
kde_config_dir=${kde_config_dir%/}
|
||||||
|
|
||||||
|
if [ -f "$kde_config_dir/share/config/kwinrc" ]; then
|
||||||
|
wmtheme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' "$kde_config_dir/share/config/kwinrc")"
|
||||||
|
|
||||||
|
elif [ -f "$KDE_CONFIG_DIR/share/config/kdebugrc" ]; then
|
||||||
|
wmtheme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kde_config_dir/share/config/kdebugrc")"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
'Quartz Compositor')
|
'Quartz Compositor')
|
||||||
wmtheme=$(/usr/libexec/PlistBuddy -c "Print AppleAquaColorVariant" ~/Library/Preferences/.GlobalPreferences.plist)
|
wmtheme=$(/usr/libexec/PlistBuddy -c "Print AppleAquaColorVariant" ~/Library/Preferences/.GlobalPreferences.plist)
|
||||||
if [ -z "$wmtheme" ] || [ "$wmtheme" == "1" ]; then
|
if [ -z "$wmtheme" ] || [ "$wmtheme" == "1" ]; then
|
||||||
|
@ -1390,15 +1402,7 @@ getstyle () {
|
||||||
# Current DE
|
# Current DE
|
||||||
case "$XDG_CURRENT_DESKTOP" in
|
case "$XDG_CURRENT_DESKTOP" in
|
||||||
"KDE"*)
|
"KDE"*)
|
||||||
if type -p kde5-config >/dev/null 2>&1; then
|
kdeconfigdir
|
||||||
kde_config_dir=$(kde5-config --localprefix)
|
|
||||||
|
|
||||||
elif type -p kde4-config >/dev/null 2>&1; then
|
|
||||||
kde_config_dir=$(kde4-config --localprefix)
|
|
||||||
|
|
||||||
elif type -p kde-config >/dev/null 2>&1; then
|
|
||||||
kde_config_dir=$(kde-config --localprefix)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "${kde_config_dir}/share/config/kdeglobals" ]; then
|
if [ -f "${kde_config_dir}/share/config/kdeglobals" ]; then
|
||||||
kde_config_file="${kde_config_dir}/share/config/kdeglobals"
|
kde_config_file="${kde_config_dir}/share/config/kdeglobals"
|
||||||
|
@ -2552,6 +2556,23 @@ cache () {
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
# KDE Config directory {{{
|
||||||
|
|
||||||
|
kdeconfigdir () {
|
||||||
|
if type -p kde5-config >/dev/null 2>&1; then
|
||||||
|
kde_config_dir=$(kde5-config --localprefix)
|
||||||
|
|
||||||
|
elif type -p kde4-config >/dev/null 2>&1; then
|
||||||
|
kde_config_dir=$(kde4-config --localprefix)
|
||||||
|
|
||||||
|
elif type -p kde-config >/dev/null 2>&1; then
|
||||||
|
kde_config_dir=$(kde-config --localprefix)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue