blob: e466d6c12e5e41869e7e88ef9ec102471e9b842e (
plain) (
blame)
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
|
{ config, lib, ... }:
let
isEnabled = config.my.home.wm.windowManager == "sway";
cfg = config.base16-theme;
inherit (lib) mkOption mkMerge mkIf mkEnableOption types;
cnotation = builtins.replaceStrings [ "#" ] [ "0x" ];
color = default:
mkOption {
inherit default;
type = types.str;
};
alpha = clr: a: "${clr}${a}";
in {
options.base16-theme = {
enable = mkEnableOption "Enable base16 theme systemwide";
base00 = color "#2E3440"; # polar night
base01 = color "#3B4252"; # polar night
base02 = color "#434C5E"; # polar night
base03 = color "#4C566A"; # polar night
base04 = color "#D8DEE9"; # snow storm
base05 = color "#E5E9F0"; # snow storm
base06 = color "#ECEFF4"; # snow storm
base07 = color "#8FBCBB"; # frost
base08 = color "#88C0D0"; # frost
base09 = color "#81A1C1"; # frost
base0A = color "#5E81AC"; # frost
base0B = color "#BF616A"; # aurora
base0C = color "#D08770"; # aurora
base0D = color "#EBCB8B"; # aurora
base0E = color "#A3BE8C"; # aurora
base0F = color "#B48EAD"; # aurora
};
config = mkIf isEnabled (mkMerge [({
wayland.windowManager.sway.config.colors = rec {
focused = {
border = cfg.base0A;
background = cfg.base0A;
text = cfg.base06;
indicator = cfg.base0A;
childBorder = cfg.base0A;
};
focusedInactive = {
border = cfg.base00;
background = cfg.base00;
text = cfg.base07;
indicator = cfg.base00;
childBorder = cfg.base00;
};
unfocused = focusedInactive;
urgent = {
border = cfg.base0B;
background = cfg.base0B;
text = cfg.base05;
indicator = cfg.base0B;
childBorder = cfg.base0B;
};
};
})]);
}
|