diff options
| author | KKV9 <ciaranob.cob@gmail.com> | 2024-01-27 23:59:42 +0000 |
|---|---|---|
| committer | KKV9 <ciaranob.cob@gmail.com> | 2024-01-27 23:59:42 +0000 |
| commit | 909b48934f6c5915c3cd67b4a55d3c40594bbbdd (patch) | |
| tree | d19fa6100950adb2c969fa34c819104edbdd2af2 /config | |
| parent | f9bc6913d974d5d1d328b2fb989841640ac93be0 (diff) | |
Fix last commit
Diffstat (limited to 'config')
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index d0ec1f5e..6b701ff2 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -19,19 +19,22 @@ notify_view() { if [[ "$1" == "active" ]]; then if [[ -e "${active_window_path}" ]]; then ${notify_cmd_shot} "Screenshot of '${active_window_class}' Saved." + paplay "${sDIR}/camera-shutter.oga" 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." + paplay "${sDIR}/camera-shutter.oga" else ${notify_cmd_shot} "Screenshot NOT Saved." fi fi - elif [[ "$1" == "swappy" ]]; then - ${notify_cmd_shot} "Screenshot Captured." + } @@ -77,13 +80,6 @@ shotarea() { notify_view } -shotswappy() { - tmpfile=$(mktemp) - grim -g "$(slurp)" - >"$tmpfile" && paplay "${sDIR}/camera-shutter.oga" && notify_view "swappy" - swappy -f - <"$tmpfile" - rm "$tmpfile" -} - shotactive() { active_window_class=$(hyprctl -j activewindow | jq -r '(.class)') active_window_file="Screenshot_${time}_${active_window_class}.png" @@ -94,6 +90,13 @@ shotactive() { notify_view "active" } +shotswappy() { + tmpfile=$(mktemp) + grim -g "$(slurp)" - >"$tmpfile" && paplay "${sDIR}/camera-shutter.oga" && notify_view "swappy" + swappy -f - <"$tmpfile" + rm "$tmpfile" +} + if [[ ! -d "$dir" ]]; then mkdir -p "$dir" |
