Skip to content

Instantly share code, notes, and snippets.

@mikebarkmin
Created April 13, 2017 17:55
Show Gist options
  • Save mikebarkmin/7600d06b8be7ed5b0dd12cb1116394a5 to your computer and use it in GitHub Desktop.
Save mikebarkmin/7600d06b8be7ed5b0dd12cb1116394a5 to your computer and use it in GitHub Desktop.
# 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 some time, delete
# this file and re-run i3-config-wizard(1).
#
# xrdb ~/.Xresources
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Disable Monitor Timeout
exec xset -dpms
exec xset s off
# Set Modkey to Superkey
set $mod Mod4
set $fn_mod Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below
font pango:Source Code Pro for Powerline 10px
focus_follows_mouse no
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
# 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
# start a terminal
bindsym $mod+Return exec urxvt
# start emacsclient
bindsym $mod+e exec emc
# kill focused window
bindsym $mod+q kill
# start dmenu (a program launcher)
# bindsym $mod+d 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+d exec --no-startup-id i3-dmenu-desktop --dmenu='rofi -dmenu -i'
# bindsym $mod+d exec --no-startup-id j4-dmenu-desktop
bindsym $mod+d exec "rofi -combi-modi window,drun,run -show combi -modi combi -lines 10 -width 50 -padding 20"
bindsym $mod+p exec --no-startup-id rofi-pass
bindsym $mod+n exec --no-startup-id networkmanager_dmenu dmenu_command=rofi
bindsym $mod+c exec --no-startup-id clipmenu
# 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
# pulse audio volume control
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
bindsym XF86AudioMute exec amixer -q sset Master playback toggle
bindsym XF86AudioMicMute exec amixer -q set Capture toggle
bindsym XF86MonBrightnessUp exec /usr/bin/xbacklight -inc 10
bindsym XF86MonBrightnessDown exec /usr/bin/xbacklight -dec 5
# toggle touchpad
bindsym $mod+F11 exec ~/.scripts/bin/toggle-touchpad
#
# scratchpad
bindsym $mod+Shift+plus move scratchpad
bindsym $mod+plus scratchpad show
##
# system
##
set $logout_system (l) lock, (o) logout, (s) suspend, (r) reboot, (p) poweroff
bindsym $mod+Delete mode "$logout_system"
mode "$logout_system" {
bindsym l exec $psst ~/.config/i3/i3exit.sh lock, mode "default"
bindsym o exec $psst ~/.config/i3/i3exit.sh logout, mode "default"
bindsym s exec $psst ~/.config/i3/i3exit.sh suspend, mode "default"
bindsym r exec $psst ~/.config/i3/i3exit.sh reboot, mode "default"
bindsym p exec $psst ~/.config/i3/i3exit.sh poweroff, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $cpu_system (e) energysave, (b) balanced, (p) performace
bindsym XF86Tools mode "$cpu_system"
mode "$cpu_system" {
bindsym e exec $psst ~/.config/i3/i3cpu.sh powersave, mode "default"
bindsym b exec $psst ~/.config/i3/i3cpu.sh balanced, mode "default"
bindsym p exec $psst ~/.config/i3/i3cpu.sh performance, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
##
# move floating windows with keys
bindsym $mod+m mode "move" focus floating
mode "move" {
bindsym $mod+Tab focus right
bindsym Left move left
bindsym Down move down
bindsym Up move up
bindsym Right move right
bindsym h move left
bindsym j move down
bindsym k move up
bindsym l move right
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
#display mode system
set $mode_output (h) HDMI, (v) VGA
bindsym XF86Display mode "$mode_output"
mode "$mode_output" {
bindsym h mode "$mode_hdmi"
bindsym v mode "$mode_vga"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_hdmi (i) intern, (e) extern, (c) clone, (x) extend
mode "$mode_hdmi" {
bindsym i exec $psst ~/.config/i3/i3monitor.sh hdmi intern, mode "default"
bindsym e exec $psst ~/.config/i3/i3monitor.sh hdmi extern, mode "default"
bindsym c exec $psst ~/.config/i3/i3monitor.sh hdmi clone, mode "default"
bindsym x exec $psst ~/.config/i3/i3monitor.sh hdmi extend, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_thunderbolt (i) intern, (e) extern, (c) clone, (x) extend
mode "$mode_thunderbolt" {
bindsym i exec $psst ~/.config/i3/i3monitor.sh thunderbolt intern, mode "default"
bindsym e exec $psst ~/.config/i3/i3monitor.sh thunderbolt extern, mode "default"
bindsym c exec $psst ~/.config/i3/i3monitor.sh thunderbolt clone, mode "default"
bindsym x exec $psst ~/.config/i3/i3monitor.sh thunderbolt extend, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
#display settings
set $mode_settings (a) audio, (w) wacom
bindsym $fn_mod+F1 mode "$mode_settings"
mode "$mode_settings" {
bindsym a mode "$mode_audio"
bindsym w mode "$mode_wacom"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_audio (i) intern, (h) hdmi
mode "$mode_audio" {
bindsym i exec $psst ~/.config/i3/i3audio.sh intern, mode "default"
bindsym h exec $psst ~/.config/i3/i3audio.sh hdmi, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_print (f) fullscreen, (s) select, (r) record
bindsym Print mode "$mode_print"
mode "$mode_print" {
bindsym f exec "escrotum -e 'mv $f ~/Bilder/Screenshots/; xdg-open ~/Bilder/Screenshots/$f'", mode "default"
bindsym --release s exec "escrotum -s -e 'mv $f ~/Bilder/Screenshots/; xdg-open ~/Bilder/Screenshots/$f'", mode "default"
bindsym --release r exec "simplescreenrecorder", mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# split in horizontal orientation
bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
# bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+s layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# smartborders and gaps
for_window [class="^.*"] border pixel 2
smart_borders on
gaps inner 6
gaps outer 3
# focus the parent container
#bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# define names for workspaces with some nice symbols
set $w1 1 
set $w2 2 
set $w3 3 
set $w4 4 
set $w5 5 
set $w6 6 
set $w7 7 
set $w8 8 
set $w9 9 
set $w0 0 
# switch to workspace
bindsym $mod+1 workspace $w1
bindsym $mod+2 workspace $w2
bindsym $mod+3 workspace $w3
bindsym $mod+4 workspace $w4
bindsym $mod+5 workspace $w5
bindsym $mod+6 workspace $w6
bindsym $mod+7 workspace $w7
bindsym $mod+8 workspace $w8
bindsym $mod+9 workspace $w9
bindsym $mod+0 workspace $w0
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $w1
bindsym $mod+Shift+2 move container to workspace $w2
bindsym $mod+Shift+3 move container to workspace $w3
bindsym $mod+Shift+4 move container to workspace $w4
bindsym $mod+Shift+5 move container to workspace $w5
bindsym $mod+Shift+6 move container to workspace $w6
bindsym $mod+Shift+7 move container to workspace $w7
bindsym $mod+Shift+8 move container to workspace $w8
bindsym $mod+Shift+9 move container to workspace $w9
bindsym $mod+Shift+0 move container to workspace $w0
# move workspace to other output
bindsym $mod+Shift+y move workspace to output left
bindsym $mod+Shift+x move workspace to output right
# 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
# resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
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 j resize grow height 10 px or 10 ppt
bindsym k 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"
}
# FN+F1 opens vim in terminal
# bindcode 156 exec uxterm -e zsh -c "vim ~/.config/i3/config"
# make floating apps
for_window [class="^bluej-Boot$"] floating enable
for_window [window_role="^toolbox_window$"] floating enable
for_window [window_role="^pop-up$"] floating enable
for_window [class="^Gtk-recordMyDesktop$"] floating enable
for_window [class="^Simplescreenrecorder$"] floating enable
for_window [class="^Wine$"] floating enable
for_window [title="^Edit with Emacs FRAME$"] floating enable
for_window [instance="web.whatsapp.com"] floating disable
for_window [instance="web.telegram.org"] floating disable
# assigns applications to their dedicated workspaces
assign [instance="web.whatsapp.com"] $w6
assign [instance="web.telegram.org"] $w6
assign [class="^Spotify$"] $w5
assign [class="^spotify$"] $w5
assign [class="^Claws-mail$"] $w3
assign [class="^Thunderbird$"] $w3
assign [class="^Google-chrome$"] $w2
assign [class="^jetbrains-android-studio$"] $w4
assign [class="^jetbrains-idea$"] $w4
assign [class="^jetbrains-pycharm$"] $w4
assign [class="^jetbrains-clion$"] $w4
assign [instance="__mutt"] $w3
assign [instance="__khal"] $w3
assign [instance="__rainbowstream"] $w6
assign [instance="__music"] $w5
assign [instance="__irc"] $w6
# put terminal into scratchpad
for_window [instance="__scratchpad"] move scratchpad
exec --no-startup-id urxvt -name __scratchpad
# autostarts applications
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec compton --config ~/.config/compton/config -b &
exec insync start &
exec dropbox &
exec nextcloud &
exec --no-startup-id urxvt -name __mutt -e mutt &
exec --no-startup-id urxvt -name __khal -e khal interactive &
exec --no-startup-id urxvt -name __music -e ncmpcpp &
exec --no-startup-id mopidy &
exec --no-startup-id pcmanfm -d &
exec --no-startup-id ~/.scripts/bin/twobats &
exec --no-startup-id ~/.scripts/bin/backgrounder 1200 &
exec xautolock -detectsleep -time 30 -locker "i3lock-wrapper -d" -notify 30 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 30 seconds'" &
exec random-background &
set $bgb #282a36
set $bg #282a36AA
set $fg #f8f8f2
set $tf #f8f8f2AA
set $hi #f1fa7c
set $tx #040404
set $pk #ff79c6
# yellow
set $yw #f1fa7c
# green
set $gn #50fa7b
# red
set $rd #ff5555
set $id #ff79c6
# set some nice colors border background text indicator
client.focused $id $pk $tx $id
client.unfocused $bg $bg $tf $id
client.focused_inactive $bg $bg $pk $id
client.urgent $yw $yw $tx $id
#border & indicator are ignored
client.placeholder $bg $bg $bg $bg
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
# Start i3bar to display a workspace bar
# bar {
# status_command i3blocks
# i3bar_command i3bar -t
# tray_output no # eDP1
# strip_workspace_numbers no
# position top
# font pango:Inconsolata for Powerline, FontAwesome 14px
# separator_symbol "■"
# tray_padding 0
# colors {
# statusline $fg
# background $bg
# separator $bg
# focused_workspace $bg $bg $pk
# active_workspace $bg $bg $tf
# inactive_workspace $bg $bg $tf
# urgent_workspace $yw $bg $yw
# binding_mode $rd $bg $rd
# }
# position top
# status_command i3status -c ~/.config/i3status/config
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment