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 | |
| parent | 2647d90c60a88e91b12ec6c059d16512bc08d275 (diff) | |
updated some scripts for better notification visibility. Swaync notification width reduce to look better
Diffstat (limited to 'config/hypr/UserScripts')
| -rwxr-xr-x | config/hypr/UserScripts/RofiBeats.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/WallpaperEffects.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/ZshChangeTheme.sh | 9 |
3 files changed, 13 insertions, 6 deletions
diff --git a/config/hypr/UserScripts/RofiBeats.sh b/config/hypr/UserScripts/RofiBeats.sh index 51b869f1..54064752 100755 --- a/config/hypr/UserScripts/RofiBeats.sh +++ b/config/hypr/UserScripts/RofiBeats.sh @@ -39,7 +39,7 @@ populate_local_music() { # Function for displaying notifications notification() { - notify-send -u normal -i "$iDIR/music.png" "$(printf "\n Playing:\n $@")" + notify-send -u normal -i "$iDIR/music.png" " Now Playing:" " $@" } # Main function for playing local music @@ -92,7 +92,7 @@ play_online_music() { } # Check if an online music process is running and send a notification, otherwise run the main function -pkill mpv && notify-send -u low -i "$iDIR/music.png" "$(printf "\n Music stopped")" || { +pkill mpv && notify-send -u low -i "$iDIR/music.png" " Music stopped" || { # Check if rofi is already running if pidof rofi > /dev/null; then diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index b98b572b..08eaf924 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -49,7 +49,7 @@ no-effects() { sleep 2 "$SCRIPTSDIR/Refresh.sh" - notify-send -u low -i "$iDIR/bell.png" "$(printf "\n No wallpaper effects")" + notify-send -u low -i "$iDIR/bell.png" " No wallpaper effects" # copying wallpaper for rofi menu cp "$current_wallpaper" "$wallpaper_output" } @@ -71,7 +71,7 @@ main() { no-effects elif [[ "${effects[$choice]+exists}" ]]; then # Apply selected effect - notify-send -u normal -i "$iDIR/bell.png" "$(printf "\n Applying\n $choice effects")" + notify-send -u normal -i "$iDIR/bell.png" " Applying:" " $choice effects" eval "${effects[$choice]}" # Wait for effects to be applied sleep 1 @@ -85,7 +85,7 @@ main() { sleep 0.5 # Refresh rofi, waybar, wallust palettes "${SCRIPTSDIR}/Refresh.sh" - notify-send -u low -i "$iDIR/bell.png" "$(printf "\n $choice effects\n applied")" + notify-send -u low -i "$iDIR/bell.png" " $choice effects" " applied" else echo "Effect '$choice' not recognized." fi 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 } |
