Commit 53c3c38

chasinglightning  ·  2025-06-09 19:08:59 -0400 EDT
parent 54db609
split screenshot scripts between ones for desktop and ones for laptop
4 files changed,  +38, -2
+1, -1
......@@ -5,7 +5,7 @@
55 # https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
66
77 export DISPLAY=:0
8-SHOTPATH="/home/kat/Pictures/Screenshots"
8+SHOTPATH="/media/kat/disk/Pictures/Screenshots"
99 COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}')
1010 FILE="$SHOTPATH/$COUNT.png"
1111
+14, -0
......@@ -0,0 +1,14 @@
1+#!/usr/bin/env bash
2+#
3+# modified from this GH script:
4+#
5+# https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
6+
7+export DISPLAY=:0
8+SHOTPATH="/home/kat/Pictures/Screenshots"
9+COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}')
10+FILE="$SHOTPATH/$COUNT.png"
11+
12+import -window root "$FILE" || exit 1
13+
14+notify-send "screenshot taken" "saved as ${FILE} in ${SHOTPATH}"
+1, -1
......@@ -5,7 +5,7 @@
55 # https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
66
77 export DISPLAY=:0
8-SHOTPATH="/home/kat/Pictures/Screenshots"
8+SHOTPATH="/media/kat/disk/Pictures/Screenshots"
99 COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}')
1010 FILE="$SHOTPATH/$COUNT.png"
1111
+22, -0
......@@ -0,0 +1,22 @@
1+#!/usr/bin/env bash
2+
3+# modified from this GH script:
4+#
5+# https://github.com/BreadOnPenguins/scripts/blob/master/screenshot_extra_features
6+
7+export DISPLAY=:0
8+SHOTPATH="/home/kat/Pictures/Screenshots"
9+COUNT=$(find $SHOTPATH -type f -printf x | wc -c | awk '{print $1+1}' | awk '{printf "%04d\n", $0}')
10+FILE="$SHOTPATH/$COUNT.png"
11+
12+
13+selection () { # draw a selection, or click to select a window
14+ import "$FILE" && post
15+}
16+
17+
18+post () { # copy image to clip & send a notification
19+ xclip -selection clipboard -t image/png -i $FILE && notify-send -i "$FILE" "$FILE copied to clipboard"
20+}
21+
22+selection