aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/ZshChangeTheme.sh
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2025-01-16 10:54:47 +0900
committerGitHub <noreply@github.com>2025-01-16 10:54:47 +0900
commitc30b1c5599daa78169486d76c9d3dd2fba3803a8 (patch)
treea50caee93fc0c2f0d8c02f6d0120af71cc24f1ac /config/hypr/UserScripts/ZshChangeTheme.sh
parenta4956da883d5fe2d66d528d2e9a890a2c6d064a8 (diff)
parent47a6c42c77244b4b18f6e074542c15bc43bc4273 (diff)
Merge pull request #526 from JaKooLit/development
Development to main
Diffstat (limited to 'config/hypr/UserScripts/ZshChangeTheme.sh')
-rwxr-xr-xconfig/hypr/UserScripts/ZshChangeTheme.sh9
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
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage