From a0e3533f392b28d67a8145d2269ab450c5ef4e46 Mon Sep 17 00:00:00 2001 From: TheK4n Date: Thu, 19 May 2022 04:03:13 +0300 Subject: [PATCH] screenshots --- Makefile | 2 +- sub/i3/config | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index feb7db0..5e53494 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ gpg: echo -e "default-cache-ttl 1\nmax-cache-ttl 1" > ~/.gnupg/gpg-agent.conf; echo RELOADAGENT | gpg-connect-agent i3: - echo "sudo pacman -S nitrogen picom compton ttf-font-awesome" + echo "sudo pacman -S nitrogen picom compton ttf-font-awesome xdotool xclip maim" test -d ~/.config/i3 || \ mkdir -p ~/.config/i3 mkdir -p ~/.config/i3status diff --git a/sub/i3/config b/sub/i3/config index 5d50b36..203fc7b 100644 --- a/sub/i3/config +++ b/sub/i3/config @@ -194,3 +194,15 @@ bindsym $mod+r mode "resize" bar { status_command i3status } + + +# Screenshots +bindsym Print exec --no-startup-id maim "$HOME/Pictures/Screenshots/$(date +'%d-%m-%Y-%T').png" +bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "$HOME/Pictures/Screenshots/$(date +'%d-%m-%Y-%T').png" +bindsym Shift+Print exec --no-startup-id maim --select "$HOME/Pictures/Screenshots/$(date +'%d-%m-%Y-%T').png" + +## Clipboard Screenshots +bindsym Ctrl+Print exec --no-startup-id maim | xclip -selection clipboard -t image/png +bindsym Ctrl+$mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) | xclip -selection clipboard -t image/png +bindsym Ctrl+Shift+Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png +