Added notification center

This commit is contained in:
marc
2024-12-04 15:45:20 +01:00
parent 7fe62ab2ce
commit 40b3eaba12
2 changed files with 67 additions and 2 deletions

View File

@@ -57,10 +57,12 @@ in
hyprlock.enable = true; hyprlock.enable = true;
# Status bars # Status bars
eww.enable = true; eww.enable = true;
# Launcher
rofi.enable = true;
# Wallpapper # Wallpapper
hyprpaper.enable = true; hyprpaper.enable = true;
# Launcher
rofi.enable = true;
# Notification center
swaync.enable = true;
}; };
}; };

View File

@@ -0,0 +1,63 @@
{ inputs, config, lib, pkgs, ... }:
let
cfg = config.samfelag.modules.desktop.tools.swaync;
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
in {
options.samfelag.modules.desktop.tools.swaync = with lib; {
enable = mkEnableOption "Sway Notification Center";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
libnotify
swaynotificationcenter
];
hm.services.swaync = {
enable = true;
settings = {
};
style = ''
* {
font-family: Iosevka;
}
.notification {
padding: 4px 4px 0px 4px;
background-color: #${config.colorScheme.palette.base00};
color: #${config.colorScheme.palette.base05};
}
.summary {
}
.body {
}
.control-center {
margin: 20px;
opacity: 0.95;
background-color: #${config.colorScheme.palette.base01};
color: #${config.colorScheme.palette.base05};
}
'';
};
# - Execute on startup -----------------------
hm.wayland.windowManager.hyprland.settings = lib.mkIf hyprCfg.enable {
exec-once = [
"swaync"
];
bind = [
# Notification center
"${hyprCfg.mod}, n, exec, swaync-client -t -sw"
];
};
};
}