Skip to content

Commit

Permalink
fix: i3 config
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarrio committed Oct 10, 2023
1 parent 7493c9d commit d8297b7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
64 changes: 32 additions & 32 deletions home-manager/_mixins/desktop/i3.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -159,33 +159,33 @@ 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 windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows 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"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
status_command i3status
}
5 changes: 3 additions & 2 deletions nixos/_mixins/desktop/i3.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, ... }: {
# links /libexec from derivations to /run/current-system/sw
environment.pathsToLink = [ "/libexec" ];

services.xserver = {
enable = true;

Expand All @@ -18,8 +18,9 @@
package = i3-gaps;
extraPackages = [
rofi
i3status-rust
i3lock
i3blocks
i3status
];
};
};
Expand Down

0 comments on commit d8297b7

Please sign in to comment.