Skip to content

Instantly share code, notes, and snippets.

@joshnix
Last active August 29, 2020 13:40
Show Gist options
  • Save joshnix/802c5e230763f3c269f792eb59cd1b79 to your computer and use it in GitHub Desktop.
Save joshnix/802c5e230763f3c269f792eb59cd1b79 to your computer and use it in GitHub Desktop.
A screenshot mode for i3
# ALL CREDIT GOES TO GAUTUM: github.com/quantumgc
# Take a screenshot
set $mode_screenshot screenshot | PrtSc - take shot, s - select area, f - select focused, [Shift+] - stay in screenshot mode
bindsym Print mode "$mode_screenshot"
mode "$mode_screenshot" {
set $def mode "default"
bindsym $esc $def
bindsym $ret $def
bindsym Print exec "scrot -e 'mv $f ~/Pictures/screenshots'"; $def
bindsym s exec "sleep 0.2; scrot -sf -e 'mv $f ~/Pictures/screenshots'"; $def
bindsym f exec "scrot -u -e 'mv $f ~/Pictures/screenshots'"; $def
bindsym Shift+Print exec "scrot -e 'mv $f ~/Pictures/screenshots'"
bindsym Shift+s exec "sleep 0.2; scrot -sf -e 'mv $f ~/Pictures/screenshots'"
bindsym Shift+f exec "scrot -u -e 'mv $f ~/Pictures/screenshots'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment