Update theme-switcher
This commit is contained in:
parent
703f23f3f8
commit
dc00830e31
|
@ -13,11 +13,6 @@ enable_dark_panels() {
|
||||||
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s true
|
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s true
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_dark_panels() {
|
|
||||||
# Disable dark panels
|
|
||||||
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s false
|
|
||||||
}
|
|
||||||
|
|
||||||
set_theme() {
|
set_theme() {
|
||||||
local theme="Colloid-$1"
|
local theme="Colloid-$1"
|
||||||
|
|
||||||
|
@ -26,10 +21,6 @@ set_theme() {
|
||||||
*'-Dark-Gruvbox'|*'-Dark'|*'-Dark-Nord')
|
*'-Dark-Gruvbox'|*'-Dark'|*'-Dark-Nord')
|
||||||
set_icon_theme 'zafiro-dark'
|
set_icon_theme 'zafiro-dark'
|
||||||
;;
|
;;
|
||||||
*'-Light')
|
|
||||||
set_icon_theme 'zafiro'
|
|
||||||
disable_dark_panels
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
set_icon_theme 'zafiro'
|
set_icon_theme 'zafiro'
|
||||||
enable_dark_panels
|
enable_dark_panels
|
||||||
|
@ -40,62 +31,54 @@ set_theme() {
|
||||||
# Change the main theme to the chosen one
|
# Change the main theme to the chosen one
|
||||||
xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "$theme"
|
xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "$theme"
|
||||||
|
|
||||||
if [ "$(xfconf-query -c xsettings -p /Gdk/WindowScalingFactor)" = '2' ]; then
|
|
||||||
# Use the highDPI themes for XFWM if highDPI is enabled in XFCE
|
|
||||||
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$theme-xhdpi"
|
|
||||||
xfconf-query -c xsettings -p /Gtk/CursorThemeSize -s "45"
|
|
||||||
else
|
|
||||||
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$theme"
|
|
||||||
xfconf-query -c xsettings -p /Gtk/CursorThemeSize -s "25"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Send notification about the theme change
|
# Send notification about the theme change
|
||||||
notify-send "$theme theme$panel_notification was enabled"
|
notify-send "$theme theme$panel_notification was enabled"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Export functions to make them available inside yad
|
# Export functions to make them available inside yad
|
||||||
export -f set_icon_theme set_theme enable_dark_panels disable_dark_panels
|
export -f set_icon_theme enable_dark_panels set_theme
|
||||||
|
|
||||||
# The GUI interface using yad
|
# The GUI interface using yad
|
||||||
yad --no-buttons --center --keep-icon-size --use-interp --title 'TROMjaro Theme Switcher' --text-align=center --text "A Theme Switcher for TROMjaro's default theme-set (Colloid) and icon-set (Zafiro)." --form --columns 8 \
|
yad --no-buttons --center --keep-icon-size --use-interp --title 'TROMjaro Theme Switcher' --text-align=center --text "A Theme Switcher for TROMjaro's default theme-set (Colloid) and icon-set (Zafiro)." --form --columns 7 \
|
||||||
--field=!"$icons/Colloid-Grey-Dark.png"!'Grey-Dark':FBTN "set_theme 'Grey-Dark'" \
|
|
||||||
--field=!"$icons/Colloid-Grey-Light.png"!'Grey-Light':FBTN "set_theme 'Grey-Light'" \
|
--field=!"$icons/Colloid-Grey-Light.png"!'Grey-Light':FBTN "set_theme 'Grey-Light'" \
|
||||||
--field=!"$icons/Colloid-Grey.png"!'Grey':FBTN "set_theme 'Grey'" \
|
--field=!"$icons/Colloid-Grey.png"!'Grey':FBTN "set_theme 'Grey'" \
|
||||||
--field=!"$icons/Colloid-Grey-Nord.png"!'Grey-Nord':FBTN "set_theme 'Grey-Nord'" \
|
--field=!"$icons/Colloid-Grey-Nord.png"!'Grey-Nord':FBTN "set_theme 'Grey-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Grey-Dark.png"!'Grey-Dark':FBTN "set_theme 'Grey-Dark'" \
|
||||||
--field=!"$icons/Colloid-Grey-Dark-Nord.png"!'Grey-Dark-Nord':FBTN "set_theme 'Grey-Dark-Nord'" \
|
--field=!"$icons/Colloid-Grey-Dark-Nord.png"!'Grey-Dark-Nord':FBTN "set_theme 'Grey-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Pink-Dark.png"!'Pink-Dark':FBTN "set_theme 'Pink-Dark'" \
|
--field=!"$icons/Colloid-Grey-Dark-Gruvbox.png"!'Grey-Dark-Gruvbox':FBTN "set_theme 'Grey-Dark-Gruvbox'" \
|
||||||
--field=!"$icons/Colloid-Pink-Light.png"!'Pink-Light':FBTN "set_theme 'Pink-Light'" \
|
--field=!"$icons/Colloid-Pink-Light.png"!'Pink-Light':FBTN "set_theme 'Pink-Light'" \
|
||||||
--field=!"$icons/Colloid-Pink.png"!'Pink':FBTN "set_theme 'Pink'" \
|
--field=!"$icons/Colloid-Pink.png"!'Pink':FBTN "set_theme 'Pink'" \
|
||||||
--field=!"$icons/Colloid-Pink-Nord.png"!'Pink-Nord':FBTN "set_theme 'Pink-Nord'" \
|
--field=!"$icons/Colloid-Pink-Nord.png"!'Pink-Nord':FBTN "set_theme 'Pink-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Pink-Dark.png"!'Pink-Dark':FBTN "set_theme 'Pink-Dark'" \
|
||||||
--field=!"$icons/Colloid-Pink-Dark-Nord.png"!'Pink-Dark-Nord':FBTN "set_theme 'Pink-Dark-Nord'" \
|
--field=!"$icons/Colloid-Pink-Dark-Nord.png"!'Pink-Dark-Nord':FBTN "set_theme 'Pink-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Green-Dark.png"!'Green-Dark':FBTN "set_theme 'Green-Dark'" \
|
--field=!"$icons/Colloid-Pink-Dark-Gruvbox.png"!'Pink-Dark-Gruvbox':FBTN "set_theme 'Pink-Dark-Gruvbox'" \
|
||||||
--field=!"$icons/Colloid-Green-Light.png"!'Green-Light':FBTN "set_theme 'Green-Light'" \
|
--field=!"$icons/Colloid-Green-Light.png"!'Green-Light':FBTN "set_theme 'Green-Light'" \
|
||||||
--field=!"$icons/Colloid-Green.png"!'Green':FBTN "set_theme 'Green'" \
|
--field=!"$icons/Colloid-Green.png"!'Green':FBTN "set_theme 'Green'" \
|
||||||
--field=!"$icons/Colloid-Green-Nord.png"!'Green-Nord':FBTN "set_theme 'Green-Nord'" \
|
--field=!"$icons/Colloid-Green-Nord.png"!'Green-Nord':FBTN "set_theme 'Green-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Green-Dark.png"!'Green-Dark':FBTN "set_theme 'Green-Dark'" \
|
||||||
--field=!"$icons/Colloid-Green-Dark-Nord.png"!'Green-Dark-Nord':FBTN "set_theme 'Green-Dark-Nord'" \
|
--field=!"$icons/Colloid-Green-Dark-Nord.png"!'Green-Dark-Nord':FBTN "set_theme 'Green-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Orange-Dark.png"!'Orange-Dark':FBTN "set_theme 'Orange-Dark'" \
|
--field=!"$icons/Colloid-Dark-Gruvbox.png"!'Dark-Gruvbox':FBTN "set_theme 'Dark-Gruvbox'" \
|
||||||
--field=!"$icons/Colloid-Orange-Light.png"!'Orange-Light':FBTN "set_theme 'Orange-Light'" \
|
--field=!"$icons/Colloid-Orange-Light.png"!'Orange-Light':FBTN "set_theme 'Orange-Light'" \
|
||||||
--field=!"$icons/Colloid-Orange.png"!'Orange':FBTN "set_theme 'Orange'" \
|
--field=!"$icons/Colloid-Orange.png"!'Orange':FBTN "set_theme 'Orange'" \
|
||||||
--field=!"$icons/Colloid-Orange-Nord.png"!'Orange-Nord':FBTN "set_theme 'Orange-Nord'" \
|
--field=!"$icons/Colloid-Orange-Nord.png"!'Orange-Nord':FBTN "set_theme 'Orange-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Orange-Dark.png"!'Orange-Dark':FBTN "set_theme 'Orange-Dark'" \
|
||||||
--field=!"$icons/Colloid-Orange-Dark-Nord.png"!'Orange-Dark-Nord':FBTN "set_theme 'Orange-Dark-Nord'" \
|
--field=!"$icons/Colloid-Orange-Dark-Nord.png"!'Orange-Dark-Nord':FBTN "set_theme 'Orange-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Purple-Dark.png"!'Purple-Dark':FBTN "set_theme 'Purple-Dark'" \
|
--field=!"$icons/Colloid-Orange-Dark-Gruvbox.png"!'Orange-Dark-Gruvbox':FBTN "set_theme 'Orange-Dark-Gruvbox'" \
|
||||||
--field=!"$icons/Colloid-Purple-Light.png"!'Purple-Light':FBTN "set_theme 'Purple-Light'" \
|
--field=!"$icons/Colloid-Purple-Light.png"!'Purple-Light':FBTN "set_theme 'Purple-Light'" \
|
||||||
--field=!"$icons/Colloid-Purple.png"!'Purple':FBTN "set_theme 'Purple'" \
|
--field=!"$icons/Colloid-Purple.png"!'Purple':FBTN "set_theme 'Purple'" \
|
||||||
--field=!"$icons/Colloid-Purple-Nord.png"!'Purple-Nord':FBTN "set_theme 'Purple-Nord'" \
|
--field=!"$icons/Colloid-Purple-Nord.png"!'Purple-Nord':FBTN "set_theme 'Purple-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Purple-Dark.png"!'Purple-Dark':FBTN "set_theme 'Purple-Dark'" \
|
||||||
--field=!"$icons/Colloid-Purple-Dark-Nord.png"!'Purple-Dark-Nord':FBTN "set_theme 'Purple-Dark-Nord'" \
|
--field=!"$icons/Colloid-Purple-Dark-Nord.png"!'Purple-Dark-Nord':FBTN "set_theme 'Purple-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Teal-Dark.png"!'Teal-Dark':FBTN "set_theme 'Teal-Dark'" \
|
--field=!"$icons/Colloid-Purple-Dark-Gruvbox.png"!'Purple-Dark-Gruvbox':FBTN "set_theme 'Purple-Dark-Gruvbox'" \
|
||||||
--field=!"$icons/Colloid-Teal-Light.png"!'Teal-Light':FBTN "set_theme 'Teal-Light'" \
|
|
||||||
--field=!"$icons/Colloid-Teal.png"!'Teal':FBTN "set_theme 'Teal'" \
|
|
||||||
--field=!"$icons/Colloid-Teal-Nord.png"!'Teal-Nord':FBTN "set_theme 'Teal-Nord'" \
|
|
||||||
--field=!"$icons/Colloid-Teal-Dark-Nord.png"!'Teal-Dark-Nord (default)':FBTN "set_theme 'Teal-Dark-Nord'" \
|
|
||||||
--field=!"$icons/Colloid-Yellow-Dark.png"!'Yellow-Dark':FBTN "set_theme 'Yellow-Dark'" \
|
|
||||||
--field=!"$icons/Colloid-Yellow-Light.png"!'Yellow-Light':FBTN "set_theme 'Yellow-Light'" \
|
--field=!"$icons/Colloid-Yellow-Light.png"!'Yellow-Light':FBTN "set_theme 'Yellow-Light'" \
|
||||||
--field=!"$icons/Colloid-Yellow.png"!'Yellow':FBTN "set_theme 'Yellow'" \
|
--field=!"$icons/Colloid-Yellow.png"!'Yellow':FBTN "set_theme 'Yellow'" \
|
||||||
--field=!"$icons/Colloid-Yellow-Nord.png"!'Yellow-Nord':FBTN "set_theme 'Yellow-Nord'" \
|
--field=!"$icons/Colloid-Yellow-Nord.png"!'Yellow-Nord':FBTN "set_theme 'Yellow-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Yellow-Dark.png"!'Yellow-Dark':FBTN "set_theme 'Yellow-Dark'" \
|
||||||
--field=!"$icons/Colloid-Yellow-Dark-Nord.png"!'Yellow-Dark-Nord':FBTN "set_theme 'Yellow-Dark-Nord'" \
|
--field=!"$icons/Colloid-Yellow-Dark-Nord.png"!'Yellow-Dark-Nord':FBTN "set_theme 'Yellow-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Dark-Gruvbox.png"!'Dark-Gruvbox':FBTN "set_theme 'Dark-Gruvbox'" \
|
|
||||||
--field=!"$icons/Colloid-Grey-Dark-Gruvbox.png"!'Grey-Dark-Gruvbox':FBTN "set_theme 'Grey-Dark-Gruvbox'" \
|
|
||||||
--field=!"$icons/Colloid-Yellow-Dark-Gruvbox.png"!'Yellow-Dark-Gruvbox':FBTN "set_theme 'Yellow-Dark-Gruvbox'" \
|
--field=!"$icons/Colloid-Yellow-Dark-Gruvbox.png"!'Yellow-Dark-Gruvbox':FBTN "set_theme 'Yellow-Dark-Gruvbox'" \
|
||||||
--field=!"$icons/Colloid-Pink-Dark-Gruvbox.png"!'Pink-Dark-Gruvbox':FBTN "set_theme 'Pink-Dark-Gruvbox'" \
|
--field=!"$icons/Colloid-Teal-Light.png"!'Teal-Light':FBTN "set_theme 'Teal-Light'" \
|
||||||
|
--field=!"$icons/Colloid-Teal.png"!'Teal':FBTN "set_theme 'Teal'" \
|
||||||
|
--field=!"$icons/Colloid-Teal-Nord.png"!'Teal-Nord':FBTN "set_theme 'Teal-Nord'" \
|
||||||
|
--field=!"$icons/Colloid-Teal-Dark.png"!'Teal-Dark':FBTN "set_theme 'Teal-Dark'" \
|
||||||
|
--field=!"$icons/Colloid-Teal-Dark-Nord.png"!'Teal-Dark-Nord (default)':FBTN "set_theme 'Teal-Dark-Nord'" \
|
||||||
--field=!"$icons/Colloid-Dark-Nord.png"!'Dark-Nord':FBTN "set_theme 'Dark-Nord'"
|
--field=!"$icons/Colloid-Dark-Nord.png"!'Dark-Nord':FBTN "set_theme 'Dark-Nord'"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user