aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'env/.local/bin')
-rwxr-xr-xenv/.local/bin/linkgrabber.sh4
-rwxr-xr-xenv/.local/bin/screenshot.sh11
2 files changed, 15 insertions, 0 deletions
diff --git a/env/.local/bin/linkgrabber.sh b/env/.local/bin/linkgrabber.sh
new file mode 100755
index 0000000..ab90f6c
--- /dev/null
+++ b/env/.local/bin/linkgrabber.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+regex='(((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]'
+url=$(grep -Po "$regex" | dmenu -p "Go:" -w "$WINDOWID" -l 10) || exit
+brave "$url"
diff --git a/env/.local/bin/screenshot.sh b/env/.local/bin/screenshot.sh
new file mode 100755
index 0000000..66d9c5c
--- /dev/null
+++ b/env/.local/bin/screenshot.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Screenshot via ImageMagick
+# Passes all args down to import command
+
+SCREENSHOTS_DIR=$HOME/Pictures/Screenshots
+FILENAME=$SCREENSHOTS_DIR/$(date +%F_%H-%M-%S).png
+
+echo "$@"
+
+mkdir -p $SCREENSHOTS_DIR
+import $@ $FILENAME && xclip -selection clipboard -target image/png -i < $FILENAME