Add SwayNotificationCenter
diff --git a/flake.nix b/flake.nix
index d100c51..5f96900 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
+ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-21.11";
nurpkgs.url = "github:nix-community/NUR";
comma.url = "github:nix-community/comma";
diff --git a/src/apps/personal/swaynotificationcenter.nix b/src/apps/personal/swaynotificationcenter.nix
new file mode 100644
index 0000000..7414566
--- /dev/null
+++ b/src/apps/personal/swaynotificationcenter.nix
@@ -0,0 +1,5 @@
+{ nixpkgs-unstable, ... }: {
+ home.packages = with nixpkgs-unstable; [
+ swaynotificationcenter
+ ];
+}
diff --git a/src/apps/personal/waybar.nix b/src/apps/personal/waybar.nix
index 66cae02..c3d1f83 100644
--- a/src/apps/personal/waybar.nix
+++ b/src/apps/personal/waybar.nix
@@ -7,7 +7,7 @@
modules-center = ["sway/window"];
- modules-right = ["backlight" "pulseaudio" "network" "battery" "clock" "tray"];
+ modules-right = ["backlight" "pulseaudio" "network" "battery" "clock" "custom/notification" "tray"];
modules = {
battery.bat = "BAT0";
@@ -18,6 +18,22 @@
format = "{:%T}";
interval = 1;
};
+ "custom/notification" = {
+ tooltip = false;
+ format = "{icon}";
+ format-icons = {
+ notification = "<span foreground='red'><sup></sup></span>";
+ none = "";
+ dnd-notification = "<span foreground='red'><sup></sup></span>";
+ dnd-none = "";
+ };
+ "return-type" = "json";
+ "exec-if" = "which swaync-client";
+ "exec" = "swaync-client -swb";
+ on-click = "swaync-client -t -sw";
+ on-click-right = "swaync-client -d -sw";
+ escape = true;
+ };
};
}
];
@@ -26,6 +42,10 @@
background: rgba(0, 0, 0, 0);
}
+ #custom-notification {
+ font-family: "NotoSansMono Nerd Font";
+ }
+
window#waybar * * * * {
background: alpha(@theme_base_color, 0.6);
color: @theme_text_color;
@@ -135,7 +155,7 @@
min-width: 3em;
}
- window#waybar * .modules-right #clock {
+ window#waybar * .modules-right #custom-notification {
margin-right: 10px;
}