fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Matthieu Coudronpywal: fixed i3 config (#3002)07dbd4c0

master
2.0 KiB81 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let cfg = config.programs.pywal;
6
7in {
8  options = { programs.pywal = { enable = mkEnableOption "pywal"; }; };
9
10  config = mkIf cfg.enable {
11
12    home.packages = [ pkgs.pywal ];
13
14    programs.zsh.initExtra = ''
15      # Import colorscheme from 'wal' asynchronously
16      # &   # Run the process in the background.
17      # ( ) # Hide shell job control messages.
18      (cat ${config.xdg.cacheHome}/wal/sequences &)
19    '';
20
21    programs.kitty.extraConfig = ''
22      include ${config.xdg.cacheHome}/wal/colors-kitty.conf
23    '';
24
25    programs.rofi.theme."@import" =
26      "${config.xdg.cacheHome}/wal/colors-rofi-dark.rasi";
27
28    programs.neovim.plugins = [{
29      plugin = pkgs.vimPlugins.pywal-nvim;
30      type = "lua";
31    }];
32
33    # wal generates and that's the one we should load from /home/teto/.cache/wal/colors.Xresources ~/.Xresources
34    xsession.windowManager.i3 = {
35      extraConfig = ''
36        set_from_resource $bg           i3wm.color0 #ff0000
37        set_from_resource $bg-alt       i3wm.color14 #ff0000
38        set_from_resource $fg           i3wm.color15 #ff0000
39        set_from_resource $fg-alt       i3wm.color2 #ff0000
40        set_from_resource $hl           i3wm.color13 #ff0000
41      '';
42
43      config.colors = {
44        focused = {
45          border = "$fg-alt";
46          background = "$bg";
47          text = "$hl";
48          indicator = "$fg-alt";
49          childBorder = "$hl";
50        };
51
52        focusedInactive = {
53          border = "$fg-alt";
54          background = "$bg";
55          text = "$fg";
56          indicator = "$fg-alt";
57          childBorder = "$fg-alt";
58        };
59
60        unfocused = {
61          border = "$fg-alt";
62          background = "$bg";
63          text = "$fg";
64          indicator = "$fg-alt";
65          childBorder = "$fg-alt";
66        };
67
68        urgent = {
69          border = "$fg-alt";
70          background = "$bg";
71          text = "$fg";
72          indicator = "$fg-alt";
73          childBorder = "$fg-alt";
74        };
75
76        background = "$bg";
77      };
78    };
79  };
80}
81