feat(home): Swaync

This commit is contained in:
punkfairie 2025-01-12 17:38:45 -08:00
parent f06c243d43
commit 9a63c29aa1
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
4 changed files with 111 additions and 28 deletions

View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1736085891,
"narHash": "sha256-bTl9fcUo767VaSx4Q5kFhwiDpFQhBKna7lNbGsqCQiA=",
"lastModified": 1736631212,
"narHash": "sha256-mG9lRZBcPiAGiVJ9B97BJoIGQcSBWIVlBiN30QYCtG0=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "ba9b3173b0f642ada42b78fb9dfc37ca82266f6c",
"rev": "6ace2f2d12bdf74235d5cbf9fbd34a71c9716685",
"type": "github"
},
"original": {
@ -501,11 +501,11 @@
]
},
"locked": {
"lastModified": 1736089250,
"narHash": "sha256-/LPWMiiJGPHGd7ZYEgmbE2da4zvBW0acmshUjYC3WG4=",
"lastModified": 1736508663,
"narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "172b91bfb2b7f5c4a8c6ceac29fd53a01ef07196",
"rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
"type": "github"
},
"original": {
@ -822,11 +822,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1735834308,
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
"lastModified": 1736523798,
"narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
"rev": "130595eba61081acde9001f43de3248d8888ac4a",
"type": "github"
},
"original": {
@ -861,11 +861,11 @@
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1736632112,
"narHash": "sha256-C0H5qi53st3EcRCHanOvKbnXpPTt7jPjfkf1uRvYhEY=",
"lastModified": 1736730531,
"narHash": "sha256-nYmCgyRUx2p62h8sQWYbcYp60/demRcJEFaSnORhQyc=",
"owner": "nix-community",
"repo": "NUR",
"rev": "acc4a993dc11d71b954f7ed0c625ecefcee81fe7",
"rev": "77b78d6315172541d1bb5a42fa5314de77efeceb",
"type": "github"
},
"original": {
@ -927,11 +927,11 @@
},
"rose-pine": {
"locked": {
"lastModified": 1730861233,
"narHash": "sha256-38Ajq/7qktffqfpukMk9TLCm49tX5/D7ZVHAinPbZag=",
"lastModified": 1736730678,
"narHash": "sha256-RJu9IcvHC0JDKDxg10/hOBs61hATVIBYryrACj4aa8s=",
"ref": "refs/heads/main",
"rev": "14b2e2c3f3e1721adb6e8e44f1385b1e9b0d0453",
"revCount": 382,
"rev": "6d55c8eb2a4cfaaea0d3b3f036536b29d901d5ec",
"revCount": 385,
"type": "git",
"url": "https://codewith.babesonthe.net/punkfairie/rose-pine-nix"
},
@ -1022,11 +1022,11 @@
]
},
"locked": {
"lastModified": 1732544274,
"narHash": "sha256-qvzLIxuqukl0nxpXHEh5+iw1BLeLxYOwRC0+7cFUbPo=",
"lastModified": 1736130495,
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "cfeacd055545ab5de0ecfd41e09324dcd8fb2bbb",
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
"type": "github"
},
"original": {
@ -1192,11 +1192,11 @@
},
"unstable": {
"locked": {
"lastModified": 1735834308,
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
"lastModified": 1736523798,
"narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
"rev": "130595eba61081acde9001f43de3248d8888ac4a",
"type": "github"
},
"original": {

View file

@ -0,0 +1,76 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.services.swaync;
in {
options.marleyos.services.swaync.enable = lib.mkEnableOption "swaync";
config = lib.mkIf cfg.enable {
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 10;
control-center-margin-bottom = 10;
control-center-margin-right = 10;
control-center-margin-left = 10;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
timeout = 10;
timeout-low = 5;
timeout-critical = 0;
fit-to-screen = true;
control-center-width = 500;
control-center-height = 1025;
notification-window-width = 500;
keyboard-shortcuts = true;
image-visibility = "when-available";
transition-time = 200;
hide-on-clear = false;
hide-on-action = true;
script-fail-notify = true;
widgets = [
"title"
"mpris"
"volume"
"dnd"
"notifications"
];
widget-config = {
title = {
text = "Notification Center";
clear-all-button = true;
button-text = "󰆴 clear all";
};
dnd = {
text = "do not disturb";
};
label = {
max-lines = 1;
text = "Notification Center";
};
mpris = {
image-size = 96;
image-radius = 7;
};
volume = {
label = "󰕾";
};
};
};
};
};
}

View file

@ -9,6 +9,8 @@ in {
options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar";
config = lib.mkIf cfg.enable {
marleyos.services.swaync.enable = true;
programs.waybar = {
enable = true;
@ -148,7 +150,10 @@ in {
tooltip = "true";
};
"custom/notification" = {
"custom/notifications" = let
swaync-client =
lib.getExe' config.services.swaync.package "swaync-client";
in {
tooltip = false;
format = "{icon} {}";
format-icons = {
@ -162,9 +167,8 @@ in {
dnd-inhibited-none = "";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "sleep 0.1 && task-waybar";
exec = "${swaync-client} -swb";
on-click = "sleep 0.1 && ${swaync-client} -t";
escape = true;
};
@ -295,7 +299,7 @@ in {
border-radius: 0 0 40px 0;
}
#custom-hyprbindings, #network, #battery, #custom-notification,
#custom-hyprbindings, #network, #battery, #custom-notifications,
#tray, #custom-exit {
font-weight: bold;
background: @highlight;

View file

@ -37,7 +37,10 @@ in {
marleyos = {
programs.wofi.enable = true;
services.waybar.enable = true;
services = {
swaync.enable = true;
waybar.enable = true;
};
};
home.pointerCursor.hyprcursor.enable = true;