- maim
- xclip
Set this on your i3 config file ~/.i3/config
# Screenshots
bindsym Print exec --no-startup-id maim "/home/$USER/Pictures/$(date)"
bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/$(date)"
bindsym Shift+Print exec --no-startup-id maim --select "/home/$USER/Pictures/$(date)"
## 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
You may remove the default screenshot shortcuts to prevent error
Feature | Shortcut |
---|---|
Full Screen | PrtScrn |
Selection | Shift + PrtScrn |
Active Window | Super + PrtScrn |
Clipboard Full Screen | Ctrl + PrtScrn |
Clipboard Selection | Ctrl + Shift + PrtScrn |
Clipboard Active Window | Ctrl + Super + PrtScrn |
All the screen shots are saved on
~/Pictures/CURRENT_DATE
super
key is the windows key
Ubuntu 22.04
bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/screenshots/$(date)"
The above line was causing a duplication error, although that didn't seem obvious at first. Changing
$mod
toMod1
dealt with the error, however the command does not capture the active window. I can live it with it for now, as I really just wanted theselect
feature. So if anything, this comment is more of just a "fyi".