Setup swaynotificationcenter

This commit is contained in:
Nathan McCarty 2023-06-16 23:05:53 -04:00
parent d48370536f
commit ae1c933dc2
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
2 changed files with 12 additions and 31 deletions

View File

@ -119,6 +119,9 @@ bind = SHIFT, print, exec, grimblast copysave output ~/Pictures/Screenshots/$(da
# Caps lock indicator
bindr = CAPS, caps_lock, exec, swayosd --caps-lock
# Notif bind
bind = $mainMod, T, exec, swaync-client -t -sw
# systemd integration
exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && sleep 2 && systemctl --user start hyprland-session.target

View File

@ -8,7 +8,8 @@ in with lib; {
${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
fuzzel-command = ''
fuzzel -f "Iosevka Sans Quasi" -b "181818dd" -S "b9b9b9ff" -s "252525dd" -t "777777ff" -B 5 -r 5 -C "70b433dd"'';
wob-package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob;
notif-package =
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaynotificationcenter;
in {
home.packages = with pkgs; [
# Locking and display management
@ -19,7 +20,7 @@ in with lib; {
wl-clipboard
cliphist
# Notifications
mako
notif-package
# Terminal
alacritty
# glib for sound stuff
@ -115,41 +116,17 @@ in with lib; {
Install = { WantedBy = [ "graphical-session.target" ]; };
};
#########################
## Mako (notifications)
## SwayNotificationCenter (notifications)
#########################
services.mako = {
enable = true;
# Selenized color scheme
borderColor = "#f275be";
backgroundColor = "#184956";
textColor = "#adbcbc";
# Border configuration
borderSize = 3;
# Use Iosevka for font
font = "Iosevka Sans Quasi 10";
# Group by application
groupBy = "app-name";
# Bottom right corner
anchor = "bottom-right";
# Maximum visible notifications
maxVisible = 10;
# Sort by time in descending order (newest first)
sort = "-time";
# Don't time out notifications , I want to have to dismiss them
defaultTimeout = 0;
ignoreTimeout = true;
};
systemd.user.services.mako = {
systemd.user.services.swaync = {
Unit = {
Description = "mako notification daemon";
Description = "SwayNotificationCenter";
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = ''
${pkgs.mako}/bin/mako
'';
Restart = "always";
ExecStart = "${notif-package}/bin/swaync";
Restart = "on-failure";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
@ -178,6 +155,7 @@ in with lib; {
#########################
## Waybar
#########################
# https://github.com/DN-debug/waybar-examples/tree/main/waybar-examples/sway
programs.waybar = {
enable = true;
package =