xrootdatetime: double dipping

This commit is contained in:
Zynh Ludwig 2024-10-15 14:42:31 -07:00
parent ee16a78d1b
commit c20c63f6ea

View file

@ -46,7 +46,15 @@ in
systemd.user.services.xrootdatetime = {
script = ''
while true; do
sleep 1 && date +"<-- %A, %B %d -- %H:%M -->" | xargs -I% ${getExe pkgs.xorg.xsetroot} -name %
micMuted=$(${getExe pkgs.pamixer} --default-source --get-mute)
if [[ "$micMuted" == "true" ]]; then
mutedString="Mic Muted "
else
mutedString=""
fi
dateTime=$(date +"<-- %A, %B %d -- %H:%M -->")
${getExe pkgs.xorg.xsetroot} -name "$mutedString$dateTime"
sleep 1
done
'';
wantedBy = [ "graphical-session.target" ];