enable dunst notifications

also rebuilds with shortcuts
This commit is contained in:
Noah Masur 2023-04-02 19:19:40 -04:00
parent e349ac35b8
commit 0833a0009c
4 changed files with 45 additions and 2 deletions

View File

@ -1,7 +1,14 @@
{ lib, ... }: {
imports =
[ ./xorg.nix ./fonts.nix ./i3.nix ./polybar.nix ./picom.nix ./rofi.nix ];
imports = [
./dunst.nix
./fonts.nix
./i3.nix
./picom.nix
./polybar.nix
./rofi.nix
./xorg.nix
];
options = {

View File

@ -0,0 +1,31 @@
{ config, ... }:
{
config = {
home-manager.users.${config.user}.services.dunst = {
enable = true;
settings = {
global = {
width = 300;
height = 200;
offset = "30x50";
origin = "top-right";
transparency = 0;
padding = 20;
horizontal_padding = 20;
frame_color = config.theme.colors.base03;
};
urgency_normal = {
background = config.theme.colors.base00;
foreground = config.theme.colors.base05;
timeout = 10;
};
};
};
};
}

View File

@ -22,6 +22,7 @@ in {
programs.rofi.font = "Hack Nerd Font 14";
programs.alacritty.settings.font.normal.family = fontName;
programs.kitty.font.name = fontName;
services.dunst.settings.global.font = "Hack Nerd Font 14";
};
};

View File

@ -128,6 +128,10 @@ in {
"${modifier}+Shift+q" = ''
exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
"${modifier}+Shift+x" = "exec ${lockCmd}";
"${modifier}+Mod1+h" =
"exec --no-startup-id kitty sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} && ${pkgs.libnotify}/bin/notify-send --transient --expire-time 3000 \"Rebuilt home.\" || read'";
"${modifier}+Mod1+r" =
"exec --no-startup-id kitty sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} && ${pkgs.libnotify}/bin/notify-send --transient --expire-time 3000 \"Rebuilt NixOS.\" || read'";
# Window options
"${modifier}+q" = "kill";