Next: , Previous: , Up: API  


1.6 (heks-linux gif)

Generates ~/.local/bin/gif-record, the screen-recording helper bound to Mod+Shift+G in the Niri configuration.

It is a toggle, not a recorder: the first invocation asks slurp for a region and starts wf-recorder in the background, writing its PID to a pid file. The second invocation signals that PID, waits for the encoder to flush, converts the intermediate MP4 to a palette-optimised GIF with ffmpeg, copies it to the clipboard with wl-copy and notifies the user through fyi.

Two details are load-bearing and worth preserving: the intermediate file is encoded with profile=main level=4.2 so that the system’s libopenh264 can decode it again, and the region geometry is forced to even dimensions with scale=trunc(iw/2)*2:trunc(ih/2)*2 because H.264 rejects odd widths and heights.

The script intentionally stays quiet on success and logs to /tmp/heks-wf-recorder.log and /tmp/heks-ffmpeg.log on failure.

1.6.1 Parameters

Parameter: gif-config-dir

Default value:

"/root/.local/bin"
Parameter: gif-config-filename

Default value:

"gif-record"
Parameter: gif-fps

Default value:

20
Parameter: gif-out-dir

Default value:

"/root"
Parameter: gif-pid-file

Default value:

"/tmp/heks-gif-wf-recorder.pid"
Parameter: gif-tmp-vid-file

Default value:

"/tmp/heks-gif-tmp-wf-recorder.mp4"

1.6.2 Procedures

Procedure: install-gif-config

Write the region GIF recorder to gif-config-dir with mode #o755.

Local overrides are read from $XDG_CONFIG_HOME/heks-linux/gif-settings.scm first, so gif-out-dir and gif-fps can be tweaked per machine.

Procedure: make-gif-recorder-script

Generates the Bash region GIF recording script as a string.


Next: (heks-linux git), Previous: (heks-linux fastfetch), Up: API