Skip to content

Instantly share code, notes, and snippets.

@feng92f
Created September 19, 2012 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feng92f/3750386 to your computer and use it in GitHub Desktop.
Save feng92f/3750386 to your computer and use it in GitHub Desktop.
i3 config
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
# font for window titles. ISO 10646 = Unicode
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
font xft:Terminus 9
# use Mouse+Mod4 to drag floating windows to their wanted position
floating_modifier Mod4
# start a terminal
bindsym Mod4+Return exec i3-sensible-terminal
#bindsym Mod4+Return exec gnome-terminal
# kill focused window
bindsym Mod4+Shift+q kill
# start dmenu (a program launcher)
bindsym Mod4+d exec dmenu_run
# change focus
bindsym Mod4+j focus left
bindsym Mod4+k focus down
bindsym Mod4+l focus up
bindsym Mod4+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym Mod4+Left focus left
bindsym Mod4+Down focus down
bindsym Mod4+Up focus up
bindsym Mod4+Right focus right
# move focused window
bindsym Mod4+Shift+j move left
bindsym Mod4+Shift+k move down
bindsym Mod4+Shift+l move up
bindsym Mod4+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym Mod4+Shift+Left move left
bindsym Mod4+Shift+Down move down
bindsym Mod4+Shift+Up move up
bindsym Mod4+Shift+Right move right
# split in horizontal orientation
bindsym Mod4+h split h
# split in vertical orientation
bindsym Mod4+v split v
# enter fullscreen mode for the focused container
bindsym Mod4+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym Mod4+s layout stacking
bindsym Mod4+w layout tabbed
bindsym Mod4+e layout default
# toggle tiling / floating
bindsym Mod4+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym Mod4+space focus mode_toggle
# focus the parent container
bindsym Mod4+a focus parent
# focus the child container
#bindsym Mod4+d focus child
# switch to workspace
bindsym Mod4+1 workspace 1:Chrome
bindsym Mod4+2 workspace 2:Trello
bindsym Mod4+3 workspace 3:Gmail
bindsym Mod4+4 workspace 4
bindsym Mod4+5 workspace 5
bindsym Mod4+6 workspace 6
bindsym Mod4+7 workspace 7
bindsym Mod4+8 workspace 8
bindsym Mod4+9 workspace 9
bindsym Mod4+0 workspace 10
# move focused container to workspace
bindsym Mod4+Shift+1 move container to workspace 1:Chrome
bindsym Mod4+Shift+2 move container to workspace 2:Trello
bindsym Mod4+Shift+3 move container to workspace 3:Gmail
bindsym Mod4+Shift+4 move container to workspace 4
bindsym Mod4+Shift+5 move container to workspace 5
bindsym Mod4+Shift+6 move container to workspace 6
bindsym Mod4+Shift+7 move container to workspace 7
bindsym Mod4+Shift+8 move container to workspace 8
bindsym Mod4+Shift+9 move container to workspace 9
bindsym Mod4+Shift+0 move container to workspace 10
# reload the configuration file
bindsym Mod4+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod4+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym Mod4+Shift+e exit
# 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 h resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym j resize shrink height 10 px or 10 ppt
bindsym l 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Mod4+r mode "resize"
bindsym F1 mode "default"
# Assigning special programs to proper screen
assign [class="Firefox"] → 1:Web
assign [class="Chrome"] → 1:Web
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
colors {
background #000000
statusline #bbbbbb
#focused_workspace #border #background #color
#focused_workspace #4c7899 #285577 #ffffff
focused_workspace #00cc00 #00cc00 #000000
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
}
font -misc-fixed-medium-r-normal--15-120-75-75-C-70-iso10646-1
status_command i3status
}
#Colors
client.background #000000
client.focused #4c7899 #285577 #ffffff #2e9ef4
client.focused_inactive #333333 #5f676a #ffffff #484e50
client.unfocused #333333 #222222 #888888 #292d2e
client.urgent #2f343a #900000 #ffffff #900000
#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used his favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
exec i3-config-wizard
exec goagent
exec gnome-settings-daemon
exec --no-startup-id xsetroot -solid "#333333"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment