summaryrefslogtreecommitdiffstats
path: root/script/screenshot
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-15 02:51:09 +0100
committersumuel <samuel@yakubos.org>2026-08-15 02:51:09 +0100
commit41275257022dc3f256f2f3ead2dd24b8df235413 (patch)
treea0b9f46625bcda94888fb8eef0285e3179b2c4f7 /script/screenshot
parent9b55323cf7856371ae6c90d4c7899d4deb175dee (diff)
the screenshot scriptHEADmaster
Diffstat (limited to 'script/screenshot')
-rwxr-xr-xscript/screenshot8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/screenshot b/script/screenshot
new file mode 100755
index 0000000..b5b3e0a
--- /dev/null
+++ b/script/screenshot
@@ -0,0 +1,8 @@
+#!/bin/sh
+timeout 30 slurp > /tmp/selection.txt 2>/dev/null
+if [ $? -eq 0 ] && [ -s /tmp/selection.txt ]; then
+ grim -g "$(cat /tmp/selection.txt)" - | wl-copy
+else
+ grim - | wl-copy
+fi
+rm -f /tmp/selection.txt