xrootdatetime: double dipping

sh-initrd-on-root
Zynh Ludwig 2024-10-15 14:42:31 -07:00
parent ee16a78d1b
commit c20c63f6ea
1 changed files with 9 additions and 1 deletions

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" ];