Skip to content

Instantly share code, notes, and snippets.

@mpenet
Last active May 2, 2018 12:41
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 mpenet/755e6915f36f5d63c4f5917b31d68fb6 to your computer and use it in GitHub Desktop.
Save mpenet/755e6915f36f5d63c4f5917b31d68fb6 to your computer and use it in GitHub Desktop.
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:terminus 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# set default layout to tabbed
workspace_layout tabbed
# start a terminal
bindsym $mod+Return exec gnome-terminal
bindsym $mod+semicolon exec gnome-terminal
# kill focused window
bindsym $mod+Mod1+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run -fn 'terminus-font:normal:pixelsize=11'
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+b focus left
bindsym $mod+n focus down
bindsym $mod+p focus up
bindsym $mod+f focus right
bindsym $mod+a focus left
# move focused window
bindsym $mod+Mod1+b move left
bindsym $mod+Mod1+n move down
bindsym $mod+Mod1+p move up
bindsym $mod+Mod1+f move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+space fullscreen toggle
# 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+Mod1+z floating toggle
# change focus between tiling / floating windows
bindsym $mod+z focus mode_toggle
# focus the parent container
# bindsym $mod+a focus parent
# Focus the child container
# bindsym $mod+d focus child
# switch to workspace
bindsym $mod+m workspace 1
bindsym $mod+comma workspace 2
bindsym $mod+period workspace 3
bindsym $mod+j workspace 4
bindsym $mod+k workspace 5
bindsym $mod+l workspace 6
bindsym $mod+u workspace 7
bindsym $mod+i workspace 8
bindsym $mod+o workspace 9
bindsym $mod+minus workspace 10
# move focused container to workspace
bindsym $mod+Mod1+m move container to workspace 1
bindsym $mod+Mod1+comma move container to workspace 2
bindsym $mod+Mod1+period move container to workspace 3
bindsym $mod+Mod1+j move container to workspace 4
bindsym $mod+Mod1+k move container to workspace 5
bindsym $mod+Mod1+l move container to workspace 6
bindsym $mod+Mod1+u move container to workspace 7
bindsym $mod+Mod1+i move container to workspace 8
bindsym $mod+Mod1+o move container to workspace 9
bindsym $mod+Mod1+minus move container to workspace 10
# reload the configuration file
bindsym $mod+Mod1+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Mod1+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Mod1+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
bindsym b resize shrink width 10 px or 10 ppt
bindsym n resize grow height 10 px or 10 ppt
bindsym p resize shrink height 10 px or 10 ppt
bindsym f 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"
set $bg #2B2B2B
set $fg #9FC59F
set $bgu #383838
set $fgu #5F7F5F
# yellow/green text colors
set $ty #F0DFAF
set $tg #8FB28F
bar {
status_command i3status
tray_output primary
colors {
# statusbar colors border background text
background $bg
statusline $fg
separator $fgu
focused_workspace $bgu $bgu $fg
active_workspace $bgu $bgu $fg
inactive_workspace $bgu $bgu $fgu
urgent_workspace $bg $bg $fg
}
}
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
#Brightness keys
bindcode 233 exec --no-startup-id xbacklight -inc 5
bindcode 232 exec --no-startup-id xbacklight -dec 5
exec --no-startup-id nm-applet --sm-disable
exec --no-startup-id xsetroot -solid "#111111"
exec --no-startup-id gnome-settings-daemon
exec --no-startup-id autokey
exec --no-startup-id pasystray
hide_edge_borders both
# Colors
# class border backgr. text
client.focused $bg $bg $fg
client.focused_inactive $bgu $bgu $fgu
client.unfocused $bgu $bgu $fgu
client.urgent #900000 #900000 #F0DFAF
# 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 += "run_watch VPN"
order += "wireless wlan0"
order += "disk /"
order += "battery 0"
order += "cpu_usage"
order += "load"
order += "tztime local"
wireless wlan0 {
format_up = "W: %essid(%quality) %ip"
format_down = "W: down"
}
battery 0 {
format = "B:%status %percentage %remaining"
}
cpu_usage {
format = "C: %usage "
}
run_watch DHCP {
pidfile = "/var/run/dhclient*.pid"
}
run_watch VPN {
pidfile = "/var/run/vpnc/pid"
}
tztime local {
format = "%m-%d %H:%M"
}
load {
format = "L:%1min"
}
disk "/" {
format = "D:%avail"
}
DIR=$(cd $(dirname "$0"); pwd)
mkdir -p ~/.config/i3/
mkdir -p ~/.config/i3status/
ln -s $DIR/i3.status ~/.config/i3status/config
ln -s $DIR/i3.config ~/.config/i3/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment