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";
|
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
|
in
|
||||||
{
|
{
|
||||||
gps = {
|
gps = systemServiceButton "eg25-control-gps" ""; # GPS services; other icons: gps, ⌖, 🛰, 🌎,
|
||||||
type = "toggle";
|
cell-modem = systemServiceButton "eg25-control-powered" ""; # icons: 5g, 📡, 📱, ᯤ, ⚡, , 🌐, 📶, 🗼, , , ,
|
||||||
label = ""; # GPS services; other icons: gps, ⌖, 🛰, 🌎,
|
vpn = systemServiceButton "wg-quick-vpn-servo" "vpn::hn";
|
||||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle} eg25-control-gps";
|
|
||||||
update-command = "${print-is-active} eg25-control-gps.service";
|
gnome-calls = userServiceButton "gnome-calls" "SIP";
|
||||||
active = true;
|
geary = userServiceButton "geary" ""; # email (Geary); other icons: ✉, [E], 📧,
|
||||||
};
|
abaddon = userServiceButton "abaddon" ""; # Discord chat client; icons: , 🎮
|
||||||
cell-modem = {
|
dissent = userServiceButton "dissent" ""; # Discord chat client; icons: , 🎮
|
||||||
type = "toggle";
|
signal-desktop = userServiceButton "signal-desktop" "💬"; # Signal messenger; other icons:
|
||||||
label = ""; # icons: 5g, 📡, 📱, ᯤ, ⚡, , 🌐, 📶, 🗼, , , ,
|
dino = userServiceButton "dino" "XMPP"; # XMPP calls (jingle)
|
||||||
# modem and NetworkManager auto-establishes a connection when powered.
|
fractal = userServiceButton "fractal" "[m]"; # Matrix messages
|
||||||
# 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;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user