feat(home): Swaync
This commit is contained in:
parent
f06c243d43
commit
9a63c29aa1
4 changed files with 111 additions and 28 deletions
44
flake.lock
44
flake.lock
|
@ -7,11 +7,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736085891,
|
"lastModified": 1736631212,
|
||||||
"narHash": "sha256-bTl9fcUo767VaSx4Q5kFhwiDpFQhBKna7lNbGsqCQiA=",
|
"narHash": "sha256-mG9lRZBcPiAGiVJ9B97BJoIGQcSBWIVlBiN30QYCtG0=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "ba9b3173b0f642ada42b78fb9dfc37ca82266f6c",
|
"rev": "6ace2f2d12bdf74235d5cbf9fbd34a71c9716685",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -501,11 +501,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736089250,
|
"lastModified": 1736508663,
|
||||||
"narHash": "sha256-/LPWMiiJGPHGd7ZYEgmbE2da4zvBW0acmshUjYC3WG4=",
|
"narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "172b91bfb2b7f5c4a8c6ceac29fd53a01ef07196",
|
"rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -822,11 +822,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735834308,
|
"lastModified": 1736523798,
|
||||||
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
|
"narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
|
"rev": "130595eba61081acde9001f43de3248d8888ac4a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -861,11 +861,11 @@
|
||||||
"treefmt-nix": "treefmt-nix_3"
|
"treefmt-nix": "treefmt-nix_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736632112,
|
"lastModified": 1736730531,
|
||||||
"narHash": "sha256-C0H5qi53st3EcRCHanOvKbnXpPTt7jPjfkf1uRvYhEY=",
|
"narHash": "sha256-nYmCgyRUx2p62h8sQWYbcYp60/demRcJEFaSnORhQyc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "acc4a993dc11d71b954f7ed0c625ecefcee81fe7",
|
"rev": "77b78d6315172541d1bb5a42fa5314de77efeceb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -927,11 +927,11 @@
|
||||||
},
|
},
|
||||||
"rose-pine": {
|
"rose-pine": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730861233,
|
"lastModified": 1736730678,
|
||||||
"narHash": "sha256-38Ajq/7qktffqfpukMk9TLCm49tX5/D7ZVHAinPbZag=",
|
"narHash": "sha256-RJu9IcvHC0JDKDxg10/hOBs61hATVIBYryrACj4aa8s=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "14b2e2c3f3e1721adb6e8e44f1385b1e9b0d0453",
|
"rev": "6d55c8eb2a4cfaaea0d3b3f036536b29d901d5ec",
|
||||||
"revCount": 382,
|
"revCount": 385,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codewith.babesonthe.net/punkfairie/rose-pine-nix"
|
"url": "https://codewith.babesonthe.net/punkfairie/rose-pine-nix"
|
||||||
},
|
},
|
||||||
|
@ -1022,11 +1022,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732544274,
|
"lastModified": 1736130495,
|
||||||
"narHash": "sha256-qvzLIxuqukl0nxpXHEh5+iw1BLeLxYOwRC0+7cFUbPo=",
|
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
|
||||||
"owner": "snowfallorg",
|
"owner": "snowfallorg",
|
||||||
"repo": "lib",
|
"repo": "lib",
|
||||||
"rev": "cfeacd055545ab5de0ecfd41e09324dcd8fb2bbb",
|
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1192,11 +1192,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735834308,
|
"lastModified": 1736523798,
|
||||||
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
|
"narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
|
"rev": "130595eba61081acde9001f43de3248d8888ac4a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
76
modules/home/services/swaync/default.nix
Normal file
76
modules/home/services/swaync/default.nix
Normal 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 = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,6 +9,8 @@ in {
|
||||||
options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar";
|
options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
marleyos.services.swaync.enable = true;
|
||||||
|
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -148,7 +150,10 @@ in {
|
||||||
tooltip = "true";
|
tooltip = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/notification" = {
|
"custom/notifications" = let
|
||||||
|
swaync-client =
|
||||||
|
lib.getExe' config.services.swaync.package "swaync-client";
|
||||||
|
in {
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
format = "{icon} {}";
|
format = "{icon} {}";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
|
@ -162,9 +167,8 @@ in {
|
||||||
dnd-inhibited-none = "";
|
dnd-inhibited-none = "";
|
||||||
};
|
};
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec-if = "which swaync-client";
|
exec = "${swaync-client} -swb";
|
||||||
exec = "swaync-client -swb";
|
on-click = "sleep 0.1 && ${swaync-client} -t";
|
||||||
on-click = "sleep 0.1 && task-waybar";
|
|
||||||
escape = true;
|
escape = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -295,7 +299,7 @@ in {
|
||||||
border-radius: 0 0 40px 0;
|
border-radius: 0 0 40px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-hyprbindings, #network, #battery, #custom-notification,
|
#custom-hyprbindings, #network, #battery, #custom-notifications,
|
||||||
#tray, #custom-exit {
|
#tray, #custom-exit {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: @highlight;
|
background: @highlight;
|
||||||
|
|
|
@ -37,7 +37,10 @@ in {
|
||||||
|
|
||||||
marleyos = {
|
marleyos = {
|
||||||
programs.wofi.enable = true;
|
programs.wofi.enable = true;
|
||||||
services.waybar.enable = true;
|
services = {
|
||||||
|
swaync.enable = true;
|
||||||
|
waybar.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.pointerCursor.hyprcursor.enable = true;
|
home.pointerCursor.hyprcursor.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue