refactor(recording): inline status icon
This commit is contained in:
@@ -7,8 +7,6 @@
|
|||||||
}:
|
}:
|
||||||
# Keybound screen recording: pick a region, then toggle a video-only capture.
|
# Keybound screen recording: pick a region, then toggle a video-only capture.
|
||||||
let
|
let
|
||||||
recordingIcon = util.glyph "f03d";
|
|
||||||
|
|
||||||
# A single key both starts and stops.
|
# A single key both starts and stops.
|
||||||
# A running wf-recorder is stopped with SIGINT so it finalises the file.
|
# 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
|
# 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.
|
# Empty text collapses the widget when idle, so it shows nothing until then.
|
||||||
recordingStatus = pkgs.writeShellScript "waybar-recording-status" ''
|
recordingStatus = pkgs.writeShellScript "waybar-recording-status" ''
|
||||||
if ${lib.getExe' pkgs.procps "pgrep"} -x wf-recorder >/dev/null; then
|
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
|
else
|
||||||
printf '{"text":"","class":"idle"}\n'
|
printf '{"text":"","class":"idle"}\n'
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user