From 9387e010be34cd9f7da520b0d6fd081115e60972 Mon Sep 17 00:00:00 2001 From: Dooho Yi Date: Mon, 21 Oct 2024 17:22:17 +0900 Subject: [PATCH] added more triggers --- xfce4-night-mode.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xfce4-night-mode.sh b/xfce4-night-mode.sh index 8fe4349..3f11499 100755 --- a/xfce4-night-mode.sh +++ b/xfce4-night-mode.sh @@ -171,6 +171,30 @@ case "$mode" in exit 1 esac +# Toggle also icon of the launcher for this script. +case "$mode" in + day) + sed -i 's/toggledarkmode-dark/toggledarkmode-light/' ~/.config/xfce4/panel/launcher-22/17287060942.desktop + ;; + night) + sed -i 's/toggledarkmode-light/toggledarkmode-dark/' ~/.config/xfce4/panel/launcher-22/17287060942.desktop + ;; + *) + exit 1 +esac + +# Toggle also icon of 'application menu' +case "$mode" in + day) + xfconf-query --channel 'xfce4-panel' --property '/plugins/plugin-1/button-icon' --set 'emblem-debian' + ;; + night) + xfconf-query --channel 'xfce4-panel' --property '/plugins/plugin-1/button-icon' --set 'emblem-debian-white' + ;; + *) + exit 1 +esac + echo "$TEXT" echo "$0 toggle" echo "