Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 26, 2022 08:53 pm GMT

i3wm Screenshot Shortcuts

Have excellent screenshot shortcuts in your i3wm.

FeatureShortcut
Full ScreenPrtScrn
SelectionShift + PrtScrn
Active WindowSuper + PrtScrn
Clipboard Full ScreenCtrl + PrtScrn
Clipboard SelectionCtrl + Shift + PrtScrn
Clipboard Active WindowCtrl + Super + PrtScrn

All the screenshots are saved on ~/Pictures/CURRENT_DATE.
The key super refers to the modifier key (window/command or alt by default depending on config).

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config.

## Screenshotsbindsym 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 Screenshotsbindsym Ctrl+Print exec --no-startup-id maim | xclip -selection clipboard -t image/pngbindsym Ctrl+$mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) | xclip -selection clipboard -t image/pngbindsym Ctrl+Shift+Print exec --no-startup-id maim --select | xclip -selection clipboard -t image/png

You may want to remove the default or any other screenshot shortcuts to prevent errors.
Don't forget to reload your window manager super+ shift+ c.

The source of this information is from my gist My i3 shortcuts to take screenshots.


Original Link: https://dev.to/dianjuar/i3wm-screenshot-shortcuts-3n7b

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To