xrootdatetime: fixing crash on initial boot
xrootdatetime: trying to fix crashes xrootdatetime: allow errorsmain
parent
28573bd36d
commit
b0c18c7c15
|
@ -44,15 +44,25 @@ in
|
|||
};
|
||||
|
||||
systemd.user.services.xrootdatetime = {
|
||||
script = ''
|
||||
script =
|
||||
let
|
||||
pamixer = getExe pkgs.pamixer;
|
||||
xsetroot = getExe pkgs.xorg.xsetroot;
|
||||
in
|
||||
/* bash */ ''
|
||||
while true; do
|
||||
if [[ "$(${getExe pkgs.pamixer} --default-source --get-mute)" == "true" ]]; then
|
||||
set +e # allow errors
|
||||
mute="$(${pamixer} --default-source --get-mute)"
|
||||
set -e # disallow errors
|
||||
|
||||
if [[ "$mute" == "true" ]]; then
|
||||
mutedString="Mic Muted "
|
||||
else
|
||||
mutedString=""
|
||||
fi
|
||||
|
||||
dateTime=$(date +"<-- %A, %B %d -- %H:%M -->")
|
||||
${getExe pkgs.xorg.xsetroot} -name "$mutedString$dateTime"
|
||||
${xsetroot} -name "$mutedString$dateTime"
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
|
|
Loading…
Reference in New Issue