summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorAdam <56338480+adastx@users.noreply.github.com>2022-05-18 15:26:40 +0200
committerAdam <56338480+adastx@users.noreply.github.com>2022-05-18 15:26:40 +0200
commit77e73ca5f8d4f2cd676648c23d2b331a981b9f4c (patch)
tree7db54eccebadfb5359e5fa372dc51417ef1e1dce /.local
parent5303a93e873b8eb48192a6e7ba9d3d9a0821d94d (diff)
merged printscreen and screenshot scripts
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/printscreen3
-rwxr-xr-x.local/bin/screenshot17
2 files changed, 15 insertions, 5 deletions
diff --git a/.local/bin/printscreen b/.local/bin/printscreen
deleted file mode 100755
index 588b15b..0000000
--- a/.local/bin/printscreen
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-scrot -q 100 -e 'xclip -selection c -t image/png < $f; mv $f ~/Pictures/screenshots/'
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
+