From 723220028038a3c6e155259e28d07e867e2d45c9 Mon Sep 17 00:00:00 2001 From: krolyxon Date: Wed, 1 Jun 2022 22:55:52 +0530 Subject: first commit --- .local/bin/maimshot | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/bin/maimshot (limited to '.local/bin/maimshot') diff --git a/.local/bin/maimshot b/.local/bin/maimshot new file mode 100755 index 0000000..10335f6 --- /dev/null +++ b/.local/bin/maimshot @@ -0,0 +1,11 @@ +#!/bin/sh + +case "$(printf "a selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\na selected area\\ncurrent window\\nfull screen" | dmenu -l 6 -i -p "Screenshot which area?")" in + "a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; + "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; + "full screen (copy)") sleep 0.2 ; maim | xclip -selection clipboard -t image/png ;; + "a selected area") maim -s ~/pix/ss/pic-selected-"$(date '+%y-%m-%d-%H-%M').png" ;; + "current window") maim -i "$(xdotool getactivewindow)" ~/pix/ss/pic-window-"$(date '+%y-%m-%d-%H-%M').png" ;; + "full screen") sleep 0.2 ; maim ~/pix/ss/pic-full-"$(date '+%y-%m-%d-%H-%M').png" ;; + +esac -- cgit v1.2.3