swaync: refactor
This commit is contained in:
parent
ce991c8887
commit
0172aa0b69
|
@ -29,78 +29,33 @@ let
|
|||
'';
|
||||
};
|
||||
print-is-active = "${print-is-active'}/bin/print-is-active";
|
||||
|
||||
systemServiceButton = name: label: {
|
||||
# XXX: this is surely broken, due to sandboxing/perms
|
||||
inherit label;
|
||||
type = "toggle";
|
||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle} ${name}";
|
||||
update-command = "${print-is-active} ${name}.service";
|
||||
active = true;
|
||||
};
|
||||
userServiceButton = name: label: {
|
||||
inherit label;
|
||||
type = "toggle";
|
||||
command = "${systemctl-toggle} --user ${name}";
|
||||
update-command = "${print-is-active} --user ${name}";
|
||||
active = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
gps = {
|
||||
type = "toggle";
|
||||
label = ""; # GPS services; other icons: gps, ⌖, 🛰, 🌎,
|
||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle} eg25-control-gps";
|
||||
update-command = "${print-is-active} eg25-control-gps.service";
|
||||
active = true;
|
||||
};
|
||||
cell-modem = {
|
||||
type = "toggle";
|
||||
label = ""; # icons: 5g, 📡, 📱, ᯤ, ⚡, , 🌐, 📶, 🗼, , , ,
|
||||
# modem and NetworkManager auto-establishes a connection when powered.
|
||||
# though some things like `wg-home` VPN tunnel will remain routed over the old interface.
|
||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle} eg25-control-powered";
|
||||
update-command = "${print-is-active} eg25-control-powered.service";
|
||||
active = true;
|
||||
};
|
||||
vpn = {
|
||||
type = "toggle";
|
||||
label = "vpn::hn"; # route all traffic through servo; useful to debug moby's networking
|
||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle} wg-quick-vpn-servo";
|
||||
update-command = "${print-is-active} wg-quick-vpn-servo.service";
|
||||
active = true;
|
||||
};
|
||||
gnome-calls = {
|
||||
type = "toggle";
|
||||
label = "SIP";
|
||||
command = "${systemctl-toggle} --user gnome-calls";
|
||||
update-command = "${print-is-active} --user gnome-calls";
|
||||
active = true;
|
||||
};
|
||||
geary = {
|
||||
type = "toggle";
|
||||
label = ""; # email (Geary); other icons: ✉, [E], 📧,
|
||||
command = "${systemctl-toggle} --user geary";
|
||||
update-command = "${print-is-active} --user geary";
|
||||
active = true;
|
||||
};
|
||||
abaddon = {
|
||||
type = "toggle";
|
||||
label = ""; # Discord chat client; icons: , 🎮
|
||||
command = "${systemctl-toggle} --user abaddon";
|
||||
update-command = "${print-is-active} --user abaddon";
|
||||
active = true;
|
||||
};
|
||||
dissent = {
|
||||
type = "toggle";
|
||||
label = ""; # Discord chat client; icons: , 🎮
|
||||
command = "${systemctl-toggle} --user dissent";
|
||||
update-command = "${print-is-active} --user dissent";
|
||||
active = true;
|
||||
};
|
||||
signal-desktop = {
|
||||
type = "toggle";
|
||||
label = "💬"; # Signal messenger; other icons:
|
||||
command = "${systemctl-toggle} --user signal-desktop";
|
||||
update-command = "${print-is-active} --user signal-desktop";
|
||||
active = true;
|
||||
};
|
||||
dino = {
|
||||
type = "toggle";
|
||||
label = "XMPP"; # XMPP calls (jingle)
|
||||
command = "${systemctl-toggle} --user dino";
|
||||
update-command = "${print-is-active} --user dino";
|
||||
active = true;
|
||||
};
|
||||
fractal = {
|
||||
type = "toggle";
|
||||
label = "[m]"; # Matrix messages
|
||||
command = "${systemctl-toggle} --user fractal";
|
||||
update-command = "${print-is-active} --user fractal";
|
||||
active = true;
|
||||
};
|
||||
gps = systemServiceButton "eg25-control-gps" ""; # GPS services; other icons: gps, ⌖, 🛰, 🌎,
|
||||
cell-modem = systemServiceButton "eg25-control-powered" ""; # icons: 5g, 📡, 📱, ᯤ, ⚡, , 🌐, 📶, 🗼, , , ,
|
||||
vpn = systemServiceButton "wg-quick-vpn-servo" "vpn::hn";
|
||||
|
||||
gnome-calls = userServiceButton "gnome-calls" "SIP";
|
||||
geary = userServiceButton "geary" ""; # email (Geary); other icons: ✉, [E], 📧,
|
||||
abaddon = userServiceButton "abaddon" ""; # Discord chat client; icons: , 🎮
|
||||
dissent = userServiceButton "dissent" ""; # Discord chat client; icons: , 🎮
|
||||
signal-desktop = userServiceButton "signal-desktop" "💬"; # Signal messenger; other icons:
|
||||
dino = userServiceButton "dino" "XMPP"; # XMPP calls (jingle)
|
||||
fractal = userServiceButton "fractal" "[m]"; # Matrix messages
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user