# .-. .-. .-. .-. .-. .-. .-. .-. .-. # `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' `._.' # # github.com/rafi i3 config # # Reference: http://i3wm.org/docs/userguide.html #============================================================================== # i3 general behavior → #------------------------------------------------------------------------------ # I mostly use Alt, and barely the super key. set $alt Mod1 set $mod Mod4 # Disable mouse features focus_follows_mouse no mouse_warping none # Be pixel stingy hide_edge_borders vertical # Use Mouse+$alt to drag and resize floating windows floating_modifier $alt # DISABLED: #floating_minimum_size 250 x 250 #floating_maximum_size 1920 x 0 #force_display_urgency_hint 1000 ms #============================================================================== # Workspaces → #------------------------------------------------------------------------------ # These are glyphs from the 'termsyn.icons' font # See http://sourceforge.net/projects/termsyn set $w1 1 ê set $w2 2 ý set $w3 3 Ç set $w4 4 Â set $w5 5 ¨ set $w6 6 © set $w7 7 © set $w8 8 © # Force workspaces to specific output monitor #workspace "$w1" output DFP10 #workspace "$w2" output DFP1 #workspace "$w3" output DFP9 #============================================================================== # Key binding → #------------------------------------------------------------------------------ # Change focus, special wrapper for seamless movement between: # i3 windows, tmux panes, and VIM windows. # bindsym $alt+h exec --no-startup-id i3-focus left # bindsym $alt+j exec --no-startup-id i3-focus down # bindsym $alt+k exec --no-startup-id i3-focus up # bindsym $alt+l exec --no-startup-id i3-focus right bindsym $alt+h focus left bindsym $alt+j focus down bindsym $alt+k focus up bindsym $alt+l focus right # Alternatively, you can use the Super+Arrows: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # Move focused window: # alt+ctrl+h/j/k/l # mod+ctrl+left/down/up/right bindsym $alt+Ctrl+h move left bindsym $alt+Ctrl+j move down bindsym $alt+Ctrl+k move up bindsym $alt+Ctrl+l move right bindsym $mod+Ctrl+Left move left bindsym $mod+Ctrl+Down move down bindsym $mod+Ctrl+Up move up bindsym $mod+Ctrl+Right move right # Vert/horiz orientation and fullscreen bindsym $alt+f fullscreen bindsym $alt+Ctrl+g split h bindsym $alt+Ctrl+v split v # Move floating container to the center of all outputs # TODO: Not that great, appears at the bottom of middle monitor. bindsym $alt+Ctrl+c move absolute position center # Toggle floating/tiling bindsym $alt+t floating toggle # Focus last floating/tiling container. Very helpful! bindsym $alt+space focus mode_toggle bindsym $alt+a focus parent bindsym $alt+z focus child # Scratchpad control bindsym $alt+Ctrl+minus move scratchpad bindsym $alt+minus scratchpad show # Quickly draw out vim #bindsym $alt+equal [class="G?vim"] scratchpad show # i3 Session bindsym $alt+Ctrl+q kill bindsym $alt+Ctrl+e reload bindsym $alt+Ctrl+r restart bindsym $alt+Ctrl+Delete exec "i3-nagbar -t warning -m 'exit i3? This will end your X session.' -b 'Yes' 'i3-msg exit'" # Change container layout (stacked, tabbed, toggle split) bindsym $alt+d layout stacking bindsym $alt+w layout tabbed bindsym $alt+g layout toggle split # Toggle between stacking/tabbed/split bindsym $alt+x layout toggle # Toggle border modes bindsym $alt+b border toggle # Applications # ------------ # Terminal bindsym $alt+Return exec --no-startup-id alacritty # The awesome rofi for apps, windows, and ssh sessions. # (Super+Delete is awesome on the TECK keyboard) bindsym $alt+Tab exec --no-startup-id /usr/bin/rofi -show window bindsym $alt+r exec --no-startup-id /usr/bin/rofi -show run bindsym $alt+s exec --no-startup-id /usr/bin/rofi -show ssh # Screenshot and cast bindsym Print exec --no-startup-id /usr/bin/teiler # Clipboard manager bindsym --release $alt+v exec --no-startup-id ~/.local/bin/gpaste-rofi # Multimedia keys bindsym $alt+F9 exec --no-startup-id mpc seek +4 bindsym $alt+F7 exec --no-startup-id mpc seek -4 # Who needs F-keys?! bindsym XF86Tools exec --no-startup-id /usr/bin/clerk bindsym F6 exec --no-startup-id /usr/bin/clerk bindsym XF86AudioPlay exec --no-startup-id mpc toggle bindsym F8 exec --no-startup-id mpc toggle bindsym XF86AudioNext exec --no-startup-id mpc next bindsym F9 exec --no-startup-id mpc next bindsym XF86AudioPrev exec --no-startup-id mpc prev bindsym F7 exec --no-startup-id mpc prev bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle bindsym F10 exec --no-startup-id amixer set Master toggle bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 3%- bindsym F11 exec --no-startup-id amixer set Master 3%- bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 3%+ bindsym F12 exec --no-startup-id amixer set Master 3%+ # TODO: Un-used #bindsym XF86Eject exec --no-startup-id #bindsym XF86Calculator exec --no-startup-id #bindsym XF86Explorer exec --no-startup-id #bindsym XF86Search exec --no-startup-id #bindsym XF86Mail exec --no-startup-id #bindsym XF86HomePage exec --no-startup-id # DISABLED: Volume control with mod+PageUp/PageDn as well #bindsym $mod+Next exec --no-startup-id amixer set Master 3%- #bindsym $mod+Prior exec --no-startup-id amixer set Master 3%+ # Workspaces # ---------- # Helpful: Rename workspaces on-the-fly bindsym $alt+Ctrl+a exec i3-input -F 'rename workspace to %s' -P 'New name: ' # Moving whole workspaces or containers to other outputs bindsym $alt+Home move workspace to output left bindsym $alt+End move workspace to output right bindsym $alt+Ctrl+Home move container to output left bindsym $alt+Ctrl+End move container to output right # TODO: Not used, remove or use? #bindsym $alt+n workspace next #bindsym $alt+p workspace prev #bindsym $alt+i workspace next_on_output #bindsym $alt+u workspace prev_on_output # Switch to workspace bindsym $alt+1 workspace $w1 bindsym $alt+2 workspace $w2 bindsym $alt+3 workspace $w3 bindsym $alt+4 workspace $w4 bindsym $alt+5 workspace $w5 bindsym $alt+6 workspace $w6 bindsym $alt+7 workspace $w7 bindsym $alt+8 workspace $w8 # Move focused container to workspace bindsym $alt+Ctrl+1 move container to workspace $w1 bindsym $alt+Ctrl+2 move container to workspace $w2 bindsym $alt+Ctrl+3 move container to workspace $w3 bindsym $alt+Ctrl+4 move container to workspace $w4 bindsym $alt+Ctrl+5 move container to workspace $w5 bindsym $alt+Ctrl+6 move container to workspace $w6 bindsym $alt+Ctrl+7 move container to workspace $w7 bindsym $alt+Ctrl+8 move container to workspace $w8 # DISABLED: Workspace nav for Microsoft Ergonomic Keyboard 4000 #bindsym XF86Forward workspace next #bindsym XF86Back workspace prev #bindsym XF86Launch5 workspace $w1 #bindsym XF86Launch6 workspace $w2 #bindsym XF86Launch7 workspace $w3 #bindsym XF86Launch8 workspace $w4 #bindsym XF86Launch9 workspace $w5 #============================================================================== # Look 'n Feel → #------------------------------------------------------------------------------ # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. # The 'termsyn.icons' font http://sourceforge.net/projects/termsyn font -misc-termsyn.icons-medium-r-normal--13-120-75-75-c-60-iso8859-1 # Other nice fonts #font pango: PragmataPro 9 #font pango: EnvyCodeR 10 #font -*-cure-*-*-*--*-*-*-*-*-*-* #font -xos4-terminus-medium-r-normal--12-120-72-72-C-60-iso8859-1 #font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 # Borders new_window pixel 2 new_float pixel 0 # Colors set $active #536B3D set $border #313A28 set $text #BBC5B2 set $text2 #8f8f8f set $text3 #8faf9f set $bright #A3D572 set $bright2 #3F5030 set $bg #2c2c2e set $bg2 #4c4c4f set $orange #FCBF69 set $blue #98CBFE set $dblue #6095C5 set $ia #8f8f8f set $be #8faf9f set $yw #ccdc90 set $gn #97A824 set $rd #e89393 # Class Border Backgr. Text Indicator client.focused $border $dblue $text $bright client.unfocused $bg2 $bg2 $text2 $bright2 client.focused_inactive $bg2 $bg2 $text3 $bright2 client.urgent $rd $gn $yw $active # Start i3bar bar { position top status_command $XDG_CONFIG_HOME/i3status/panel.sh # show tray icons on the primary monitor tray_output primary colors { background #202023 statusline #888888 separator #444448 focused_workspace $gn $bg $gn active_workspace $bg $bg $gn inactive_workspace $bg $bg $ia urgent_workspace $rd $bg $orange } } #============================================================================== # Workspace → App assignment #------------------------------------------------------------------------------ # Media #assign [class="Vlc"] → $w2 #assign [class="mpv"] → $w2 #assign [class="Google-chrome-stable"] → $w3 #============================================================================== # App window behavior → #------------------------------------------------------------------------------ # Scratchpads for_window [class="Gvim$"] move scratchpad, scratchpad show for_window [class="Keepassx"] scratchpad show for_window [class="Keepassx" title="^(?!Auto\-Type\ \-\ KeePassX$)"] move scratchpad # Misc app behavior for_window [class="Gvim"] floating enable, border none for_window [class="Sxiv"] floating enable, border none #for_window [class="mpv"] floating enable, border none for_window [class="Vlc"] floating enable, border none for_window [class="zeal"] floating enable, border none for_window [class="Gitg"] floating enable for_window [class="Meld"] floating enable for_window [class="Pinta"] floating enable for_window [class="Klavaro"] floating enable for_window [title="\[Running\] - Oracle VM VirtualBox$"] floating enable #============================================================================== # Modes → and their key bindings #------------------------------------------------------------------------------ # Window screen-casting set $mode_cast Cast (s) small, (m) medium, (l) large mode "$mode_cast" { bindsym s exec --no-startup-id wincast small, mode "default" bindsym m exec --no-startup-id wincast medium, mode "default" bindsym l exec --no-startup-id wincast large, mode "default" bindsym Return mode "default" bindsym Escape mode "default" } bindsym $alt+F5 mode "$mode_cast" # resize window (you can also use the mouse for that) mode "resize" { # Small 5 step resize bindsym h resize shrink width 5 px or 5 ppt bindsym j resize grow height 5 px or 5 ppt bindsym k resize shrink height 5 px or 5 ppt bindsym l resize grow width 5 px or 5 ppt # Larger shrink/grow, 10 step 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 bindsym Return mode "default" bindsym Escape mode "default" } bindsym $alt+i mode "resize" # Logout confirm, uses bin/i3exit set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown mode "$mode_system" { bindsym l exec --no-startup-id i3exit lock, mode "default" bindsym e exec --no-startup-id i3exit logout, mode "default" bindsym s exec --no-startup-id i3exit suspend, mode "default" bindsym h exec --no-startup-id i3exit hibernate, mode "default" bindsym r exec --no-startup-id i3exit reboot, mode "default" bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" bindsym Return mode "default" bindsym Escape mode "default" } bindsym $alt+Pause mode "$mode_system" #-------8<---------------------------------------------------------------------