Last active
January 29, 2018 08:39
-
-
Save arlimus/5883450 to your computer and use it in GitHub Desktop.
i3 configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# arlimus i3 config; public domain | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
set $mod Mod4 | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# start a terminal | |
bindsym $mod+r exec TERMINAL=xfce4-terminal i3-sensible-terminal | |
# kill focused window | |
bindsym $mod+Shift+e kill | |
# window lock | |
bindsym $mod+Shift+h exec i3lock -i gfx/w/134\ \(25\).png | |
# start dmenu (a program launcher) | |
# 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+F2 exec --no-startup-id i3-dmenu-desktop | |
# i prefer dmenu due to speed: | |
bindsym $mod+Shift+r exec dmenu_run | |
# start quickswitch to quickly jump to any application: | |
bindsym $mod+d exec --no-startup-id quickswitch.py | |
# window actions | |
bindsym $mod+Shift+m mode "resize" | |
bindsym $mod+m split h | |
bindsym $mod+comma split v | |
# change focus | |
bindsym $mod+j focus left | |
bindsym $mod+k focus down | |
bindsym $mod+i 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+j move left | |
bindsym $mod+Shift+k move down | |
bindsym $mod+Shift+i 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 | |
# 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 | |
workspace_layout tabbed | |
# 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; workspace 1 | |
bindsym $mod+Shift+2 move container to workspace 2; workspace 2 | |
bindsym $mod+Shift+3 move container to workspace 3; workspace 3 | |
bindsym $mod+Shift+4 move container to workspace 4; workspace 4 | |
bindsym $mod+Shift+5 move container to workspace 5; workspace 5 | |
bindsym $mod+Shift+6 move container to workspace 6; workspace 6 | |
bindsym $mod+Shift+7 move container to workspace 7; workspace 7 | |
bindsym $mod+Shift+8 move container to workspace 8; workspace 8 | |
bindsym $mod+Shift+9 move container to workspace 9; workspace 9 | |
bindsym $mod+Shift+0 move container to workspace 10; workspace 10 | |
# more workspace movement | |
bindsym $mod+Next workspace next_on_output | |
bindsym $mod+Prior workspace prev_on_output | |
bindsym $mod+o workspace next_on_output | |
bindsym $mod+u workspace prev_on_output | |
bindsym $mod+Shift+Next move container to workspace next; workspace next_on_output | |
bindsym $mod+Shift+Prior move container to workspace prev; workspace prev_on_output | |
bindsym $mod+Shift+o move container workspace next; workspace next_on_output | |
bindsym $mod+Shift+u move container to workspace prev; workspace prev_on_output | |
# moving the workspace between monitors | |
bindsym $mod+Shift+d move workspace to output right | |
bindsym $mod+Shift+a move workspace to output left | |
bindsym $mod+Shift+w move workspace to output VGA1 | |
bindsym $mod+Shift+s move workspace to output LVDS1 | |
# 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+z restart | |
# exit i3 (logs you out of your X session) | |
#bindsym $mod+Shift+q 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'" | |
# desktop cloning | |
bindsym $mod+Shift+x exec "xrandr --output VGA1 --auto --same-as LVDS1" | |
bindsym $mod+Shift+y exec "xrandr --output VGA1 --auto --right-of LVDS1" | |
# resize window (you can also use the mouse for that) | |
mode "resize" { | |
# These bindings trigger as soon as you enter the resize mode | |
bindsym j resize shrink width 10 px or 10 ppt | |
bindsym i 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" | |
} | |
# no bar, i use conky | |
#bar { | |
# status_command i3status | |
#} | |
# class border backgr. text indicator | |
client.focused #333333 #333333 #ffffff #2e9ef4 | |
client.focused_inactive #442222 #442222 #ffffff #484e50 | |
client.unfocused #000000 #000000 #888888 #292d2e | |
client.urgent #2f343a #900000 #ffffff #900000 | |
# window transparency adjustment | |
bindsym $mod+plus exec transset-df -a --min 0.1 --dec 0.1 | |
bindsym $mod+minus exec transset-df -a --inc 0.1 | |
# media keys | |
# via amixer: | |
#bindsym XF86AudioRaiseVolume exec amixer -q sset Master 5%+ unmute | |
#bindsym XF86AudioLowerVolume exec amixer -q sset Master 5%- unmute | |
# via pulseaudio: | |
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% && killall -SIGUSR1 i3status | |
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% && killall -SIGUSR1 i3status | |
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle | |
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle | |
# compositing: | |
# exec cairo-compmgr | |
exec_always compton --use-ewmh-active-win | |
# startup | |
# german keyboard | |
exec --no-startup-id setxkbmap de | |
# pulseaudio applet | |
exec pa-applet | |
# networkmanager applet | |
exec nm-applet | |
# automounter: | |
exec udiskie -s | |
# conky! | |
exec --no-startup-id sh -c 'cd ${HOME}/.conkycolors && ./zco.sh' | |
# background image | |
#exec_always feh --bg-scale gfx/w/134\ \(25\).jpg | |
exec_always feh --bg-scale gfx/w/transistor_02.jpg | |
# keyring | |
exec /usr/lib/gnome-settings-daemon/gnome-settings-daemon | |
# redshift | |
exec redshift | |
# disable borders | |
new_window none | |
bindsym $mod+h border toggle | |
# according to: http://sprunge.us/QgOG | |
for_window [window_role="pop-up"] floating enable | |
for_window [class="Gmrun"] floating enable | |
for_window [class="rdesktop"] floating enable | |
for_window [class="Vncviewer"] floating enable | |
for_window [class="MPlayer"] floating enable; border none | |
for_window [class="Wine"] floating enable; border none | |
for_window [class="Conky"] floating enable; border none | |
for_window [title="Firefox Preferences"] floating enable; border none | |
# some more: (use xwininfo) | |
# class, instance, window_role, title, con_mark as PCRE/Regex | |
# id, urgent, con_id as String | |
for_window [class="trayer"] floating enable; border none | |
for_window [title="OllyDbg"] floating disable; border none | |
for_window [title="Levelup"] floating enable; border none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment