From 90bc4859e373456534a73ab9b29ad1c872a37e4a Mon Sep 17 00:00:00 2001 From: installer Date: Tue, 11 Feb 2025 12:13:45 +0900 Subject: Updated screenshots.sh --- config/hypr/scripts/ScreenShot.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index e0df2b86..852be4b0 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -2,21 +2,23 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Screenshots scripts -iDIR="$HOME/.config/swaync/icons" -sDIR="$HOME/.config/hypr/scripts" - +# variables time=$(date "+%d-%b_%H-%M-%S") dir="$(xdg-user-dir)/Pictures/Screenshots" file="Screenshot_${time}_${RANDOM}.png" +iDIR="$HOME/.config/swaync/icons" +iDoR="$HOME/.config/swaync/images" +sDIR="$HOME/.config/hypr/scripts" + active_window_class=$(hyprctl -j activewindow | jq -r '(.class)') active_window_file="Screenshot_${time}_${active_window_class}.png" active_window_path="${dir}/${active_window_file}" notify_cmd_base="notify-send -t 10000 -A action1=Open -A action2=Delete -h string:x-canonical-private-synchronous:shot-notify" -#notify_swappy="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png" notify_cmd_shot="${notify_cmd_base} -i ${iDIR}/picture.png " notify_cmd_shot_win="${notify_cmd_base} -i ${iDIR}/picture.png " +notify_cmd_NOT="notify-send -u low -i ${iDoR}/ja.png " # notify and view screenshot notify_view() { @@ -33,7 +35,7 @@ notify_view() { ;; esac else - ${notify_cmd_shot} " Screenshot of:" " ${active_window_class} NOT Saved." + ${notify_cmd_NOT} " Screenshot of:" " ${active_window_class} NOT Saved." "${sDIR}/Sounds.sh" --error fi @@ -63,14 +65,12 @@ notify_view() { ;; esac else - ${notify_cmd_shot} " Screenshot" " NOT Saved" + ${notify_cmd_NOT} " Screenshot" " NOT Saved" "${sDIR}/Sounds.sh" --error fi fi } - - # countdown countdown() { for sec in $(seq $1 -1 1); do -- cgit v1.2.3