aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/screenshot.sh
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-07-22 09:55:24 +0300
committereug-vs <eug-vs@keemail.me>2021-07-22 09:55:24 +0300
commite29c2ae94666914aa2bae2bcf48bfc28545d47b4 (patch)
tree33a193bbeb665a7036fe1fc53e9bfcb92a6db14e /env/.local/bin/screenshot.sh
parent0fb0039433c0777027f9f9fc63d6ec77117a7f48 (diff)
downloaddotfiles-e29c2ae94666914aa2bae2bcf48bfc28545d47b4.tar.gz
refactor: distribute scripts across packages
Diffstat (limited to 'env/.local/bin/screenshot.sh')
-rwxr-xr-xenv/.local/bin/screenshot.sh11
1 files changed, 11 insertions, 0 deletions
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