From b6684fbdf0216474a1f78985e1e6563227879c4c Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 4 Jan 2019 10:57:19 -0500 Subject: [PATCH] switch to maim --- .config/i3/config | 4 ++-- .scripts/i3cmds/maimpick | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 .scripts/i3cmds/maimpick diff --git a/.config/i3/config b/.config/i3/config index cf4e4af..14cdb77 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -323,8 +323,8 @@ bindsym $mod+bracketright exec --no-startup-id lmc forward 10 bindsym $mod+Shift+bracketright exec --no-startup-id lmc forward 120 # For screenshots and recording -bindsym Print exec --no-startup-id scrot -bindsym Shift+Print exec --no-startup-id scrot -u +bindsym Print exec --no-startup-id maim +bindsym Shift+Print exec --no-startup-id maimpick bindsym $mod+Print exec --no-startup-id dmenurecord bindsym $mod+Scroll_Lock exec --no-startup-id "killall screenkey || screenkey" bindsym $mod+Delete exec $stoprec diff --git a/.scripts/i3cmds/maimpick b/.scripts/i3cmds/maimpick new file mode 100755 index 0000000..f3f72fe --- /dev/null +++ b/.scripts/i3cmds/maimpick @@ -0,0 +1,9 @@ +#!/bin/sh +case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfullscreen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in + "a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;; + "current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; + "full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;; + "a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; + "current window (copy)") maim -i | xclip -selection clipboard -t image/png ;; + "full screen (copy)") maim | xclip -selection clipboard -t image/png ;; +esac