docs(README): add info for using catppuccin/nix (#174)
This commit is contained in:
54
README.md
54
README.md
@@ -49,57 +49,29 @@ yay -S catppuccin-gtk-theme-mocha catppuccin-gtk-theme-macchiato catppuccin-gtk-
|
|||||||
|
|
||||||
### For Nix users
|
### For Nix users
|
||||||
|
|
||||||
The [catppuccin-gtk](https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/themes/catppuccin-gtk/default.nix) package in Nixpkgs allows you to specify the accents, size, tweaks and variant (flavour) of the theme by overriding the package.
|
We suggest you use [catppuccin/nix](https://github.com/catppuccin/nix).
|
||||||
|
Alternatively, you can use [catppuccin-gtk](https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/themes/catppuccin-gtk/default.nix) from nixpkgs.
|
||||||
By default, the variant is `frappe`, the accent is `blue`, the size is `standard`, and no tweaks are enabled. To change them, override the package. A list of valid choices are available in the package definition [here](https://github.com/NixOS/nixpkgs/blob/7ce8e7c4cf90492a631e96bcfe70724104914381/pkgs/data/themes/catppuccin-gtk/default.nix#L16).
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
# as per wiki examples
|
{inputs, ...}: {
|
||||||
environment.systemPackages = with pkgs; [
|
imports = [inputs.catppuccin.homeManagerModules.catppuccin];
|
||||||
...
|
|
||||||
(catppuccin-gtk.override {
|
|
||||||
accents = [ "pink" ]; # You can specify multiple accents here to output multiple themes
|
|
||||||
size = "compact";
|
|
||||||
tweaks = [ "rimless" "black" ]; # You can also specify multiple tweaks here
|
|
||||||
variant = "macchiato";
|
|
||||||
})
|
|
||||||
...
|
|
||||||
];
|
|
||||||
```
|
|
||||||
|
|
||||||
To use it in home-manager:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
# home.nix
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
catppuccin = {
|
||||||
name = "Catppuccin-Macchiato-Compact-Pink-Dark";
|
enable = true;
|
||||||
package = pkgs.catppuccin-gtk.override {
|
flavor = "mocha";
|
||||||
accents = [ "pink" ];
|
accent = "pink";
|
||||||
size = "compact";
|
size = "standard";
|
||||||
tweaks = [ "rimless" "black" ];
|
tweaks = [ "normal" ];
|
||||||
variant = "macchiato";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now symlink the `~/.config/gtk-4.0/` folder declaratively:
|
|
||||||
xdg.configFile = {
|
|
||||||
"gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
|
|
||||||
"gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
|
|
||||||
"gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
|
|
||||||
};
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> For further information on the options available, see the [full documentation](https://github.com/catppuccin/nix/blob/main/docs/home-manager-options.md#gtkcatppuccinenable).
|
||||||
|
|
||||||
### For GTK 4 users
|
### For GTK 4 users
|
||||||
|
|
||||||
To theme GTK 4 applications you have to manually symlink the `~/.config/gtk-4.0/` to the themes folder. Use the following commands
|
To theme GTK 4 applications you have to manually symlink the `~/.config/gtk-4.0/` to the themes folder. Use the following commands
|
||||||
|
|||||||
Reference in New Issue
Block a user