summaryrefslogtreecommitdiff
path: root/private_dot_local/bin/executable_sway-shot-window-or-selection
diff options
context:
space:
mode:
Diffstat (limited to 'private_dot_local/bin/executable_sway-shot-window-or-selection')
-rw-r--r--private_dot_local/bin/executable_sway-shot-window-or-selection5
1 files changed, 5 insertions, 0 deletions
diff --git a/private_dot_local/bin/executable_sway-shot-window-or-selection b/private_dot_local/bin/executable_sway-shot-window-or-selection
new file mode 100644
index 0000000..404764e
--- /dev/null
+++ b/private_dot_local/bin/executable_sway-shot-window-or-selection
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3geom=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp -b 303030AA -B 303030AA)
4file=$(date "+$HOME/multimedia/screenshots/%Y%m%d-%H%M%S.png")
5grim -g "$geom" - | tee $file | wl-copy