feat(swaync): Add swaync
This commit is contained in:
parent
14b2e2c3f3
commit
bdd24a850c
4 changed files with 58 additions and 1 deletions
|
@ -335,6 +335,18 @@
|
||||||
"url": "https://github.com/catppuccin/sway/archive/5f9da99a43336583c7d5ebddf78d7b615911e5ea.tar.gz",
|
"url": "https://github.com/catppuccin/sway/archive/5f9da99a43336583c7d5ebddf78d7b615911e5ea.tar.gz",
|
||||||
"hash": "0n3fpb9pkmis932jv5b1gz045xyhw9cqybild20hsv45lr3r5f1q"
|
"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": {
|
"tm-theme": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -21,8 +21,9 @@
|
||||||
./rio.nix
|
./rio.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./swaylock.nix
|
|
||||||
./sway.nix
|
./sway.nix
|
||||||
|
./swaylock.nix
|
||||||
|
./swaync.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
|
|
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}/theme/${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 &
|
polybar top &
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
swaync.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway.enable = true;
|
wayland.windowManager.sway.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue