1.7 KiB
1.7 KiB
1. Add the Home Manager module
- 1.1 Create
modules/home-manager/gif-recorder/default.nixwithcustom.gif-recorder.enableand an enabled-only configuration. - 1.2 Install
wf-recorder,slurp,ffmpeg, andwl-clipboardthrough the module and expose onegif-recorderscript in the user's session path. - 1.3 Implement the toggle state under
XDG_RUNTIME_DIR: start region selection/recording when idle, signal the active process on the second invocation, clean up on cancellation/interruption, and reject stale state. - 1.4 Finalize successful recordings with palette-based
ffmpegGIF encoding, timestamp the output below~/Pictures/Screenshots, and copy it withwl-copy --type image/gifwhile preserving the saved file if clipboard copy fails.
2. Wire the feature into the existing host
- 2.1 Import
../../modules/home-manager/gif-recorderand setcustom.gif-recorder.enable = trueinhosts/jpporta-nixos/home.nix. - 2.2 Add
SUPER + SHIFT + 5to the existingScreenshotssection ofmodules/home-manager/hyprland/default.nix, invokinggif-recorderso the same bind starts and stops the capture.
3. Verify the workflow
- 3.1 Evaluate/build the
jpporta-nixosHome Manager activation package and confirm the module and script parse successfully. - 3.2 Confirm the bind invokes the installed command and that the runtime dependency paths are available in the script.
- 3.3 In a live Hyprland session, select a region, stop with the same bind, and verify a timestamped GIF appears in
~/Pictures/Screenshotsand can be pasted from the Wayland clipboard. - 3.4 Verify canceling
slurp, stopping early, and an encoding failure leave no partial GIF and no stale runtime state.