1
0
Fork 0
forked from fabian/nix_config
nix_config_fabian/home/modules/gui/i3.nix

105 lines
2.8 KiB
Nix

{
config,
lib,
pkgs,
...
}:
with lib; {
xsession.windowManager.i3 = {
package = pkgs.i3-gaps;
config = let
mod = "Mod4";
in {
modifier = mod;
fonts = {
names = ["JetBrains Mono"];
style = "Regular";
size = 8.0;
};
gaps = {
inner = 10;
outer = -10;
};
window = {
hideEdgeBorders = "both";
titlebar = false;
};
workspaceLayout = "tabbed";
colors = {
focused = {
background = "#222222";
border = "#4c7899";
childBorder = "#222222";
indicator = "#292d2e";
text = "#888888";
};
};
# mkOptionDefault hace que se ponga la config por default
# y se sobreescriba las cosas que pongo acá
# NO QUITARLO. ver man home-configuration.nix
keybindings = mkOptionDefault {
"${mod}+Return" = "exec ${lib.getExe pkgs.kitty} ${lib.getExe pkgs.tmux}";
"${mod}+Tab" = "focus right";
"${mod}+Shift+Tab" = "focus left";
"${mod}+Shift+s" = "exec ${lib.getExe pkgs.maim} -s -u | ${lib.getExe pkgs.xclip} -selection clipboard -t image/png -i";
"${mod}+Shift+w" = "move workspace to output right";
"${mod}+l" = "exec ${lib.getExe pkgs.betterlockscreen} -l";
};
startup = [
{
command = "${lib.getExe pkgs.xss-lock} --transfer-sleep-lock -- ${lib.getExe pkgs.i3lock} --nofork";
notification = false;
}
{
command = "${lib.getExe pkgs.networkmanagerapplet}";
notification = false;
}
#todo: sería nice hostear esta imagen en el server y fetchearla si no existe
{
command = "${lib.getExe pkgs.feh} --bg-fill ${config.home.homeDirectory}/Pictures/wallpapers/jupiter.png";
notification = false;
always = true;
}
{
#todo: move this to telegram module
command = "${lib.getExe pkgs.i3-gaps} 'workspace 2; exec ${lib.getExe pkgs.tdesktop}'";
}
{
command = "${lib.getExe pkgs.i3-gaps} 'workspace 2; exec ${lib.getExe pkgs.gajim}'";
}
{
command = "${pkgs.systemd}/bin/systemctl --user restart polybar.service";
notification = false;
always = true;
}
{
command = "${lib.getExe pkgs.autorandr} -c";
notification = false;
always = true;
}
];
workspaceOutputAssign =
mapAttrsToList (
monitorId: v:
{
output = monitorId;
}
// optionalAttrs (v.initialI3Workspace != null) {
workspace = toString v.initialI3Workspace;
}
)
config.local.gui.monitors;
bars = [];
};
};
}