Enable swaync only on sway

This commit is contained in:
Natsu Kagami 2024-05-28 22:02:40 +02:00
parent 666478ad36
commit 8eca740ad3
Signed by: nki
GPG key ID: 55A032EB38B49ADB

View file

@ -5,25 +5,13 @@ let
swaync = pkgs.swaynotificationcenter; swaync = pkgs.swaynotificationcenter;
in in
with lib; mkIf (config.linux.graphical.type == "wayland") { with lib; mkIf (config.linux.graphical.type == "wayland") {
home.packages = [ swaync ]; services.swaync = {
wayland.windowManager.sway.config = { enable = true;
startup = [ settings.widgets = [ "inhibitors" "title" "dnd" "mpris" "notifications" ];
{ command = "swaync"; } style = ./swaync.css;
];
};
xdg.configFile = {
"swaync/config.json" = {
text = builtins.toJSON {
widgets = [ "inhibitors" "title" "dnd" "mpris" "notifications" ];
scripts = { };
};
onChange = "swaync-client -R";
};
"swaync/style.css" = {
source = ./swaync.css;
onChange = "swaync-client -rs";
};
}; };
systemd.user.services.swaync.Install.WantedBy = lib.mkForce [ "sway-session.target" ];
systemd.user.services.swaync.Unit.PartOf = lib.mkForce [ "sway-session.target" ];
programs.my-sway.waybar = { programs.my-sway.waybar = {
extraSettings = { extraSettings = {