1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(i3status-rust): hide todo and vpn when empty

This commit is contained in:
2022-08-22 10:28:06 +02:00
parent a5f6a46262
commit 5930340a05

View File

@@ -35,6 +35,7 @@ in {
};
icons.name = "awesome6";
icons.overrides.rss = "";
icons.overrides.vpn = "";
block = [
{
block = "weather";
@@ -131,16 +132,19 @@ in {
}'
'';
json = true;
hide_when_empty = true;
}
{
block = "custom";
interval = 5;
command = pkgs.writers.writeDash "hu-berlin-vpn" ''
PATH=${lib.makeBinPath [pkgs.systemd]}
(systemctl is-active --quiet openvpn-hu-berlin.service && echo "OVPN") \
|| (systemctl is-active --quiet hu-vpn.service && echo "PPP-VPN") \
|| :
(systemctl is-active --quiet openvpn-hu-berlin.service && echo '{"state": "Good", "text": "OpenVPN", "icon": "vpn"}') \
|| (systemctl is-active --quiet hu-vpn.service && echo '{"state": "Good", "text": "PPP+SSL", "icon": "vpn"}') \
|| echo '{"state": "Idle", "icon": "vpn", "text": ""}'
'';
json = true;
hide_when_empty = true;
}
{
block = "net";