config/modules/gui/wm/default.nix

84 lines
1.7 KiB
Nix

{ pkgs, config, lib, ... }:
let scripts = (import ./scripts.nix { inherit pkgs; });
theme = config.riley.theme.hex;
modifier = "Mod4";
terminal = "${pkgs.kitty}/bin/kitty";
keybindings = (import ./keybinds.nix {
inherit modifier lib pkgs config scripts;
directional = {
left = "H";
right = "L";
up = "K";
down = "J";
};
workspace = {
numbered = 6;
named = {
"chat" = "q";
"code" = "w";
"browser" = "e";
};
};
launchers = {
browser = "google-chrome-stable";
inherit terminal;
};
});
in
with lib; (mkIf config.custom.gui.enable {
services.xserver = {
enable = true;
windowManager.i3.enable = true;
};
home-manager.users."riley" = {
xsession.windowManager.i3 = {
enable = true;
config = with lib; (rec {
inherit modifier keybindings terminal;
colors = {
focused = rec {
background = theme.background.normal;
text = theme."green".bright;
border = background;
childBorder = border;
indicator = border;
};
unfocused = rec {
background = theme.background.normal;
text = theme.foreground.slight;
border = background;
childBorder = border;
indicator = border;
};
focusedInactive = colors.unfocused;
};
window = {
border = 2;
commands = [
{ command = "border pixel 2"; criteria = { class = ".*"; }; }
];
};
fonts = {
names = [ "Source Sans 3" ];
style = "Semibold";
size = 10.0;
};
});
};
};
})