Added notification center
This commit is contained in:
63
modules/desktop/tools/swaync.nix
Normal file
63
modules/desktop/tools/swaync.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user