summaryrefslogtreecommitdiff
path: root/home/desktop.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-08-16 23:16:16 -0600
committerAlejandro Soto <alejandro@34project.org>2024-08-17 00:36:51 -0600
commit9bd36d54e4af55b1a316dc1c1efd84c1df73352a (patch)
tree7956f9232dabb0778ba712af9ebf081e2a737cc3 /home/desktop.nix
parent556ce3e501ad8da745c47576d23e7be9c3d5c729 (diff)
home/desktop: declare i3 config using home-manager options
Diffstat (limited to 'home/desktop.nix')
-rw-r--r--home/desktop.nix105
1 files changed, 94 insertions, 11 deletions
diff --git a/home/desktop.nix b/home/desktop.nix
index 0d19de0..f372a69 100644
--- a/home/desktop.nix
+++ b/home/desktop.nix
@@ -33,8 +33,6 @@ with lib; {
};
};
- i3status-rust.enable = true;
-
rofi = {
enable = true;
theme = "DarkBlue";
@@ -73,17 +71,102 @@ with lib; {
};
};
- xdg.configFile."i3/config".text = pkgs.callPackage ./i3-config.nix {
- inherit (pkgs.local) st tmux-lift;
-
- i3status-rust = config.programs.i3status-rust.package;
- rofi = config.programs.rofi.finalPackage;
- };
-
xsession = {
enable = true;
- # Cambiar por windowManager.i3.enable al migrar
- windowManager.command = "${pkgs.i3-gaps}/bin/i3";
+
+ windowManager.i3 = {
+ enable = true;
+ package = pkgs.i3-gaps;
+
+ config = {
+ modifier = "Mod4";
+ focus.followMouse = false;
+
+ bars = singleton {
+ mode = "dock";
+ hiddenState = "hide";
+ position = "top";
+ workspaceButtons = true;
+ workspaceNumbers = true;
+ statusCommand = getExe pkgs.i3status;
+ trayOutput = "primary";
+ colors = {
+ background = "#000000";
+ statusline = "#ffffff";
+ separator = "#666666";
+ focusedWorkspace = {
+ border = "#4c7899";
+ background = "#285577";
+ text = "#ffffff";
+ };
+ activeWorkspace = {
+ border = "#333333";
+ background = "#5f676a";
+ text = "#ffffff";
+ };
+ inactiveWorkspace = {
+ border = "#333333";
+ background = "#222222";
+ text = "#888888";
+ };
+ urgentWorkspace = {
+ border = "#2f343a";
+ background = "#900000";
+ text = "#ffffff";
+ };
+ bindingMode = {
+ border = "#2f343a";
+ background = "#900000";
+ text = "#ffffff";
+ };
+ };
+ };
+
+ fonts = {
+ size = 11.0;
+ names = [ "DejaVu Sans Mono" ];
+ style = "Bold Semi-Condensed";
+ };
+
+ keybindings =
+ let
+ mod = config.xsession.windowManager.i3.config.modifier;
+ rofi = config.programs.rofi.finalPackage;
+
+ inherit (pkgs.local) st tmux-lift;
+ in
+ mkOptionDefault {
+ "${mod}+a" = "focus parent";
+ "${mod}+c" = "focus child";
+ "${mod}+d" = "exec --no-startup-id ${getExe rofi} -show run";
+ "${mod}+i" = "exec ${getExe pkgs.xcalib} -invert -alter";
+ "${mod}+o" = "exec ${getExe pkgs.xautolock} -locknow";
+ "${mod}+Return" = "exec ${getExe st} -e ${getExe tmux-lift}";
+ "${mod}+Shift+e" = "exec ${getExe pkgs.xorg.setxkbmap} latam";
+ "${mod}+Shift+u" = "exec ${getExe pkgs.xorg.setxkbmap} us";
+ };
+
+ startup = [
+ {
+ command = "${getExe pkgs.xautolock} -time 10 -locker '${pkgs.i3lock-color}/bin/i3lock-color -fe -c222222'";
+ notification = false;
+ }
+ ];
+
+ window.commands = [
+ # (No) Title Bars
+ {
+ command = "border pixel 5";
+ criteria.class = "^.*";
+ }
+
+ {
+ command = "floating enabled";
+ criteria.class = "floating";
+ }
+ ];
+ };
+ };
};
};