diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-01-16 10:53:08 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-01-16 10:53:08 +0900 |
| commit | 47a6c42c77244b4b18f6e074542c15bc43bc4273 (patch) | |
| tree | a50caee93fc0c2f0d8c02f6d0120af71cc24f1ac /config/hypr/UserScripts/ZshChangeTheme.sh | |
| parent | 2647d90c60a88e91b12ec6c059d16512bc08d275 (diff) | |
updated some scripts for better notification visibility. Swaync notification width reduce to look better
Diffstat (limited to 'config/hypr/UserScripts/ZshChangeTheme.sh')
| -rwxr-xr-x | config/hypr/UserScripts/ZshChangeTheme.sh | 9 |
1 files changed, 8 insertions, 1 deletions
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 } |
