feat(swaync): Add swaync
This commit is contained in:
parent
14b2e2c3f3
commit
457abcbb24
3 changed files with 56 additions and 0 deletions
|
@ -335,6 +335,18 @@
|
|||
"url": "https://github.com/catppuccin/sway/archive/5f9da99a43336583c7d5ebddf78d7b615911e5ea.tar.gz",
|
||||
"hash": "0n3fpb9pkmis932jv5b1gz045xyhw9cqybild20hsv45lr3r5f1q"
|
||||
},
|
||||
"swaync": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "rose-pine",
|
||||
"repo": "swaync"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "fc17ee01916a5e4424af5c5b29272383fcdfc4f3",
|
||||
"url": "https://github.com/rose-pine/swaync/archive/fc17ee01916a5e4424af5c5b29272383fcdfc4f3.tar.gz",
|
||||
"hash": "13fq0qv009q80pfrwzgnk6ads4b4z82q2g7fala7rmh1nypl5ch4"
|
||||
},
|
||||
"tm-theme": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
43
modules/home-manager/swaync.nix
Normal file
43
modules/home-manager/swaync.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.services.swaync.rose-pine;
|
||||
enable = cfg.enable && config.services.swaync.enable;
|
||||
|
||||
styleFile = "${sources.swaync}/${lib.rp.getKebabTheme cfg.flavor}.css";
|
||||
in {
|
||||
options.services.swaync.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "swaync";}
|
||||
// {
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"prependImport"
|
||||
"createLink"
|
||||
];
|
||||
default = "prependImport";
|
||||
description = ''
|
||||
Defines how to include the Rosé Pine theme css file:
|
||||
|
||||
- `prependImport`: Prepends the import statement, if `programs.waybar.style` is a string (with default override priority).
|
||||
- `createLink`: Creates a symbolic link `~/.config/waybar/rose-pine.css`, which needs to be included in the waybar stylesheet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (cfg.mode == "prependImport") {
|
||||
services.swaync.style = lib.mkBefore ''
|
||||
@import "${styleFile}";
|
||||
'';
|
||||
})
|
||||
(lib.mkIf (cfg.mode == "createLink") {
|
||||
xdg.configFile."swaync/rose-pine.css".source = styleFile;
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
|
@ -46,6 +46,7 @@
|
|||
polybar top &
|
||||
'';
|
||||
};
|
||||
swaync.enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.enable = true;
|
||||
|
|
Loading…
Reference in a new issue