summaryrefslogtreecommitdiff
path: root/bin/screenshot
diff options
context:
space:
mode:
authorpants <niklasjo2004@gmail.com>2026-09-23 13:02:47 -0700
committerpants <niklasjo2004@gmail.com>2026-09-23 13:02:47 -0700
commit704b84908f2d432596421d9328cad19238b8b68f (patch)
tree302e67666be9d0fd951153bcd3ea6719757f2b52 /bin/screenshot
parent7b21727285e50b0b050c4ddd70d07542229c5366 (diff)
back to maimin and sloppin
Diffstat (limited to 'bin/screenshot')
-rwxr-xr-xbin/screenshot26
1 files changed, 23 insertions, 3 deletions
diff --git a/bin/screenshot b/bin/screenshot
index 394e02c..c2049df 100755
--- a/bin/screenshot
+++ b/bin/screenshot
@@ -1,10 +1,30 @@
#!/bin/sh
FILENAME=$(date +%m-%d-%Y_%R:%S)
mkdir -p ~/pictures/screenshots
+
+# using ImageMagick's import
+#if [ $1 = 1 ]; then
+# import clipboard:
+# notify-send "Screenshot taken" "copied to clipboard" -i :
+#else
+# import -window root ~/pictures/screenshots/"$FILENAME".png
+# notify-send "Screenshot taken" "saved to ~/pictures/screenshots/$FILENAME.png" -i :
+#fi
+
+# using naelstrof's maim and slop
if [ $1 = 1 ]; then
- import clipboard:
- notify-send "Screenshot taken" "copied to clipboard" -i :
+ #maim -i $(xdotool getactivewindow) | xclip -selection clipboard -t image/png
+ CHOICE=$(printf "clipboard\nfile" | dmenu -c -i -l 2)
+ case $CHOICE in
+ "clipboard")
+ maim -s | xclip -selection clipboard -t image/png
+ notify-send "Screenshot taken" "copied to clipboard" -i :;;
+ "file")
+ maim -s ~/pictures/screenshots/"$FILENAME".bmp
+ notify-send "Screenshot taken" "saved to ~/pictures/screenshots/$FILENAME.bmp" -i :;;
+ esac
+
else
- import -window root ~/pictures/screenshots/"$FILENAME".png
+ maim ~/pictures/screenshots/"$FILENAME".bmp
notify-send "Screenshot taken" "saved to ~/pictures/screenshots/$FILENAME.png" -i :
fi