summaryrefslogtreecommitdiff
path: root/.local/bin/screenshot
diff options
context:
space:
mode:
authorAdam <adam.moloney.stuck@gmail.com>2022-05-18 15:26:40 +0200
committeradamstuck <adam.moloney.stuck@gmail.com>2022-05-20 10:17:25 +0200
commit5b505b33eea12ebc23960bbf9bebeaed193ac85a (patch)
tree4668156440e5832e16adbcd1f0adc8a786c17e72 /.local/bin/screenshot
parent0398a81bdf7be08a07bded52d1eb60ed0a089f04 (diff)
merged printscreen and screenshot scripts
Diffstat (limited to '.local/bin/screenshot')
-rwxr-xr-x.local/bin/screenshot17
1 files changed, 15 insertions, 2 deletions
diff --git a/.local/bin/screenshot b/.local/bin/screenshot
index 3eb9ec1..502888f 100755
--- a/.local/bin/screenshot
+++ b/.local/bin/screenshot
@@ -1,4 +1,17 @@
#!/bin/sh
-sleep 0.2
-scrot --line mode=edge -s -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
+if [ ! -n "$1" ]; then
+ scrot -q 100 -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
+fi
+
+while [ -n "$1" ]; do # while loop starts
+ case "$1" in
+ -s)
+ sleep 0.2
+ scrot --line mode=edge -i -s -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
+ ;;
+ *) echo "Option $1 not recognized" ;;
+ esac
+ shift
+done
+