From 47a6c42c77244b4b18f6e074542c15bc43bc4273 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 16 Jan 2025 10:53:08 +0900 Subject: updated some scripts for better notification visibility. Swaync notification width reduce to look better --- config/hypr/UserScripts/ZshChangeTheme.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'config/hypr/UserScripts/ZshChangeTheme.sh') diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index 662a36bb..7fe7eb39 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -8,6 +8,9 @@ themes_dir="$HOME/.oh-my-zsh/themes" file_extension=".zsh-theme" +# Directory for swaync +iDIR="$HOME/.config/swaync/images" + themes_array=($(find "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) # Add "Random" option to the beginning of the array @@ -26,6 +29,7 @@ main() { # if nothing selected, script won't change anything if [ -z "$choice" ]; then + notify-send -u low -i "$iDIR/bell.png" " No theme selected." " No changes made!" exit 0 fi @@ -36,15 +40,18 @@ main() { # Pick a random theme from the original themes_array (excluding "Random") random_theme=${themes_array[$((RANDOM % (${#themes_array[@]} - 1) + 1))]} theme_to_set="$random_theme" + notify-send -i "$iDIR/bell.png" " Random theme selected: $random_theme" else # Set theme to the selected choice theme_to_set="$choice" + notify-send -i "$iDIR/bell.png" " Theme selected: $choice" fi if [ -f "$zsh_path" ]; then sed -i "s/^$var_name=.*/$var_name=\"$theme_to_set\"/" "$zsh_path" + notify-send -i "$iDIR/bell.png" " OMZ Theme updated" " restart your terminal" else - echo "File not found" + notify-send " Error: .zshrc file not found!" fi } -- cgit v1.2.3