2022.08.21

This commit is contained in:
2022-08-21 16:53:41 +02:00
parent 59164035aa
commit a5836156f0
9 changed files with 196 additions and 99 deletions

View File

@ -7,25 +7,28 @@ set_theme() {
[ "${current_icon_theme%-dark}" = 'zafiro' ] && Zafiro='True'
if [ "${1##*-}" = 'Light' ]; then
yad --image "dialog-question" --title '' --button='DARK':1 --button='LIGHT':0 --text 'Select the panels theme:'
yad --image "dialog-question" --title '' --button='DARK':1 --button='LIGHT':0 --text 'Select the panels theme (dark panels may result in light icons over a light theme):'
case $? in
1)
# Enable dark panels
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s true
# Use the dark icon pack
[ "$Zafiro" = 'True' ] && xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s zafiro-dark
[ "$Zafiro" = 'True' ] && { xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s zafiro-dark
sed -i 's/^icon_theme=.*$/icon_theme=zafiro-dark/' "$HOME"/.config/qt5ct/qt5ct.conf; }
;;
0)
# Disable dark panels
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s false
# Use the light icon pack
[ "$Zafiro" = 'True' ] && xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s zafiro
[ "$Zafiro" = 'True' ] && { xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s zafiro
sed -i 's/^icon_theme=.*$/icon_theme=zafiro/' "$HOME"/.config/qt5ct/qt5ct.conf; }
;;
*) exit ;;
esac
else
# Use the dark icon pack
[ "$Zafiro" = 'True' ] && xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s zafiro-dark
[ "$Zafiro" = 'True' ] && { xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s zafiro-dark
sed -i 's/^icon_theme=.*$/icon_theme=zafiro-dark/' "$HOME"/.config/qt5ct/qt5ct.conf; }
fi
# Change the main theme to the chosen one
xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "Skeuos-$1"