summaryrefslogtreecommitdiffstats
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
parent9b55323cf7856371ae6c90d4c7899d4deb175dee (diff)
the screenshot scriptHEADmaster
-rw-r--r--script/README2
-rwxr-xr-xscript/screenshot8
2 files changed, 10 insertions, 0 deletions
diff --git a/script/README b/script/README
new file mode 100644
index 0000000..30f6aba
--- /dev/null
+++ b/script/README
@@ -0,0 +1,2 @@
+This is the script used for taking screenshots, it is put int /usr/local/bin
+I got the script from https://tonybtw.com/tutorial/dwl/
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