Updated screenshot hotkeys.

This commit is contained in:
Tom Alexander 2022-10-17 22:41:38 -04:00
parent a22ecfaae1
commit 0e9df5a5f0
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 8 additions and 5 deletions

View File

@ -24,3 +24,4 @@ set $menu /usr/local/bin/wofi --show drun --gtk-dark
bindsym $mod+grave exec $term bindsym $mod+grave exec $term
include ~/.config/sway/config.d/*.conf include ~/.config/sway/config.d/*.conf
include /etc/sway/config.d/*

View File

@ -1,7 +1,9 @@
# Screenshots # Screenshots
#bindsym $mod+print exec --no-startup-id slurp | grim -g - $(xdg-user-dir PICTURES)/$(date +'screenshot_%Y-%m-%d-%H%M%S.png') #bindsym $mod+print exec slurp | grim -g - $(xdg-user-dir PICTURES)/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
bindsym $mod+print exec --no-startup-id bash -c "slurp | grim -g - ~/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')" bindsym $mod+print exec slurp | grim -g - "$HOME/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')"
bindsym print exec --no-startup-id bash -c "grim ~/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')" bindsym print exec grim "$HOME/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')"
# bindsym $mod+Shift+print exec --no-startup-id bash -c "wf-recorder -g $(slurp) -o ~/$(date +'screencast_%Y-%m-%d-%H%M%S.mp4')" # Maybe add --audio flag? can optionally specify specific device name from `pactl list sources | grep Name`
# bindsym Shift+print exec --no-startup-id bash -c "wf-recorder -o ~/$(date +'screencast_%Y-%m-%d-%H%M%S.mp4')" bindsym $mod+Shift+print exec wf-recorder -g "$(slurp)" -f "$HOME/$(date +'screencast_%Y-%m-%d-%H%M%S.mkv')" -c h264_vaapi -d /dev/dri/renderD128
bindsym Shift+print exec wf-recorder -f "$HOME/$(date +'screencast_%Y-%m-%d-%H%M%S.mkv')" -c h264_vaapi -d /dev/dri/renderD128
bindsym $mod+ctrl+Shift+print exec killall -s SIGINT wf-recorder
# Need to make a hotkey to end the recording # Need to make a hotkey to end the recording