Compare commits

..

2 commits

4 changed files with 157 additions and 123 deletions

View file

@ -1,17 +1,19 @@
{
osConfig,
pkgs,
lib,
osConfig,
config,
...
}: let
inherit (lib) getExe;
inherit (lib) getExe mkMerge mkIf;
in {
imports = [./style.nix];
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
mainBar = mkMerge [
{
layer = "top";
position = "top";
height = 30;
@ -23,7 +25,9 @@ in {
modules-left = ["niri/workspaces" "niri/window"];
modules-center = ["group/clock"];
modules-right = ["tray" "group/status" "group/power"];
modules-right =
["tray" "group/status" "group/power"]
++ lib.optional config.services.swaync.enable "custom/notification";
battery = {
interval = 10;
@ -44,10 +48,6 @@ in {
max-length = 25;
};
"niri/window" = {
icon = true;
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
@ -146,7 +146,28 @@ in {
"󰤨"
];
};
}
(mkIf osConfig.programs.niri.enable {
"niri/window" = {
icon = true;
};
})
(mkIf config.services.swaync.enable {
"custom/notification" = {
tooltip = false;
format = "{icon}";
format-icons = {
notification = "󱅫";
none = "󰂚";
dnd-notification = "󱏧";
dnd-none = "󱏧";
};
return-type = "json";
exec = "swaync-client -swb";
on-click = "swaync-client -t -sw";
};
})
];
};
};

View file

@ -88,7 +88,8 @@ in {
#network,
#pulseaudio,
#tray,
#power-profiles-daemon {
#power-profiles-daemon
{
padding: 0 0.5em;
}
@ -102,5 +103,9 @@ in {
padding: 0 1.2em;
color: @base08;
}
#custom-notification {
padding: 0 1.2em;
}
'';
}

7
home/services/swaync.nix Normal file
View file

@ -0,0 +1,7 @@
{lib, ...}: {
services.swaync = {
enable = true;
};
# systemd.user.services.swaync.Service.Environment = "WAYLAND_DISPLAY=wayland-1";
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
}

View file

@ -35,6 +35,7 @@ in {
"${home}/programs/niri"
"${home}/programs/waybar"
"${home}/services/swaync.nix"
"${home}/programs/fuzzel.nix"
"${home}/programs/swaybg.nix"
"${home}/programs/swaylock.nix"