feat(sway): show mullvad status in bar
This commit is contained in:
parent
2f568eb88f
commit
ba2b507568
1 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
# TODO: turn off primary selection
|
||||||
programs.sway.enable = true;
|
programs.sway.enable = true;
|
||||||
|
|
||||||
home-manager.users.buffet = {
|
home-manager.users.buffet = {
|
||||||
|
@ -46,7 +47,13 @@
|
||||||
charge=+
|
charge=+
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s %s ' "$charge$((energy_now * 100 / energy_full))%" "$(date +'%H:%M')"
|
if ${pkgs.mullvad}/bin/mullvad status | grep -q 'Connected to'; then
|
||||||
|
mullvad='&'
|
||||||
|
else
|
||||||
|
mullvad=
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf '%s %s %s ' "$mullvad" "$charge$((energy_now * 100 / energy_full))%" "$(date +'%H:%M')"
|
||||||
|
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue