diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2023-12-26 19:17:12 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-26 19:17:12 +0900 |
| commit | 453d8b3f439d022569ea0b077e7c69039d96746a (patch) | |
| tree | 52e89ada62c8696d600675e12bd7cea663d74f8d /config/hypr/scripts | |
| parent | 76672ae5a6ac03c416bc705d51dec363f88b7a40 (diff) | |
| parent | 8440999fa6f62305b125b366d6f6309a25d06ebf (diff) | |
Merge pull request #103 from SherLock707/development
Development: Replaced dunst with 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/ChangeBlur.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/ChangeLayout.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/GameMode.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/PywalSwaync.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/scripts/Refresh.sh | 5 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiBeats.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/Volume.sh | 14 |
11 files changed, 31 insertions, 22 deletions
diff --git a/config/hypr/scripts/AirplaneMode.sh b/config/hypr/scripts/AirplaneMode.sh index 428a09bd..6e2eecff 100755 --- a/config/hypr/scripts/AirplaneMode.sh +++ b/config/hypr/scripts/AirplaneMode.sh @@ -5,8 +5,8 @@ dunst_notif="$HOME/.config/dunst/images/bell.png" wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')" if [ "$wifi" == "enabled" ]; then rfkill block all & - dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: active' + notify-send -e -u normal -i "$dunst_notif" -t 1000 'airplane mode: active' else rfkill unblock all & - dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive' + notify-send -e -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive' fi diff --git a/config/hypr/scripts/Brightness.sh b/config/hypr/scripts/Brightness.sh index c5c0b80f..1c68ec5e 100755 --- a/config/hypr/scripts/Brightness.sh +++ b/config/hypr/scripts/Brightness.sh @@ -26,7 +26,7 @@ get_icon() { # Notify notify_user() { - dunstify -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%" + notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%" } # Change brightness diff --git a/config/hypr/scripts/BrightnessKbd.sh b/config/hypr/scripts/BrightnessKbd.sh index c6d6afd3..3ea9e493 100755 --- a/config/hypr/scripts/BrightnessKbd.sh +++ b/config/hypr/scripts/BrightnessKbd.sh @@ -24,7 +24,7 @@ get_icon() { } # Notify notify_user() { - dunstify -h string:x-dunst-stack-tag: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/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh index 891e22eb..76e5ed80 100755 --- a/config/hypr/scripts/ChangeBlur.sh +++ b/config/hypr/scripts/ChangeBlur.sh @@ -7,9 +7,9 @@ STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int") if [ "${STATE}" == "2" ]; then hyprctl keyword decoration:blur:size 2 hyprctl keyword decoration:blur:passes 1 - dunstify -u low -i "$dunst_notif" "Less blur" + notify-send -e -u low -i "$dunst_notif" "Less blur" else hyprctl keyword decoration:blur:size 5 hyprctl keyword decoration:blur:passes 2 - dunstify -u low -i "$dunst_notif" "Normal blur" + notify-send -e -u low -i "$dunst_notif" "Normal blur" fi diff --git a/config/hypr/scripts/ChangeLayout.sh b/config/hypr/scripts/ChangeLayout.sh index 28b72035..69ded6c6 100755 --- a/config/hypr/scripts/ChangeLayout.sh +++ b/config/hypr/scripts/ChangeLayout.sh @@ -12,7 +12,7 @@ case $LAYOUT in hyprctl keyword bind SUPER,J,cyclenext hyprctl keyword bind SUPER,K,cyclenext,prev hyprctl keyword bind SUPER,O,togglesplit - dunstify -u low -i "$dunst_notif" "Dwindle Layout" + notify-send -e -u low -i "$dunst_notif" "Dwindle Layout" ;; "dwindle") hyprctl keyword general:layout master @@ -21,7 +21,7 @@ case $LAYOUT in hyprctl keyword unbind SUPER,O hyprctl keyword bind SUPER,J,layoutmsg,cyclenext hyprctl keyword bind SUPER,K,layoutmsg,cycleprev - dunstify -u low -i "$dunst_notif" "Master Layout" + notify-send -e -u low -i "$dunst_notif" "Master Layout" ;; *) ;; diff --git a/config/hypr/scripts/GameMode.sh b/config/hypr/scripts/GameMode.sh index 0e6f83af..678d282e 100755 --- a/config/hypr/scripts/GameMode.sh +++ b/config/hypr/scripts/GameMode.sh @@ -15,7 +15,7 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then keyword general:border_size 1;\ keyword decoration:rounding 0" swww kill - dunstify -u low -i "$dunst_notif" "gamemode enabled. All animations off" + notify-send -e -u low -i "$dunst_notif" "gamemode enabled. All animations off" exit else swww init && swww img "$HOME/.config/rofi/.current_wallpaper" @@ -23,7 +23,7 @@ else ${SCRIPTSDIR}/PywalSwww.sh sleep 0.5 ${SCRIPTSDIR}/Refresh.sh - dunstify -u normal -i "$dunst_notif" "gamemode disabled. All animations normal" + notify-send -e -u normal -i "$dunst_notif" "gamemode disabled. All animations normal" exit fi hyprctl reload diff --git a/config/hypr/scripts/PywalSwaync.sh b/config/hypr/scripts/PywalSwaync.sh new file mode 100755 index 00000000..aad1acb8 --- /dev/null +++ b/config/hypr/scripts/PywalSwaync.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +pkill swaync + +sleep 0.3 +swaync > /dev/null 2>&1 &
\ No newline at end of file diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 0d91de8d..dd773ef2 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -16,7 +16,10 @@ waybar & sleep 0.1 # Relaunch dunst with pywal-borders -${SCRIPTSDIR}/PywalDunst.sh & +# ${SCRIPTSDIR}/PywalDunst.sh & + +# Relaunch swaync with pywal-borders +${SCRIPTSDIR}/PywalSwaync.sh # Relaunching rainbow borders sleep 1 diff --git a/config/hypr/scripts/RofiBeats.sh b/config/hypr/scripts/RofiBeats.sh index e0cc6f74..c8e8e43e 100755 --- a/config/hypr/scripts/RofiBeats.sh +++ b/config/hypr/scripts/RofiBeats.sh @@ -21,7 +21,7 @@ declare -A menu_options=( # Function for displaying notifications notification() { - dunstify -u normal -i "$iDIR/music.png" "Playing now: $@" + notify-send -u normal -i "$iDIR/music.png" "Playing now: $@" } # Main function @@ -45,4 +45,4 @@ main() { } # Check if an online music process is running and send a notification, otherwise run the main function -pkill -f http && dunstify -u low -i "$iDIR/music.png" "Online Music stopped" || main +pkill -f http && notify-send -u low -i "$iDIR/music.png" "Online Music stopped" || main diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 29fe776a..06826275 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -7,7 +7,7 @@ dir="$(xdg-user-dir)/Pictures/Screenshots" file="Screenshot_${time}_${RANDOM}.png" # notify and view screenshot -notify_cmd_shot="dunstify -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" +notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" notify_view() { ${notify_cmd_shot} "Copied to clipboard." ## viewnior ${dir}/"$file" @@ -21,7 +21,7 @@ notify_view() { # countdown countdown() { for sec in $(seq $1 -1 1); do - dunstify -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec" + notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec" sleep 1 done } diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index d0eb0b68..9aaf8a8c 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -29,9 +29,9 @@ get_icon() { # Notify notify_user() { if [[ "$(get_volume)" == "Muted" ]]; then - dunstify -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: Muted" + notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: Muted" else - dunstify -h int:value:"$(get_volume | sed 's/%//')" -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)" + notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)" fi } @@ -54,18 +54,18 @@ dec_volume() { # Toggle Mute toggle_mute() { if [ "$(pamixer --get-mute)" == "false" ]; then - pamixer -m && dunstify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF" + pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF" elif [ "$(pamixer --get-mute)" == "true" ]; then - pamixer -u && dunstify -u low -i "$(get_icon)" "Volume Switched ON" + pamixer -u && notify-send -e -u low -i "$(get_icon)" "Volume Switched ON" fi } # Toggle Mic toggle_mic() { if [ "$(pamixer --default-source --get-mute)" == "false" ]; then - pamixer --default-source -m && dunstify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF" + pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF" elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then - pamixer -u --default-source u && dunstify -u low -i "$iDIR/microphone.png" "Microphone Switched ON" + pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON" fi } # Get Mic Icon @@ -92,7 +92,7 @@ get_mic_volume() { notify_mic_user() { volume=$(get_mic_volume) icon=$(get_mic_icon) - dunstify -h int:value:"$volume" -h "string:x-dunst-stack-tag:volume_notif" -u low -i "$icon" "Mic-Level: $volume" + notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" "Mic-Level: $volume" } # Increase MIC Volume |
