diff options
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 16 | ||||
| -rwxr-xr-x | config/hypr/scripts/Volume.sh | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index ddf4398b..fa1b40ad 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -3,6 +3,7 @@ # Screenshots scripts iDIR="$HOME/.config/swaync/icons" +sDIR="$HOME/.config/hypr/UserScripts" notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" time=$(date "+%d-%b_%H-%M-%S") @@ -18,13 +19,17 @@ notify_view() { if [[ "$1" == "active" ]]; then if [[ -e "${active_window_path}" ]]; then ${notify_cmd_shot} "Screenshot of '${active_window_class}' Saved." + "${sDIR}/Sounds.sh" --screenshot else ${notify_cmd_shot} "Screenshot of '${active_window_class}' not Saved" fi + elif [[ "$1" == "swappy" ]]; then + ${notify_cmd_shot} "Screenshot Captured." else local check_file="$dir/$file" if [[ -e "$check_file" ]]; then ${notify_cmd_shot} "Screenshot Saved." + "${sDIR}/Sounds.sh" --screenshot else ${notify_cmd_shot} "Screenshot NOT Saved." fi @@ -84,6 +89,13 @@ shotactive() { notify_view "active" } +shotswappy() { + tmpfile=$(mktemp) + grim -g "$(slurp)" - >"$tmpfile" && "${sDIR}/Sounds.sh" --screenshot && notify_view "swappy" + swappy -f - <"$tmpfile" + rm "$tmpfile" +} + if [[ ! -d "$dir" ]]; then mkdir -p "$dir" @@ -101,8 +113,10 @@ elif [[ "$1" == "--area" ]]; then shotarea elif [[ "$1" == "--active" ]]; then shotactive +elif [[ "$1" == "--swappy" ]]; then + shotswappy else - echo -e "Available Options : --now --in5 --in10 --win --area --active" + echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy" fi exit 0 diff --git a/config/hypr/scripts/Volume.sh b/config/hypr/scripts/Volume.sh index 1c18211f..8c5af5de 100755 --- a/config/hypr/scripts/Volume.sh +++ b/config/hypr/scripts/Volume.sh @@ -3,6 +3,7 @@ # Scripts for volume controls for audio and mic iDIR="$HOME/.config/swaync/icons" +sDIR="$HOME/.config/hypr/UserScripts" # Get Volume get_volume() { @@ -34,6 +35,7 @@ notify_user() { notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: Muted" else 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)" + "$sDIR/Sounds.sh" --volume fi } |
