This repository has been archived on 2024-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
desktop_nixos_config_legacy/home/gui/i3.nix

111 lines
3.1 KiB
Nix
Raw Permalink Normal View History

2024-08-23 21:32:44 +02:00
{
2024-08-24 09:55:59 +02:00
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.local.gui.i3;
in {
2024-08-23 21:32:44 +02:00
options.local.gui.i3.enable = mkEnableOption "i3 window manager";
config = mkIf cfg.enable {
xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
2024-08-24 09:55:59 +02:00
config = let
mod = "Mod4";
in {
modifier = mod;
# revisar luego si config.bars tiene un default danino
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
fonts = {
names = ["JetBrains Mono"];
style = "Regular";
size = 8.0;
};
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
gaps = {
inner = 10;
outer = -10;
};
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
window = {
hideEdgeBorders = "both";
};
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
colors = {
focused = {
background = "#222222";
border = "#4c7899";
childBorder = "#222222";
indicator = "#292d2e";
text = "#888888";
2024-08-23 21:32:44 +02:00
};
2024-08-24 09:55:59 +02:00
};
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
# mkOptionDefault hace que se ponga la config por default
# y se sobreescriba las cosas que pongo acA
# NO QUITARLO. ver man home-configuration.nix
keybindings = mkOptionDefault {
"${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux";
"${mod}+Tab" = "focus right";
"${mod}+Shift+Tab" = "focus left";
"${mod}+Shift+s" = "exec ${pkgs.maim}/bin/maim -s -u | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png -i";
"${mod}+Shift+w" = "move workspace to output right";
"${mod}+l" = "exec ${pkgs.betterlockscreen}/bin/betterlockscreen -l";
};
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
startup = [
{
command = "${pkgs.xss-lock}/bin/xss-lock --transfer-sleep-lock -- ${pkgs.i3lock}/bin/i3lock --nofork";
notification = false;
}
{
command = "${pkgs.networkmanagerapplet}/bin/nm-applet";
notification = false;
}
{
command = "${pkgs.feh}/bin/feh --bg-fill ${config.home.homeDirectory}/Pictures/wallpapers/jupiter.png";
notification = false;
always = true;
}
{
command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 1; exec ${pkgs.firefox}/bin/firefox'";
}
{
command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.tdesktop}/bin/telegram-desktop'";
}
2024-09-04 22:13:23 +02:00
#{
# command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.element-desktop}/bin/element-desktop'";
#}
2024-08-24 09:55:59 +02:00
{
command = "${pkgs.systemd}/bin/systemctl --user restart polybar.service";
notification = false;
always = true;
}
{
command = "${pkgs.autorandr}/bin/autorandr -c";
notification = false;
always = true;
}
];
2024-08-23 21:32:44 +02:00
2024-08-24 09:55:59 +02:00
workspaceOutputAssign =
[
2024-08-23 21:32:44 +02:00
{
output = config.local.display."0";
workspace = "1";
}
2024-08-24 09:55:59 +02:00
]
++ optional (config.local.display."1" != null) {
2024-08-23 21:32:44 +02:00
output = config.local.display."1";
workspace = "10";
};
2024-08-24 09:55:59 +02:00
bars = [];
};
2024-08-23 21:32:44 +02:00
};
};
}