Scripts to use with wf-recorder and waybar for screen recording.
Find a file
2021-09-06 21:54:14 -04:00
LICENSE Initial commit 2021-09-06 21:41:28 -04:00
README.md Update README 2021-09-06 21:54:14 -04:00
record-screen Add initial code 2021-09-06 21:42:22 -04:00
record-screend Add initial code 2021-09-06 21:42:22 -04:00

wayland-recorder

Scripts to use with wf-recorder and waybar for screen recording

Dependencies

waybar can optionally be used to show that a recording is in progress, but is not strictly necessary.

Setup

record-screen is the main script. It is intended to be bound to a hot key. Upon the first invocation, it runs slurp to let you select an area of the screen to record, and then runs wf-recorder in the background. By default, it records to ~/Videos/Recordings, but this can be changed by editing the script. On a second invocation, it stops the recording.

To use it, you can, for example, configure sway as such:

bindsym $mod+print exec exec <path to record-screen>

Waybar integration

record-screend can be used to create a custom waybar widget which shows if a recording is in progress.

This is an example configuration:

    "custom/recording": {
        "exec": "exec <path to record-screend>",
        "exec-on-event": false,
        "on-click": "pkill -INT -P \"$(pgrep -xo record-screen)\" wf-recorder"
    },

This configuration also allows you to terminate the current recording by simply clicking the message.

Note that the script attempts to display an icon with Font Awesome. If this is not desired, the script could be edited to remove it.