commit 4e6af50bcaa901c41079a04679d399909ab191cc parent 75807e9c166ca9e9e14664cf78415fe6a1465737 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Sun, 6 Jan 2019 21:45:14 +0100 Add screen capture bindings and lukesmithxyz maimpick Diffstat:
M | links/.config/i3/config | | | 5 | +++++ |
M | links/.config/newsboat/config | | | 4 | ++-- |
A | links/bin/maimpick | | | 9 | +++++++++ |
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/links/.config/i3/config b/links/.config/i3/config @@ -121,6 +121,11 @@ bindsym XF86Launch1 exec --no-startup-id xrandr --output LVDS1 --auto --scale 1. bindsym XF86ScreenSaver exec ~/bin/xlock bindsym XF86Sleep exec ~/bin/zzz +# screen capture +bindsym Print exec --no-startup-id maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" +bindsym Shift+Print exec --no-startup-id ~/bin/maimpick +bindsym $mod+Scroll_Lock exec --no-startup-id "killall screenkey || screenkey" + # kill focused window bindsym $mod+q kill diff --git a/links/.config/newsboat/config b/links/.config/newsboat/config @@ -8,8 +8,8 @@ bind-key g home bind-key G end bind-key s sort bind-key S rev-sort -#bind-key o open-in-browser-and-mark-read -bind-key o open-in-browser +bind-key o open-in-browser-and-mark-read +#bind-key o open-in-browser bind-key O open-all-unread-in-browser-and-mark-read bind-key | pipe-to bind-key ^U pageup diff --git a/links/bin/maimpick b/links/bin/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