summaryrefslogtreecommitdiff
path: root/mut/bin
diff options
context:
space:
mode:
authorMike Vink <ivi@vinkies.net>2024-09-05 11:47:27 +0200
committerMike Vink <ivi@vinkies.net>2024-09-05 11:47:27 +0200
commitb89f42a3ac8d42da4c5ce4340c33a759dc703a4a (patch)
tree72e4f2d442eb76c8344628158decc16ef76c5e8a /mut/bin
parentde034b4197adf5c768330dbd2c21e844762056fa (diff)
some tweaks to make copying better
Diffstat (limited to 'mut/bin')
-rwxr-xr-xmut/bin/maimpick20
-rwxr-xr-xmut/bin/passmenu2
2 files changed, 13 insertions, 9 deletions
diff --git a/mut/bin/maimpick b/mut/bin/maimpick
index 5de26c1..00a0c98 100755
--- a/mut/bin/maimpick
+++ b/mut/bin/maimpick
@@ -6,13 +6,17 @@
# variables
output="$(date '+%y%m%d-%H%M-%S').png"
-xclip_cmd="xclip -sel clip -t image/png"
+clip() {
+ xclip -f -t image/png | xclip -sel c -t image/png
+}
-case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
- "a selected area") maim -u -s pic-selected-"${output}" ;;
- "current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
- "full screen") maim -q -d 0.2 pic-full-"${output}" ;;
- "a selected area (copy)") maim -u -s | ${xclip_cmd} ;;
- "current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
- "full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;;
+case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (save)\\ncurrent window (save)\\nfull screen (save)" | dmenu -l 6 -i -p "Screenshot which area?")" in
+ "a selected area") maim -u -s | clip ;;
+ "current window")
+ echo "$(xdotool getactivewindow)"
+ maim -q -d 0.2 -i "$(xdotool getactivewindow)" | clip ;;
+ "full screen") maim -q -d 0.2 | clip ;;
+ "a selected area (save)") maim -u -s pic-selected-"${output}" ;;
+ "current window (save)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
+ "full screen (save)") maim -q -d 0.2 pic-full-"${output}" ;;
esac
diff --git a/mut/bin/passmenu b/mut/bin/passmenu
index 1af4a02..345c0ae 100755
--- a/mut/bin/passmenu
+++ b/mut/bin/passmenu
@@ -20,6 +20,6 @@ fi
[[ -n $password ]] || exit
- pass show -c "$password"
+ pass show "$password" | head -n1 | xclip -f | xclip -f -sel c
) >/tmp/debug 2>&1