Commit fc0ab8828fe8

Vincent Demeester <vincent@sbr.pm>
2018-10-03 21:46:59
scripts: fix shot, add shotf (fullscreen)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 0329f6d
Changed files (2)
pkgs
scripts
pkgs/scripts/bin/shot
@@ -3,7 +3,7 @@
 maim -g $(slop; sleep ${2:-0}) | {
     case $1 in
 	%c) to='clipboard'; xclip -selection clipboard -t image/png ;;
-	%d) to=~/desk/Screenshot_$(date +'%Y-%m-%d_%H:%M:%S').png; cat > "$to" ;;
+	%d) to=~/desktop/pictures/screenshots/$(hostname)/$(date +'%Y-%m-%d-%H%M%S').png; cat > "$to" ;;
 	*)  to=$1; cat > "$to" ;;
     esac
     notify-send -i accessories-screenshot 'Screenshot Taken' "Saved to $to"
pkgs/scripts/bin/shotf
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+maim | {
+    case $1 in
+	%c) to='clipboard'; xclip -selection clipboard -t image/png ;;
+	%d) to=~/desktop/pictures/screenshots/$(hostname)/$(date +'%Y-%m-%d-%H%M%S').png; cat > "$to" ;;
+	*)  to=$1; cat > "$to" ;;
+    esac
+    notify-send -i accessories-screenshot 'Screenshot Taken' "Saved to $to"
+}