about summary refs log tree commit diff
path: root/users/fcuny/desktop/i3.nix
blob: 332b7af37eb02c727cbb5abbbb583361f2e0923b (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
{ config, pkgs, lib, hostname, ... }:
let
  mod = "Mod4";
in
{
  xsession.enable = true;

  xsession.windowManager.i3 = {
    enable = true;
    config = {
      modifier = mod;
      terminal = "${pkgs.alacritty}/bin/alacritty";
      window = {
        titlebar = false;
        border = 2;
      };
      keybindings = lib.mkOptionDefault {
        "${mod}+r" = "exec --no-startup-id ${pkgs.rofi}/bin/rofi -show drun";
        "${mod}+l" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
      };
      bars = [ ];
    };
  };

  programs.rofi = {
    enable = true;
    theme = "purple";
    terminal = "${pkgs.alacritty}/bin/alacritty";
    extraConfig = {
      modi = "drun";
      show-icons = true;
      combi-modi = "window,drun,ssh";
    };
  };

  xdg.configFile."polybar/aptos.ini".source = ../configs/polybar/aptos.ini;
  xdg.configFile."polybar/carmel.ini".source = ../configs/polybar/carmel.ini;
  xdg.configFile."polybar/modules".source = ../configs/polybar/modules;

  services.polybar = {
    enable = true;
    package = pkgs.polybarFull;
    script = "polybar --config=${config.xdg.configHome}/polybar/${hostname}.ini -r alone &";
  };
}