summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-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