set $mode_screenshot (a)ll | (r)egion
mode "$mode_screenshot" {
bindsym a exec grim $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
- bindsym r exec slurp | grim -g - $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
+ bindsym r exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/shots/$(date +'%Y-%m-%d-%H%M%S.png'); mode default
bindsym Escape mode default
bindsym q mode default