summaryrefslogtreecommitdiff
path: root/scripts/Scripts/screenshot
diff options
context:
space:
mode:
authorbh <qn+git@epicurus.dev>2026-03-23 00:16:51 +0800
committerbh <qn+git@epicurus.dev>2026-03-23 00:16:51 +0800
commit5b63cb778a6ad0902bf40293c02c7a12de3e3c7d (patch)
tree659bef30189e6e5c28dc4148212059aba80eb063 /scripts/Scripts/screenshot
parenta16a2e3d85830082e3c33e318a4399859e4516b1 (diff)
Change Scripts to scripts
Diffstat (limited to 'scripts/Scripts/screenshot')
-rwxr-xr-xscripts/Scripts/screenshot15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/Scripts/screenshot b/scripts/Scripts/screenshot
new file mode 100755
index 0000000..5ed5b7d
--- /dev/null
+++ b/scripts/Scripts/screenshot
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+mkdir -p ~/Pictures/Screenshots
+
+FILE=~/Pictures/Screenshots/$(date '+%Y-%m-%d_%H-%M-%S').png
+
+if [[ "$1" == "snip" ]]; then
+ grim -g "$(slurp)" "$FILE" || exit 1
+else
+ grim "$FILE" || exit 1
+fi
+
+wl-copy --type image/png < "$FILE"
+
+notify-send "Screenshot Taken" "Saved to $FILE" -i "$FILE"