refactor(recording): inline status icon

This commit is contained in:
2026-10-11 20:22:56 -04:00
parent a5846a6c1c
commit b34aaf7f1e

View File

@@ -7,8 +7,6 @@
}:
# Keybound screen recording: pick a region, then toggle a video-only capture.
let
recordingIcon = util.glyph "f03d";
# A single key both starts and stops.
# A running wf-recorder is stopped with SIGINT so it finalises the file.
# Otherwise slurp picks a region and wf-recorder runs in the foreground until
@@ -35,7 +33,7 @@ let
# Empty text collapses the widget when idle, so it shows nothing until then.
recordingStatus = pkgs.writeShellScript "waybar-recording-status" ''
if ${lib.getExe' pkgs.procps "pgrep"} -x wf-recorder >/dev/null; then
printf '{"text":"${recordingIcon}","tooltip":"Recording","class":"recording"}\n'
printf '{"text":"${util.glyph "f03d"}","tooltip":"Recording","class":"recording"}\n'
else
printf '{"text":"","class":"idle"}\n'
fi