swaynotificationcenter: update config/patches to be compatible with 0.10.0
This commit is contained in:
parent
03c5f82dbf
commit
40e22533fb
|
@ -98,6 +98,20 @@ let
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
printIsActive = pkgs.writeShellApplication {
|
||||||
|
name = "print-is-active";
|
||||||
|
runtimeInputs = [
|
||||||
|
pkgs.systemd
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
if systemctl is-active "$@"; then
|
||||||
|
echo true
|
||||||
|
else
|
||||||
|
echo false
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sane.programs.swaynotificationcenter = {
|
sane.programs.swaynotificationcenter = {
|
||||||
|
@ -118,26 +132,6 @@ in
|
||||||
|
|
||||||
# prevent dbus from automatically activating swaync so i can manage it as a systemd service instead
|
# prevent dbus from automatically activating swaync so i can manage it as a systemd service instead
|
||||||
packageUnwrapped = pkgs.rmDbusServices (pkgs.swaynotificationcenter.overrideAttrs (upstream: {
|
packageUnwrapped = pkgs.rmDbusServices (pkgs.swaynotificationcenter.overrideAttrs (upstream: {
|
||||||
# allow toggle buttons:
|
|
||||||
patches = (upstream.patches or []) ++ [
|
|
||||||
# (pkgs.fetchpatch {
|
|
||||||
# url = "https://github.com/ErikReider/SwayNotificationCenter/pull/304.patch";
|
|
||||||
# name = "Add toggle button";
|
|
||||||
# hash = "sha256-bove2EXc5FZ5nN1X1FYOn3czCgHG03ibIAupJNoctiM=";
|
|
||||||
# })
|
|
||||||
(pkgs.fetchpatch {
|
|
||||||
# import of <https://github.com/ErikReider/SwayNotificationCenter/pull/304>
|
|
||||||
# as of 2023/11/08 the upstream patch has merge conflicts AND runtime issues (see wip-swaync-update nixos branch)
|
|
||||||
url = "https://git.uninsane.org/colin/SwayNotificationCenter/commit/d9a0d938b88cbee65cfaef887af77a5a23d5fe89.patch";
|
|
||||||
name = "Add toggle button";
|
|
||||||
hash = "sha256-bove2EXc5FZ5nN1X1FYOn3czCgHG03ibIAupJNoctiM=";
|
|
||||||
})
|
|
||||||
(pkgs.fetchpatch {
|
|
||||||
url = "https://git.uninsane.org/colin/SwayNotificationCenter/commit/f5d9405e040fc42ea98dc4d37202c85728d0d4fd.patch";
|
|
||||||
name = "toggleButton: change active field to be a command";
|
|
||||||
hash = "sha256-Y8fiZbAP9yGOVU3rOkZKO8TnPPlrGpINWYGaqeeNzF0=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
postPatch = (upstream.postPatch or "") + ''
|
postPatch = (upstream.postPatch or "") + ''
|
||||||
# XXX: this might actually be changing the DPI, not the scaling...
|
# XXX: this might actually be changing the DPI, not the scaling...
|
||||||
# in that case, it might be possible to do this in CSS
|
# in that case, it might be possible to do this in CSS
|
||||||
|
@ -407,7 +401,8 @@ in
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = ""; # GPS services; other icons: gps, ⌖, 🛰, 🌎,
|
label = ""; # GPS services; other icons: gps, ⌖, 🛰, 🌎,
|
||||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle eg25-control-gps";
|
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle eg25-control-gps";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active eg25-control-gps.service";
|
update-command = "${printIsActive}/bin/print-is-active eg25-control-gps.service";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
|
@ -415,28 +410,32 @@ in
|
||||||
# modem and NetworkManager auto-establishes a connection when powered.
|
# modem and NetworkManager auto-establishes a connection when powered.
|
||||||
# though some things like `wg-home` VPN tunnel will remain routed over the old interface.
|
# though some things like `wg-home` VPN tunnel will remain routed over the old interface.
|
||||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle eg25-control-powered";
|
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle eg25-control-powered";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active eg25-control-powered.service";
|
update-command = "${printIsActive}/bin/print-is-active eg25-control-powered.service";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
] ++ lib.optionals false [
|
] ++ lib.optionals false [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = "vpn::hn"; # route all traffic through servo; useful to debug moby's networking
|
label = "vpn::hn"; # route all traffic through servo; useful to debug moby's networking
|
||||||
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle wg-quick-vpn-servo";
|
command = "/run/wrappers/bin/sudo ${systemctl-toggle}/bin/systemctl-toggle wg-quick-vpn-servo";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active wg-quick-vpn-servo.service";
|
update-command = "${printIsActive}/bin/print-is-active wg-quick-vpn-servo.service";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
] ++ lib.optionals config.sane.programs.calls.config.autostart [
|
] ++ lib.optionals config.sane.programs.calls.config.autostart [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = "SIP";
|
label = "SIP";
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user gnome-calls";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user gnome-calls";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user gnome-calls";
|
update-command = "${printIsActive}/bin/print-is-active --user gnome-calls";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
] ++ lib.optionals config.sane.programs."gnome.geary".enabled [
|
] ++ lib.optionals config.sane.programs."gnome.geary".enabled [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = ""; # email (Geary); other icons: ✉, [E], 📧,
|
label = ""; # email (Geary); other icons: ✉, [E], 📧,
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user geary";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user geary";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user geary";
|
update-command = "${printIsActive}/bin/print-is-active --user geary";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
# ] ++ lib.optionals config.sane.programs.abaddon.enabled [
|
# ] ++ lib.optionals config.sane.programs.abaddon.enabled [
|
||||||
# # XXX: disabled in favor of gtkcord4: abaddon has troubles auto-connecting at start
|
# # XXX: disabled in favor of gtkcord4: abaddon has troubles auto-connecting at start
|
||||||
|
@ -444,35 +443,40 @@ in
|
||||||
# type = "toggle";
|
# type = "toggle";
|
||||||
# label = ""; # Discord chat client; icons: , 🎮
|
# label = ""; # Discord chat client; icons: , 🎮
|
||||||
# command = "${systemctl-toggle}/bin/systemctl-toggle --user abaddon";
|
# command = "${systemctl-toggle}/bin/systemctl-toggle --user abaddon";
|
||||||
# active = "${pkgs.systemd}/bin/systemctl is-active --user abaddon";
|
# update-command = "${printIsActive}/bin/print-is-active --user abaddon";
|
||||||
|
# active = true;
|
||||||
# }
|
# }
|
||||||
] ++ lib.optionals config.sane.programs.gtkcord4.enabled [
|
] ++ lib.optionals config.sane.programs.gtkcord4.enabled [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = ""; # Discord chat client; icons: , 🎮
|
label = ""; # Discord chat client; icons: , 🎮
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user gtkcord4";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user gtkcord4";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user gtkcord4";
|
update-command = "${printIsActive}/bin/print-is-active --user gtkcord4";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
] ++ lib.optionals config.sane.programs.signal-desktop.enabled [
|
] ++ lib.optionals config.sane.programs.signal-desktop.enabled [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = "💬"; # Signal messenger; other icons:
|
label = "💬"; # Signal messenger; other icons:
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user signal-desktop";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user signal-desktop";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user signal-desktop";
|
update-command = "${printIsActive}/bin/print-is-active signal-desktop";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
] ++ lib.optionals config.sane.programs.dino.enabled [
|
] ++ lib.optionals config.sane.programs.dino.enabled [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = "XMPP"; # XMPP calls (jingle)
|
label = "XMPP"; # XMPP calls (jingle)
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user dino";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user dino";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user dino";
|
update-command = "${printIsActive}/bin/print-is-active --user dino";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
] ++ lib.optionals config.sane.programs.fractal.enabled [
|
] ++ lib.optionals config.sane.programs.fractal.enabled [
|
||||||
{
|
{
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
label = "[m]"; # Matrix messages
|
label = "[m]"; # Matrix messages
|
||||||
command = "${systemctl-toggle}/bin/systemctl-toggle --user fractal";
|
command = "${systemctl-toggle}/bin/systemctl-toggle --user fractal";
|
||||||
active = "${pkgs.systemd}/bin/systemctl is-active --user fractal";
|
update-command = "${printIsActive}/bin/print-is-active --user fractal";
|
||||||
|
active = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user