summaryrefslogtreecommitdiff
path: root/home/config/i3/default.nix
blob: 8b613a1de2dc06dfd8cbf15f114b5cc416aa6359 (plain)
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
{ config, pkgs, lib, ... }:

{
  imports = [ ./bar ./keybindings.nix ./startup.nix ];

  xsession.windowManager.i3 = {
    enable = true;
    package = pkgs.i3-gaps;

    config = rec {
      assigns = {
        "8: media" = [{ class = "^Steam$"; }];
        "9: social" = [
          { class = "^Mail$"; }
          { class = "^thunderbird$"; }
          { class = "^Signal$"; }
        ];
      };

      window.border = 0;
      gaps = {
        inner = 15;
        outer = 5;
      };
    };
  };

  home.file.".config/i3/i3status.sh" = {
    text = ''
      #!${pkgs.bash}/bin/sh
      ${pkgs.i3status}/bin/i3status | while :
      do
        read line
        echo "☼ $(${pkgs.brightnessctl}/bin/brightnessctl -m | cut -d',' -f4) |\
             $line" || exit 1
      done
    '';
    executable = true;
  };
}