diff options
author | eug-vs <eug-vs@keemail.me> | 2020-12-08 01:44:48 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-12-08 01:44:48 +0300 |
commit | 8115ca3e6e1c5f4d09019a798d6d75aad3413825 (patch) | |
tree | fd0a8f4a3b617cadc4688e1a08abfbfe803dfa6b /.local/bin/screenshot.sh | |
parent | 10f5a135bcf85446cddf282abf30010c74320fd8 (diff) | |
download | dotfiles-8115ca3e6e1c5f4d09019a798d6d75aad3413825.tar.gz |
refactor: move screenshot to separate script
Diffstat (limited to '.local/bin/screenshot.sh')
-rwxr-xr-x | .local/bin/screenshot.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh new file mode 100755 index 0000000..0fa365a --- /dev/null +++ b/.local/bin/screenshot.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# 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 |