diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-01-19 18:22:28 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-01-19 18:22:28 +0900 |
| commit | 2398cb234ad450dcec0e41a235c7137c3d0f831a (patch) | |
| tree | 7e7e93374d7e811abae601d2aa7b1fd5aacbc211 /config/hypr/scripts | |
| parent | 297144b5dd1b08819276840c138c01c584689165 (diff) | |
update on scripts for better notification via swaync
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/AirplaneMode.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/Brightness.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/BrightnessKbd.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/GameMode.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/MediaCtrl.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/SwitchKeyboardLayout.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/TouchPad.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/Volume.sh | 2 |
9 files changed, 15 insertions, 15 deletions
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index 89546e76..93526b66 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -9,8 +9,8 @@ wifi_blocked=$(rfkill list wifi | grep -o "Soft blocked: yes") if [ -n "$wifi_blocked" ]; then rfkill unblock wifi - notify-send -u low -i "$notif" " Airplane mode:" " Switched OFF" + notify-send -u low -i "$notif" " Airplane" " mode: OFF" else rfkill block wifi - notify-send -u low -i "$notif" " Airplane mode:" " Switched ON" + notify-send -u low -i "$notif" " Airplane" " mode: ON" fi diff --git a/config/hypr/scripts/Brightness.sh b/config/hypr/scripts/Brightness.sh index 4578e509..8e5d525a 100755 --- a/config/hypr/scripts/Brightness.sh +++ b/config/hypr/scripts/Brightness.sh @@ -29,7 +29,7 @@ get_icon() { # Notify notify_user() { - notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" " Screen Brightness:" " $current %" + notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i $icon "Screen" "Brightness:$current%" } # Change brightness diff --git a/config/hypr/scripts/BrightnessKbd.sh b/config/hypr/scripts/BrightnessKbd.sh index 67f8b87e..4c56bc03 100755 --- a/config/hypr/scripts/BrightnessKbd.sh +++ b/config/hypr/scripts/BrightnessKbd.sh @@ -26,7 +26,7 @@ get_icon() { } # Notify notify_user() { - notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" " Keyboard Brightness:" " $current%" + notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard" "Brightness:$current%" } # Change brightness diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh index 7bad0909..7ab6f451 100755 --- a/config/hypr/scripts/GameMode.sh +++ b/config/hypr/scripts/GameMode.sh @@ -19,7 +19,7 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then hyprctl keyword "windowrule opacity 1 override 1 override 1 override, ^(.*)$" swww kill - notify-send -e -u low -i "$notif" " gamemode enabled" " All animations: OFF" + notify-send -e -u low -i "$notif" " Gamemode:" " enabled" exit else swww-daemon --format xrgb && swww img "$HOME/.config/rofi/.current_wallpaper" & @@ -27,7 +27,7 @@ else ${SCRIPTSDIR}/WallustSwww.sh sleep 0.5 ${SCRIPTSDIR}/Refresh.sh - notify-send -e -u normal -i "$notif" " gamemode enabled" " All animations: normal" + notify-send -e -u normal -i "$notif" " Gamemode:" " disabled" exit fi hyprctl reload diff --git a/config/hypr/scripts/MediaCtrl.sh b/config/hypr/scripts/MediaCtrl.sh index f519340f..2cbeccf3 100755 --- a/config/hypr/scripts/MediaCtrl.sh +++ b/config/hypr/scripts/MediaCtrl.sh @@ -25,7 +25,7 @@ toggle_play_pause() { # Stop playback stop_playback() { playerctl stop - notify-send -e -u low -i "$music_icon" " Playback Stopped" + notify-send -e -u low -i $music_icon " Playback:" " Stopped" } # Display notification with song information @@ -34,9 +34,9 @@ show_music_notification() { if [[ "$status" == "Playing" ]]; then song_title=$(playerctl metadata title) song_artist=$(playerctl metadata artist) - notify-send -e -u low -i "$music_icon" " Now Playing:" " $song_title by $song_artist" + notify-send -e -u low -i $music_icon "Now Playing:" "$song_title by $song_artist" elif [[ "$status" == "Paused" ]]; then - notify-send -e -u low -i "$music_icon" " Playback Paused" + notify-send -e -u low -i $music_icon " Playback:" " Paused" fi } diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 3fdd15b8..e0df2b86 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -53,7 +53,7 @@ notify_view() { local check_file="${dir}/${file}" if [[ -e "$check_file" ]]; then "${sDIR}/Sounds.sh" --screenshot - resp=$(timeout 5 ${notify_cmd_shot} " Screenshot Saved") + resp=$(timeout 5 ${notify_cmd_shot} " Screenshot" " Saved") case "$resp" in action1) xdg-open "${check_file}" & @@ -63,7 +63,7 @@ notify_view() { ;; esac else - ${notify_cmd_shot} " Screenshot NOT Saved" + ${notify_cmd_shot} " Screenshot" " NOT Saved" "${sDIR}/Sounds.sh" --error fi fi diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh index 95e6edc8..f1f8b244 100755 --- a/config/hypr/scripts/SwitchKeyboardLayout.sh +++ b/config/hypr/scripts/SwitchKeyboardLayout.sh @@ -97,7 +97,7 @@ if ! change_layout; then echo "Layout change failed." >&2 exit 1 else - notify-send -u low -i "$notif_icon" " New kb_layout: $new_layout" + notify-send -u low -i "$notif_icon" " kb_layout: $new_layout" echo "Layout change notification sent." fi diff --git a/config/hypr/scripts/TouchPad.sh b/config/hypr/scripts/TouchPad.sh index 22dd241b..5174968e 100755 --- a/config/hypr/scripts/TouchPad.sh +++ b/config/hypr/scripts/TouchPad.sh @@ -11,13 +11,13 @@ export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status" enable_touchpad() { printf "true" >"$STATUS_FILE" - notify-send -u low -i $notif " Enabling touchpad" + notify-send -u low -i $notif " Enabling" " touchpad" hyprctl keyword '$TOUCHPAD_ENABLED' "true" -r } disable_touchpad() { printf "false" >"$STATUS_FILE" - notify-send -u low -i $notif " Disabling touchpad" + notify-send -u low -i $notif " Disabling" " touchpad" hyprctl keyword '$TOUCHPAD_ENABLED' "false" -r } diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index ac1367b7..af7192c2 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -60,7 +60,7 @@ dec_volume() { # Toggle Mute toggle_mute() { if [ "$(pamixer --get-mute)" == "false" ]; then - pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" " Muted" + pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" " Mute" elif [ "$(pamixer --get-mute)" == "true" ]; then pamixer -u && notify-send -e -u low -i "$(get_icon)" " Volume:" " Switched ON" fi |
