Skip to content

Instantly share code, notes, and snippets.

@auscompgeek
Created September 22, 2015 12:18
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 auscompgeek/3ca9009cc17d58366a97 to your computer and use it in GitHub Desktop.
Save auscompgeek/3ca9009cc17d58366a97 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!
set $mod Mod4
set $exi exec --no-startup-id
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:DejaVu Sans Mono 9
#font pango:Monospace 9
# make things usable
#workspace_auto_back_and_forth yes
focus_follows_mouse no
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $left h
set $down j
set $up k
set $right l
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# open a web browser
bindsym $mod+b exec firefox
# special laptop keys!
bindsym XF86Display exec lxrandr
# universal pause button!
bindsym Pause $exi pause-button
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu
bindsym $mod+Shift+d $exi dmenu_run
#bindsym $mod+d $exi j4-dmenu-desktop
bindsym $mod+d $exi i3-dmenu-desktop
# change focus
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+minus split h
# split in vertical orientation
bindsym $mod+Shift+bar split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+Shift+a focus child
# jump to the last urgent window
bindsym $mod+u [urgent=latest] focus
# move the currently focused window to the scratchpad
bindsym $mod+Shift+equal move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+equal scratchpad show
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
bindsym $mod+p workspace prev
bindsym $mod+n workspace next
bindsym $mod+Control+Left workspace prev
bindsym $mod+Control+Right workspace next
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
bindsym $mod+Shift+p move container to workspace prev
bindsym $mod+Shift+n move container to workspace next
bindsym $mod+Shift+Control+Left move container to workspace prev
bindsym $mod+Shift+Control+Right move container to workspace next
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e $exi "i3-nagbar -t warning -m 'Do you really want to exit i3?' -b 'Yes, exit i3' 'i3-msg exit'"
# lock the session
bindsym $mod+Control+l $exi xautolock -locknow
# resize window (you can also use the mouse)
mode "resize" {
# 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 $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
# 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 $mod+r mode "resize"
# hide borders where there aren't any containers
hide_edge_borders both
# i3bar - workspace bar + i3status
bar {
status_command i3status
}
# Autostart/Set up
#$exi sh ~/.fehbg
$exi dex -a -e i3
$exi xautolock
$exi volumeicon
$exi clipit
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 5
}
order += "ipv6"
order += "disk /"
order += "wireless _first_"
#order += "ethernet _first_"
order += "battery 0"
order += "cpu_temperature 0"
order += "load"
order += "volume master"
order += "tztime local"
wireless _first_ {
format_up = "W: %quality %essid %ip"
#format_up = "W: %quality %ip"
format_down = "W: down"
}
ethernet _first_ {
# if you use %speed, i3status requires root privileges
format_up = "E: %ip %speed"
format_down = "E: down"
}
battery 0 {
format = "%status %percentage %remaining"
#integer_battery_capacity = true
#hide_seconds = true
}
tztime local {
format = "%Y-%m-%d %H:%M"
}
load {
format = "%1min"
}
cpu_temperature 0 {
format = "%degrees°C"
}
disk "/" {
format = "%avail"
}
volume master {
format = "♪: %volume"
format_muted = "♪: muted"
device = "default"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment