home/programs/waybar: configure notifications
This commit is contained in:
parent
3cde68e4a9
commit
a1f29d7417
2 changed files with 16 additions and 8 deletions
|
@ -28,7 +28,12 @@ in {
|
||||||
modules-center = ["group/clock"];
|
modules-center = ["group/clock"];
|
||||||
modules-right =
|
modules-right =
|
||||||
["tray" "group/status" "group/power"]
|
["tray" "group/status" "group/power"]
|
||||||
++ lib.optional config.services.swaync.enable "custom/notification";
|
++ lib.optional config.services.swaync.enable "custom/swaync";
|
||||||
|
|
||||||
|
tray = {
|
||||||
|
icon-size = 16;
|
||||||
|
spacing = 12;
|
||||||
|
};
|
||||||
|
|
||||||
battery = {
|
battery = {
|
||||||
interval = 10;
|
interval = 10;
|
||||||
|
@ -154,24 +159,27 @@ in {
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(mkIf config.services.swaync.enable {
|
(mkIf config.services.swaync.enable {
|
||||||
"custom/notification" = {
|
"custom/swaync" = {
|
||||||
tooltip = false;
|
format = "<big>{icon}</big>";
|
||||||
format = "{icon} ";
|
|
||||||
format-icons = {
|
format-icons = {
|
||||||
notification = "";
|
notification = "";
|
||||||
none = "";
|
none = "";
|
||||||
dnd-notification = "";
|
dnd-notification = "";
|
||||||
dnd-none = "";
|
dnd-none = "";
|
||||||
};
|
};
|
||||||
|
max-length = 3;
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec = "swaync-client -swb";
|
escape = true;
|
||||||
on-click = "swaync-client -t -sw";
|
exec-if = "which ${pkgs.swaynotificationcenter}/bin/swaync-client";
|
||||||
|
exec = "${pkgs.swaynotificationcenter}/bin/swaync-client --subscribe-waybar";
|
||||||
|
on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-panel --skip-wait";
|
||||||
|
on-click-middle = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
|
||||||
|
tooltip-format = " {} notification(s)";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.pavucontrol
|
pkgs.pavucontrol
|
||||||
];
|
];
|
||||||
|
|
|
@ -86,6 +86,6 @@ window#waybar {
|
||||||
color: @base08;
|
color: @base08;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-notification {
|
#custom-swaync {
|
||||||
padding: 0 1.2em;
|
padding: 0 1.2em;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue