summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-12-18 22:32:56 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-12-18 22:32:56 +0800
commitb034860d40e068194085b13714ebdfdd678917a7 (patch)
tree6e1a8f079bcb903767d232b85920bf0349c18dd9
parent4e3dcc02d5f76111dda489c88fc15b9bea659898 (diff)
feat(hyprshot): use wayfreeze
-rwxr-xr-xhyprshot5
1 files changed, 4 insertions, 1 deletions
diff --git a/hyprshot b/hyprshot
index fe66073..720d485 100755
--- a/hyprshot
+++ b/hyprshot
@@ -74,7 +74,10 @@ shot10 () {
}
shotarea () {
- g=$(slurp -d) || exit 1
+ g=$(wayfreeze --after-freeze-cmd "slurp -d; killall wayfreeze")
+ if [[ -z "$g" ]]; then
+ exit 0
+ fi
grim -g "$g" - | copy_shot
notify_view
}