#!/bin/bash icons=/usr/share/tromjaro-theme-switcher/icons set_icon_theme() { # Change icon theme in XFCE xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s "$1" } enable_dark_panels() { # Enable dark panels 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 } show_icon_dialog() { local icon_path=$1 yad --image "$icon_path" --title "Theme Icon" --window-icon=gtk-dialog-info --no-buttons --timeout=2 } set_theme() { local theme=$1 local icon_theme local enable_dark case "$theme" in Colloid-Grey-Dark-Nord | Colloid-Grey | Colloid-Pink | Colloid-Green | Colloid-Orange | Colloid-Purple | Colloid-Teal | Colloid-Yellow | Colloid-Pink-Dark-Nord | Colloid-Green-Dark-Nord | Colloid-Orange-Dark-Nord | Colloid-Purple-Dark-Nord | Colloid-Teal-Dark-Nord | Colloid-Yellow-Dark-Nord | Colloid-Dark-Nord) icon_theme='zafiro-dark' enable_dark=true ;; *) icon_theme='zafiro' enable_dark=false ;; esac if [ "$enable_dark" = true ]; then enable_dark_panels set_icon_theme "$icon_theme" else disable_dark_panels set_icon_theme "$icon_theme" fi # Change the main theme to the chosen one xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "$theme" xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$theme" notify-send "$theme theme was enabled" } export -f set_icon_theme set_theme enable_dark_panels disable_dark_panels show_icon_dialog 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 --width=1000 --height=400 \ --field=!"$icons/Colloid-Grey.png"!'Colloid-Grey':FBTN "set_theme 'Colloid-Grey'" \ --field=!"$icons/Colloid-Grey-Light.png"!'Colloid-Grey-Light':FBTN "set_theme 'Colloid-Grey-Light'" \ --field=!"$icons/Colloid-Grey-Dark-Nord.png"!'Colloid-Grey-Dark-Nord':FBTN "set_theme 'Colloid-Grey-Dark-Nord'" \ --field=!"$icons/Colloid-Grey-Dark-Gruvbox.png"!'Colloid-Grey-Dark-Gruvbox':FBTN "set_theme 'Colloid-Grey-Dark-Gruvbox'" \ \ --field=!"$icons/Colloid-Pink.png"!'Colloid-Pink':FBTN "set_theme 'Colloid-Pink'" \ --field=!"$icons/Colloid-Pink-Light.png"!'Colloid-Pink-Light':FBTN "set_theme 'Colloid-Pink-Light'" \ --field=!"$icons/Colloid-Pink-Dark-Nord.png"!'Colloid-Pink-Dark-Nord':FBTN "set_theme 'Colloid-Pink-Dark-Nord'" \ --field=!"$icons/Colloid-Pink-Dark-Gruvbox.png"!'Colloid-Pink-Dark-Gruvbox':FBTN "set_theme 'Colloid-Pink-Dark-Gruvbox'" \ \ --field=!"$icons/Colloid-Green.png"!'Colloid-Green':FBTN "set_theme 'Colloid-Green'" \ --field=!"$icons/Colloid-Green-Light.png"!'Colloid-Green-Light':FBTN "set_theme 'Colloid-Green-Light'" \ --field=!"$icons/Colloid-Green-Dark-Nord.png"!'Colloid-Green-Dark-Nord':FBTN "set_theme 'Colloid-Green-Dark-Nord'" \ \ --field=!"$icons/Colloid-Orange.png"!'Colloid-Orange':FBTN "set_theme 'Colloid-Orange'" \ --field=!"$icons/Colloid-Orange-Light.png"!'Colloid-Orange-Light':FBTN "set_theme 'Colloid-Orange-Light'" \ --field=!"$icons/Colloid-Orange-Dark-Nord.png"!'Colloid-Orange-Dark-Nord':FBTN "set_theme 'Colloid-Orange-Dark-Nord'" \ \ --field=!"$icons/Colloid-Purple.png"!'Colloid-Purple':FBTN "set_theme 'Colloid-Purple'" \ --field=!"$icons/Colloid-Purple-Light.png"!'Colloid-Purple-Light':FBTN "set_theme 'Colloid-Purple-Light'" \ --field=!"$icons/Colloid-Purple-Dark-Nord.png"!'Colloid-Purple-Dark-Nord':FBTN "set_theme 'Colloid-Purple-Dark-Nord'" \ \ --field=!"$icons/Colloid-Teal.png"!'Colloid-Teal':FBTN "set_theme 'Colloid-Teal'" \ --field=!"$icons/Colloid-Teal-Light.png"!'Colloid-Teal-Light':FBTN "set_theme 'Colloid-Teal-Light'" \ --field=!"$icons/Colloid-Teal-Dark-Nord.png"!'Colloid-Teal-Dark-Nord':FBTN "set_theme 'Colloid-Teal-Dark-Nord'" \ \ --field=!"$icons/Colloid-Yellow.png"!'Colloid-Yellow':FBTN "set_theme 'Colloid-Yellow'" \ --field=!"$icons/Colloid-Yellow-Light.png"!'Colloid-Yellow-Light':FBTN "set_theme 'Colloid-Yellow-Light'" \ --field=!"$icons/Colloid-Yellow-Dark-Nord.png"!'Colloid-Yellow-Dark-Nord':FBTN "set_theme 'Colloid-Yellow-Dark-Nord'" \ --field=!"$icons/Colloid-Yellow-Dark-Gruvbox.png"!'Colloid-Yellow-Dark-Gruvbox':FBTN "set_theme 'Colloid-Yellow-Dark-Gruvbox'" \ \ --field=!"$icons/Colloid-Dark-Nord.png"!'Colloid-Dark-Nord':FBTN "set_theme 'Colloid-Dark-Nord'" \ --field=!"$icons/Colloid-Pink-Dark-Nord.png"!'Colloid-Pink-Dark-Nord':FBTN "set_theme 'Colloid-Pink-Dark-Nord'" \ --field=!"$icons/Colloid-Green-Dark-Nord.png"!'Colloid-Green-Dark-Nord':FBTN "set_theme 'Colloid-Green-Dark-Nord'" \ --field=!"$icons/Colloid-Orange-Dark-Nord.png"!'Colloid-Orange-Dark-Nord':FBTN "set_theme 'Colloid-Orange-Dark-Nord'" \ --field=!"$icons/Colloid-Purple-Dark-Nord.png"!'Colloid-Purple-Dark-Nord':FBTN "set_theme 'Colloid-Purple-Dark-Nord'" \ --field=!"$icons/Colloid-Teal-Dark-Nord.png"!'Colloid-Teal-Dark-Nord':FBTN "set_theme 'Colloid-Teal-Dark-Nord'" \ --field=!"$icons/Colloid-Yellow-Dark-Nord.png"!'Colloid-Yellow-Dark-Nord':FBTN "set_theme 'Colloid-Yellow-Dark-Nord'" \ --field=!"$icons/Colloid-Dark-Nord.png"!'Colloid-Dark-Nord':FBTN "set_theme 'Colloid-Dark-Nord'"