config/modules/gui/wm/default.nix

85 lines
1.7 KiB
Nix
Raw Normal View History

2022-01-12 00:20:57 +01:00
{ pkgs, config, lib, ... }:
2022-05-15 18:35:31 +02:00
let scripts = (import ./scripts.nix);
theme = config.riley.theme.hex;
2022-01-12 00:20:57 +01:00
modifier = "Mod4";
2022-05-15 18:35:31 +02:00
terminal = "${pkgs.alacritty}/bin/alacritty";
2022-01-12 00:20:57 +01:00
keybindings = (import ./keybinds.nix {
2022-05-15 18:35:31 +02:00
inherit modifier lib pkgs config scripts;
2022-01-12 00:20:57 +01:00
directional = {
left = "H";
right = "L";
up = "K";
down = "J";
};
workspace = {
2022-05-15 16:11:41 +02:00
numbered = 6;
2022-01-12 00:20:57 +01:00
named = {
2022-05-15 16:11:41 +02:00
"chat" = "q";
"code" = "w";
"browser" = "e";
2022-01-12 00:20:57 +01:00
};
};
launchers = {
browser = "google-chrome-stable";
2022-05-15 18:35:31 +02:00
inherit terminal;
2022-01-12 00:20:57 +01:00
};
2022-05-15 18:35:31 +02:00
2022-01-12 00:20:57 +01:00
});
in
with lib; (mkIf config.riley.gui {
2022-01-12 00:20:57 +01:00
services.xserver = {
enable = true;
windowManager.i3.enable = true;
};
home-manager.users."riley" = {
xsession.windowManager.i3 = {
enable = true;
config = with lib; (rec {
2022-05-15 18:35:31 +02:00
inherit modifier keybindings terminal;
2022-01-12 00:20:57 +01:00
colors = {
focused = rec {
background = theme.background.normal;
2022-05-15 18:35:31 +02:00
text = theme."green".bright;
2022-01-12 00:20:57 +01:00
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;
};
});
};
};
})