Author @[email protected]
The following two key bindings will add simple screen recording hotkeys:
- Mod+Shift+Alt+F11 records a region or the full screen to
~/Videos/screen_capture.mp4
- Mod+Shift+Alt+F12 records a region or the full screen to
~/Videos/screen_capture.mp4
with the audio output.
bindsym $mod+Shift+Alt+F11 exec pkill wf-recorder && notify-send "Video captured in ~/Videos/screen_capture.mp4" || wf-recorder -y -g "$(slurp)" -f ~/Videos/screen_capture.mp4 bindsym $mod+Shift+Alt+F12 exec pkill wf-recorder && notify-send "Video with audio output captured in ~/Videos/screen_capture.mp4" || wf-recorder -y -g "$(slurp)" -f ~/Videos/screen_capture.mp4 -a=alsa_output.platform-analog-sound.stereo-fallback.monitor
Hit the key combo, select the whole screen or the region you want to record, then hit the key combo again to stop the recording.
You need to install
wf-recorder
,slurp
andnotify-send
for those key bindings to work.In addition, for the Mod+Shift+Alt+F12 binding, you need Pulseaudio or Pipewire to capture the audio sink’s monitor, and you probably need to find out what name it has on your system and replace the name after
-a=
To figure out the name of the monitor, simply list the audio sources on your system:
$ pactl list sources | grep Name Name: alsa_output.platform-analog-sound.stereo-fallback.monitor Name: alsa_input.platform-analog-sound.stereo-fallback
Naturally, you can use any other source you want - your microphone for example if you want to talk over the screen capture.
You must log in or # to comment.