From d8297b7940caf589fdc6785022822482577d5344 Mon Sep 17 00:00:00 2001 From: Tom Carrio Date: Mon, 9 Oct 2023 23:41:06 -0400 Subject: [PATCH] fix: i3 config --- home-manager/_mixins/desktop/i3.config | 64 +++++++++++++------------- nixos/_mixins/desktop/i3.nix | 5 +- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/home-manager/_mixins/desktop/i3.config b/home-manager/_mixins/desktop/i3.config index 646b107e..6267bf59 100644 --- a/home-manager/_mixins/desktop/i3.config +++ b/home-manager/_mixins/desktop/i3.config @@ -64,10 +64,10 @@ bindsym $mod+d exec "rofi -modi drun,run -show drun" # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop # change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left @@ -76,10 +76,10 @@ bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left @@ -88,10 +88,10 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # split in horizontal orientation -bindsym $mod+h split h +bindsym $mod+Shift+h split h # split in vertical orientation -bindsym $mod+v split v +bindsym $mod+Shift+v split v # enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle @@ -159,27 +159,27 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu # resize window (you can also use the mouse for that) mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window's width. + # Pressing right will grow the window's width. + # Pressing up will shrink the window's height. + # Pressing down will grow the window's height. + bindsym h resize shrink width 12 px or 12 ppt + bindsym j resize grow height 12 px or 12 ppt + bindsym k resize shrink height 12 px or 12 ppt + bindsym l resize grow width 12 px or 12 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 3 px or 3 ppt + bindsym Down resize grow height 3 px or 3 ppt + bindsym Up resize shrink height 3 px or 3 ppt + bindsym Right resize grow width 3 px or 3 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" } bindsym $mod+r mode "resize" @@ -187,5 +187,5 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { - status_command i3status + status_command i3status } diff --git a/nixos/_mixins/desktop/i3.nix b/nixos/_mixins/desktop/i3.nix index e37235aa..ae6e2592 100644 --- a/nixos/_mixins/desktop/i3.nix +++ b/nixos/_mixins/desktop/i3.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { # links /libexec from derivations to /run/current-system/sw environment.pathsToLink = [ "/libexec" ]; - + services.xserver = { enable = true; @@ -18,8 +18,9 @@ package = i3-gaps; extraPackages = [ rofi - i3status-rust i3lock + i3blocks + i3status ]; }; };