Skip to content

Instantly share code, notes, and snippets.

@pharpend
Created August 9, 2017 00:32
Show Gist options
  • Save pharpend/fb26ee632654cff23617545996c36998 to your computer and use it in GitHub Desktop.
Save pharpend/fb26ee632654cff23617545996c36998 to your computer and use it in GitHub Desktop.
i3 config.
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# 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. ISO 10646 = Unicode
# 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, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and
# chose a FreeType font, such as:
# font pango:DejaVu Sans Mono 10
# font pango: Monospace 10
# font pango: Monospace 10
font pango: Roboto Mono 14
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
# bindsym $mod+Return exec urxvt
# bindsym $mod+Return exec mrxvt
bindsym $mod+Return exec terminator
# kill focused window
bindsym $mod+n kill
# start dmenu (a program launcher)
bindsym $mod+q exec dmenu_run
# 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+w exec --no-startup-id i3-dmenu-desktop
# change focus
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
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
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
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+semicolon split h
# split in vertical orientation
bindsym $mod+p split v
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+d layout stacking
bindsym $mod+f layout tabbed
bindsym $mod+space 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+d focus child
# 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
# 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
# Scratchpad stuff
bindsym $mod+bracketleft scratchpad show
bindsym $mod+bracketright move scratchpad
# reload the configuration file
bindsym $mod+Shift+s 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+f 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
# 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 n resize grow height 10 px or 10 ppt
bindsym e resize shrink height 10 px or 10 ppt
bindsym i 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"
}
exec setxkbmap us -option terminate:ctrl_alt_bksp,compose:ralt,ctrl:nocaps
# Unicomp keyboard trackpoint thing
exec xinput --set-prop 'pointer:Unicomp Endura Pro Keyboard ' 'Evdev Wheel Emulation' 1
exec xinput --set-prop 'pointer:Unicomp Endura Pro Keyboard ' 'Evdev Wheel Emulation Button' 3
# Monitor configurations
# V H
# exec (xrandr --output DVI-D-0 --auto --rotate left && xrandr --output DVI-D-1 --auto --rotate right --right-of DVI-D-0)
# H V
# exec (xrandr --output DVI-D-0 --auto --rotate normal && xrandr --output DVI-D-1 --auto --rotate left --right-of DVI-D-0)
# V V
# exec (xrandr --output DVI-D-0 --auto --rotate left && xrandr --output DVI-D-1 --auto --rotate left --right-of DVI-D-0)
# H H
# exec (xrandr --output DVI-D-0 --auto && xrandr --output DVI-D-1 --auto --right-of DVI-D-0)
# V H V
# exec (xrandr --output DVI-D-0 --auto --rotate normal && xrandr --output VGA-1 --auto --rotate left --left-of DVI-D-0 && xrandr --output DVI-D-1 --auto --rotate left --right-of DVI-D-0)
# Just the big screen
# exec (xrandr --output DVI-D-1 --auto --rotate normal && xrandr --output VGA-1 --off && xrandr --output DVI-D-0 --off)
# The big screen, with a small vertical screen to the left.
# exec (xrandr --output DVI-D-1 --auto --rotate normal && xrandr --output VGA-1 --off && xrandr --output DVI-D-0 --auto --rotate left --left-of DVI-D-1)
# The big screen, with a small horizontal screen to the left.
# exec (xrandr --output DVI-D-1 --auto --rotate normal && xrandr --output VGA-1 --off && xrandr --output DVI-D-0 --auto --left-of DVI-D-1)
# The big screen, with a small vertical screen to the right.
exec (xrandr --output DVI-D-1 --auto --rotate normal && xrandr --output VGA-1 --off && xrandr --output DVI-D-0 --auto --rotate left --right-of DVI-D-1)
# # Start i3bar to display a workspace bar (plus the system information i3status
# # finds out, if available)
# bar {
# output VGA-1
# position top
# status_command cat
# tray_output DVI-D-1
# mode dock
#
# colors {
# background #222222
# focused_workspace #222222 #222222 #eeeeee
# active_workspace #222222 #222222 #cccccc
# inactive_workspace #222222 #222222 #aaaaaa
# urgent_workspace #ee0000 #ee0000 #ffffff
# # # Solarized
# # background #073642
# # focused_workspace #073642 #073642 #eee8d5
# # active_workspace #073642 #073642 #2aa198
# # inactive_workspace #073642 #073642 #268bd2
# # urgent_workspace #dc322f #dc322f #fdf6e3
# }
# }
bar {
output DVI-D-1
position top
status_command $HOME/bin/barinfo
tray_output DVI-D-1
mode dock
colors {
background #222222
focused_workspace #222222 #222222 #eeeeee
active_workspace #222222 #222222 #cccccc
inactive_workspace #222222 #222222 #aaaaaa
urgent_workspace #ee0000 #ee0000 #ffffff
# # Solarized
# background #073642
# focused_workspace #073642 #073642 #eee8d5
# active_workspace #073642 #073642 #2aa198
# inactive_workspace #073642 #073642 #268bd2
# urgent_workspace #dc322f #dc322f #fdf6e3
}
}
bar {
output DVI-D-0
position top
status_command cat
tray_output DVI-D-1
mode dock
# These are the colors for the window borders, so I'm going to apply them here
# BorderFrame Border Title NextWindowGoesHere
#---------------------------------------------------------------------------------
# client.focused #268bd2 #268bd2 #fdf6e3 #93a1a1
# client.focused_inactive #002b36 #002b36 #d0d0d0 #93a1a1
# client.unfocused #002b36 #002b36 #d0d0d0 #93a1a1
# client.urgent #dc322f #dc322f #fdf6e3 #cb4b16
colors {
background #222222
focused_workspace #222222 #222222 #eeeeee
active_workspace #222222 #222222 #cccccc
inactive_workspace #222222 #222222 #aaaaaa
urgent_workspace #ee0000 #ee0000 #ffffff
# # Solarized
# background #073642
# focused_workspace #073642 #073642 #eee8d5
# active_workspace #073642 #073642 #2aa198
# inactive_workspace #073642 #073642 #268bd2
# urgent_workspace #dc322f #dc322f #fdf6e3
}
}
# Application keybindings
bindsym $mod+c exec firefox
bindsym $mod+g exec gksudo gufw
bindsym Control+$mod+p exec gksudo system-config-printer
bindsym Control+$mod+n exec google-chrome-stable netflix.com
bindsym $mod+e exec thunar
bindsym $mod+m exec emacs
bindsym $mod+s exec thunderbird
bindsym $mod+r exec pavucontrol
# Resize windows
bindsym Control+$mod+h resize shrink width 10 px or 10 ppt
bindsym Control+$mod+j resize grow height 10 px or 10 ppt
bindsym Control+$mod+k resize shrink height 10 px or 10 ppt
bindsym Control+$mod+l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Control+$mod+Left resize shrink width 10 px or 10 ppt
bindsym Control+$mod+Down resize grow height 10 px or 10 ppt
bindsym Control+$mod+Up resize shrink height 10 px or 10 ppt
bindsym Control+$mod+Right resize grow width 10 px or 10 ppt
bindsym Print exec scrot -e 'mv $f ~/pics/screenshots/'
bindsym F13 exec scrot -e 'mv $f ~/pics/screenshots/'
bindsym $mod+F1 exec pactl set-sink-mute bluez_sink.00_1B_66_80_B9_5B toggle
bindsym $mod+F2 exec pactl set-sink-volume bluez_sink.00_1B_66_80_B9_5B -5%
bindsym $mod+F3 exec pactl set-sink-volume bluez_sink.00_1B_66_80_B9_5B +5%
bindsym $mod+F10 exec pactl set-sink-mute alsa_output.pci-0000_00_1b.0.analog-stereo toggle
bindsym $mod+F11 exec pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo -5%
bindsym $mod+F12 exec pactl set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo +5%
bindsym $mod+F7 exec mpc prev
bindsym $mod+F8 exec mpc toggle
bindsym $mod+F9 exec mpc next
bindsym $mod+Shift+i move container to workspace prev
bindsym $mod+Shift+o move container to workspace next
bindsym $mod+i workspace prev
bindsym $mod+o workspace next
# Panel things
exec dropbox start -i
exec nm-applet
exec parcellite
# Non-panel things
exec dunst
exec emacs --daemon
exec mpd
exec nitrogen --restore
exec offlineimap
exec redshift -l 41:112
# # Solarized
# client.focused #268bd2 #268bd2 #fdf6e3 #93a1a1
# client.focused #f336a2 #f336a2 #fdf6e3 #93a1a1
# client.focused_inactive #002b36 #002b36 #d0d0d0 #93a1a1
# client.unfocused #002b36 #002b36 #d0d0d0 #93a1a1
# client.urgent #dc322f #dc322f #fdf6e3 #cb4b16
# BorderFrame Border Title NextWindowGoesHere
#---------------------------------------------------------------------------------
client.focused #ccff55 #ccff55 #413101 #ebdbb2
client.focused_inactive #555555 #555555 #dddddd #cbbb92
client.unfocused #222222 #222222 #dddddd #cbbb92
client.urgent #ee0000 #ee0000 #ffffff #cbbb92
#gaps inner 10
#gaps outer 10
focus_follows_mouse no
for_window [class="^.*"] border pixel 6
new_window 1pixel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment