Next: (heks-linux git), Previous: (heks-linux fastfetch), Up: API
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.
Default value:
"/root/.local/bin"
Default value:
"gif-record"
Default value:
20
Default value:
"/root"
Default value:
"/tmp/heks-gif-wf-recorder.pid"
Default value:
"/tmp/heks-gif-tmp-wf-recorder.mp4"
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.
Generates the Bash region GIF recording script as a string.
Next: (heks-linux git), Previous: (heks-linux fastfetch), Up: API