forked from Misterio77/nix-colors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
63 lines (59 loc) · 2.3 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{ pkgs ? (builtins.trace "nix-colors/lib-contrib: using <nixpkgs> as pkgs because the pkgs parameter was not provided" (import <nixpkgs> { })) }:
rec {
# Takes a scheme, resulting wallpaper height and width, plus logo scale, and ouputs the generated wallpaper path
# Example:
# wallpaper = nixWallpaperFromScheme {
# scheme = config.colorScheme;
# width = 2560;
# height = 1080;
# logoScale = 5.0;
# };
nixWallpaperFromScheme = import ./nix-wallpaper.nix { inherit pkgs; };
# Takes a picture path and a scheme kind ("dark" or "light"), and outputs a colorscheme based on it
# Please note the path must be accessible by your flake on pure mode
# Example:
# colorScheme = colorSchemeFromPicture {
# path = ./my/cool/wallpaper.png;
# kind = "dark";
# };
colorSchemeFromPicture = import ./from-picture.nix { inherit pkgs; };
# Alias for backwards compat
colorschemeFromPicture = colorSchemeFromPicture;
# Takes a scheme, ouputs a generated materia GTK theme
# Example:
# gtk.theme.package = gtkThemeFromScheme {
# scheme = config.colorScheme;
# };
gtkThemeFromScheme = import ./gtk-theme.nix { inherit pkgs; };
# Takes a scheme, ouputs a vim theme package.
#
# The output theme name will be "nix-" followed by the coloscheme's slug, and
# should be set, for example, by adding "colorscheme nix-${config.colorScheme.slug}"
# to your vimrc.
#
# Vim example:
# programs.vim = {
# plugins = [
# (vimThemeFromScheme { scheme = config.colorScheme; })
# ];
# extraConfig = "colorscheme nix-${config.colorScheme.slug}";
# };
#
# Neovim example:
# programs.neovim.plugins = [{
# plugin = vimThemeFromScheme { scheme = config.colorScheme; };
# config = "colorscheme nix-${config.colorScheme.slug}";
# }];
vimThemeFromScheme = import ./vim-theme.nix { inherit pkgs; };
# Takes a scheme, ouputs a script that applies this scheme to the current shell.
# It also runs on ttys, and clears the screen when doing it (to look better).
# If you'd rather not let it clean your screen, pass the argument { clearTty = false; }
#
# Example:
# programs.fish = {
# interactiveShellInit = ''
# sh ${shellThemeFromScheme { scheme = config.colorScheme; }}
# '';
# };
shellThemeFromScheme = import ./shell-theme.nix { inherit pkgs; };
}