Created
December 13, 2015 01:46
-
-
Save learningjs/e0f72e25be454b8c52d7 to your computer and use it in GitHub Desktop.
i3wm config
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
# 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! | |
# sources | |
# https://github.com/nim-/dotfiles/blob/master/.i3/config (gaps) | |
# Airblader/i3 | |
# gaps inner all set 20 | |
# gaps outer current plus 5 | |
gaps inner 10 | |
gaps outer 5 | |
smart_gaps on | |
# 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:Anonymous Pro 11 | |
###################################### | |
# i3 binding # | |
###################################### | |
set $mod Mod4 | |
# xkill | |
#bindsym Shift+x exec --no-startup-id xkill | |
# xkill | |
bindsym $mod+c exec --no-startup-id conky | |
bindsym $mod+Control+c exec --no-startup-id killall conky && i3-msg restart | |
# volume | |
#bindsym XF86AudioLowerVolume exec /usr/bin/pactl set-sink-volume 0 -- '-5%' | |
#bindsym XF86AudioRaiseVolume exec /usr/bin/pactl set-sink-volume 0 -- '+5% | |
# pulse audio volume control | |
#bindsym XF86AudioLowerVolume exec /usr/bin/pactl set-sink-volume @DEFAULT_SINK@ '-10%' && notify-send "<<" -t 1000 && mplayer "/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga" >/dev/null& | |
#bindsym XF86AudioRaiseVolume exec /usr/bin/pactl set-sink-volume @DEFAULT_SINK@ '+10%' | |
#bindsym XF86AudioMute exec /usr/bin/pactl set-sink-volume @DEFAULT_SINK@ 0 | |
bindsym XF86AudioRaiseVolume exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_volume + 5 | |
bindsym XF86AudioLowerVolume exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_volume - 5 | |
bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_volume + 10 | |
bindsym Shift+XF86AudioLowerVolume exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_volume - 10 | |
bindsym XF86AudioMute exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_volume ! | |
# screen | |
#bindsym XF86MonBrightnessUp exec xbacklight -inc 5 && notify-send -t 1000 `xbacklight -get` | |
#bindsym XF86MonBrightnessDown exec xbacklight -dec 5 | |
bindsym XF86MonBrightnessUp exec --no-startup-id $HOME/dotfiles/wms/i3/scripts/brightness +5 | |
bindsym XF86MonBrightnessDown exec --no-startup-id $HOME/dotfiles/wms/i3/scripts/brightness -5 | |
# music - mpd | |
bindsym XF86AudioPlay exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_mpd -t | |
bindsym XF86AudioNext exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_mpd -n | |
bindsym XF86AudioPrev exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/notify_mpd -p | |
# only on local now | |
bindsym $mod+Shift+x exec --no-startup-id dmenu_xmms2 | |
# start a terminal | |
bindsym $mod+Return exec ~/dotfiles/bin/i3-sensible-terminal | |
# kill focused window | |
bindsym $mod+Shift+q kill | |
# window change focus | |
bindsym $mod+j focus left | |
bindsym $mod+k focus down | |
bindsym $mod+l focus up | |
bindsym $mod+semicolon 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+l move up | |
bindsym $mod+Shift+semicolon 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 | |
# container splitting | |
# 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+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 | |
# toggling | |
# toggle tiling / floating | |
bindsym $mod+Shift+space floating toggle | |
# Use Mouse+$mod to drag floating windows to their wanted position | |
floating_modifier $mod | |
# change focus between tiling / floating windows | |
bindsym $mod+space focus mode_toggle | |
# toggle between stacking/tabbed/split/splith/splitv | |
bindsym $mod+x layout toggle all | |
# toggle borders | |
bindsym $mod+b border toggle | |
# focus the parent container | |
bindsym $mod+a focus parent | |
# focus the child container | |
#bindsym $mod+d focus child | |
# new window defaults | |
new_window pixel 0 | |
new_float none | |
hide_edge_borders both | |
# configuration management | |
# reload the configuration file | |
bindsym $mod+Shift+Control+c reload | |
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) | |
bindsym $mod+Shift+Control+r restart | |
# exit i3 (logs you out of your X session) | |
bindsym $mod+Shift+Control+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'" | |
###################################### | |
# workspaces # | |
###################################### | |
# navigation | |
# prev next workspace | |
bindsym $mod+comma workspace prev | |
bindsym $mod+period workspace next | |
# tab between recent workspaces | |
bindsym $mod+Tab workspace back_and_forth | |
# setting workspaces variables | |
set $ws1 "1:" | |
set $ws2 "2:" | |
set $ws3 "3:" | |
set $ws4 "4:" | |
set $ws5 "5:" | |
set $ws10 "10:" | |
# 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+1 workspace 1: | |
#workspace 6| output DVI-I-1 | |
#workspace 7| output DP-1 | |
bindsym $mod+1 workspace $ws1 | |
bindsym $mod+2 workspace $ws2 | |
bindsym $mod+3 workspace $ws3 | |
bindsym $mod+4 workspace $ws4 | |
bindsym $mod+5 workspace $ws5 | |
bindsym $mod+6 workspace 6 | |
bindsym $mod+7 workspace 7 | |
bindsym $mod+8 workspace 8 | |
bindsym $mod+9 workspace 9 | |
bindsym $mod+0 workspace $ws10 | |
# 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+1 move container to workspace $ws1 | |
bindsym $mod+Shift+2 move container to workspace $ws2 | |
bindsym $mod+Shift+3 move container to workspace $ws3 | |
bindsym $mod+Shift+4 move container to workspace $ws4 | |
bindsym $mod+Shift+5 move container to workspace $ws5 | |
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 $ws10 | |
###################################### | |
# modes # | |
###################################### | |
# mode_system | |
# TODO - find author | |
set $mode_system System (l) lock , (e) logout , (s) suspend , (h) hibernate , (r) reboot , (Shift+s) shutdown | |
mode "$mode_system" { | |
bindsym l exec --no-startup-id ~/dotfiles/bin/i3exit lock, mode "default" | |
bindsym e exec --no-startup-id ~/dotfiles/bin/i3exit logout, mode "default" | |
bindsym s exec --no-startup-id ~/dotfiles/bin/i3exit suspend, mode "default" | |
bindsym h exec --no-startup-id ~/dotfiles/bin/i3exit hibernate, mode "default" | |
bindsym r exec --no-startup-id ~/dotfiles/bin/i3exit reboot, mode "default" | |
bindsym Shift+s exec --no-startup-id ~/dotfiles/bin/i3exit shutdown, mode "default" | |
# back to normal: Enter or Escape | |
bindsym Return mode "default" | |
bindsym Escape mode "default" | |
} | |
bindsym $mod+Shift+F2 mode "$mode_system" | |
bindsym $mod+Shift+Control+F2 exec 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 j resize shrink width 10 px or 10 ppt | |
bindsym k resize grow height 10 px or 10 ppt | |
bindsym l resize shrink height 10 px or 10 ppt | |
bindsym semicolon 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" | |
###################################### | |
# bar # | |
###################################### | |
# setting bar variables | |
set $font font pango:FontAwesome 10.3 | |
# set $font font pango:Pro Font Windows 9, Icons 8 | |
#set $font font pango:Anonymous Pro 11 | |
#set $font font pango:InconsolataForPowerline 11 | |
set $background #2b2b2b | |
#set $background #383A3B | |
#set $background #131D24 | |
set $statusline #dedede | |
#statusline #999999 | |
set $separator #555555 | |
#color class border back text | |
set $active_workspace #555555 #2b2b2b #6C9565 | |
#set $active_workspace #555555 #555555 #ffffff | |
#set $focused_workspace #2b2b2b #202020 #8Cf595 | |
set $focused_workspace $separator #202020 #8Cf595 | |
#set $focused_workspace #555555 #2b2b2b #6C9595 | |
#set $focused_workspace #555555 #2b2b2b #ff0077 | |
#set $focused_workspace #007030 #007030 #6C9565 | |
set $inactive_workspace #2b2b2b #303030 #6C9565 | |
#set $inactive_workspace #2b2b2b #2b2b2b #aaaaaa | |
#set $inactive_workspace #2b2b2b #1f #ff0077 | |
#set $inactive_workspace #00000 #311C1C #6C9565 | |
set $urgent_workspace #2f343a #900000 #ffffff | |
# originals | |
#focused_workspace #232D34 #232D34 #93AE03 | |
#active_workspace #232D34 #232D34 #999999 | |
#inactive_workspace #131D24 #131D24 #999999 | |
#urgent_workspace #999999 #999999 #B33A3A | |
# Start i3bar to display a workspace bar | |
# (plus the system information i3status finds out, if available) | |
bar { | |
#status_command i3status --config ~/.i3/i3status.arch.conf | |
status_command i3blocks -c ~/.i3/i3blocks.arch.conf | |
#status_command i3status --config ~/.i3/i3status.conf | |
#status_command i3blocks -c ~/.i3/i3blocks.conf | |
# status_command i3blocks | |
#status_command ~/.i3/conkyi3 | |
position bottom | |
# hides bar, $mod shows it | |
mode hide | |
# works with i3-gapps | |
#https://github.com/Airblader/i3 | |
height 30 | |
#strip_workspace_numbers yes | |
$font | |
colors { | |
background $background | |
statusline $statusline | |
separator $separator | |
#active_workspace $active_workspace | |
focused_workspace $focused_workspace | |
inactive_workspace $inactive_workspace | |
urgent_workspace $urgent_workspace | |
} | |
} | |
# start dmenu (a program launcher) | |
# dmenu | |
#bindsym $mod+d exec --no-startup-id dmenu_run -fn "-*-terminus-medium-*-*-*-24-*-*-*-*-*-*-*" -sb "#6C9565" -nb "#1D1F21" -nf "#6C9565" -sf "#8Cf595" | |
# dmenu 2 | |
bindsym $mod+d exec --no-startup-id dmenu_run -p "run: " -q -fn "Anonymice for Powerline-20:bold" -sb "#6C9565" -nb "#1D1F21" -nf "#6C9565" -sf "#8Cf595" -x 40 -y 300 -w 1200 -h 100 -o -.5 -dim 0.5 -dc "#1D1F21" | |
# config: ~/.config/dmenu-extended/config/dmenuExtended_preferences.txt | |
bindsym $mod+Shift+d exec --no-startup-id dmenu_extended_run | |
#bindsym $mod+Shift+Control+d exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/dmenu/spotlight | |
bindsym $mod+Shift+Control+w exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/dmenu/wallpaper | |
bindsym $mod+Shift+Control+d exec --no-startup-id $HOME/dotfiles/wms/commons/scripts/lens | |
# http://askubuntu.com/questions/326907/custom-font-with-dmenu | |
#bindsym $mod+d exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -b -f -q -r -i -name 'Dmenu' -dim 0.5 -l 20 -p 'Execute' -fn 'Liberation Sans-10' -y 600 -w 200 -nb '#131D24' -nf '#999999' -sb '#131D24' -sf '#93AE03'" | |
# bindsym $mod+Shift+Control+d exec --no-startup-id quickswitch.py | |
#bindsym $mod+Shift+d exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -b -f -i -p 'Execute' -l 20R -fn '-*-anonymous-pro-for-powerline-*-*-*-14-*-*-*-*-*-*-*' -nb '#131D24' -nf '#999999' -sb '#131D24' -sf '#93AE03'" --display-binary | |
# 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 | |
bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks | |
# windows title bar colors | |
# border background text | |
#client.focused #9fbc00 #9fbc00 #111111 | |
client.focused $background #8Cf595 #6C9565 | |
#client.unfocused #505E00 #505E00 #cccccc | |
client.unfocused $background $background #8Cf595 | |
#client.focused_inactive #315858 #315858 #cccccc | |
client.focused_inactive #315858 #315858 #8Cf595 | |
#client.urgent #383a3b #383a3b #cccccc | |
client.urgent #383a3b #383a3b #cccccc | |
###################################### | |
# personal configuration # | |
###################################### | |
# goes to the next open VIM instance | |
bindsym $mod+z [class="terminal" title="VIM"] focus | |
# starts/kills apps | |
# http://www.pushingbits.net/posts/from-ubuntu-gnome-classic-to-i3/ | |
# network manager icon | |
exec --no-startup-id nm-applet | |
# menu for switching keyboard layouts, hardware keys (mute, volume) | |
# and automatic suspend on closing the lid | |
exec --no-startup-id gnome-settings-daemon | |
# dropbox | |
exec --no-startup-id ~/.dropbox-dist/dropboxd | |
# updates | |
#/usr/lib/update-notifier/apt-check | |
# xmms2tray | |
exec --no-startup-id xmms2tray | |
###################################### | |
# startup stuff and window restoring # | |
###################################### | |
#exec --no-startup-id compton "-i 0.5" | |
#exec --no-startup-id compton "--config /etc/xdg/compton.config" | |
#exec --no-startup-id xfsettingsd | |
#exec --no-startup-id killall xfsettingsd | |
exec --no-startup-id ~/dotfiles/bin/i3wm-xfsettings_launch | |
# wallpapers | |
#exec --no-startup-id exec /home/drake/scripts/unityAndNitrogen.sh & #makes sure unity-settings-daemon is executed before nitrogen | |
exec nitrogen --restore | |
#exec --no-startup-id manjaro-settings-manager-daemon | |
#exec --no-startup-id manjaro-welcome | |
#exec --no-startup-id xfce4-clipman | |
#exec --no-startup-id xfce4-power-manager | |
exec --no-startup-id pa-applet | |
exec --no-startup-id start-pulseaudio-x11 | |
exec --no-startup-id /usr/bin/smbdb | |
#exec --no-startup-id pamac-tray | |
# http://jjacky.com/kalu/ - "Keeping Arch Linux Up-to-date" | |
exec --no-startup-id kalu | |
#exec --no-startup-id i3-msg 'workspace $ws1; exec google-chrome-stable' | |
#exec --no-startup-id i3-msg 'workspace $ws2; exec i3-sensible-terminal' | |
#exec --no-startup-id i3-msg 'workspace $ws4; pcmanfm' | |
#exec --no-startup-id i3-msg 'workspace $ws10; exec gnome-system-monitor' | |
#exec --no-startup-id xautolock -time 45 -locker lock & | |
#workspace windows | |
#workspace "10: Mail " output DisplayPort-3 | |
#workspace "2: VNC " output DisplayPort-1 | |
#workspace "0: Video " output DisplayPort-4 | |
#workspace "1: System_Monitor " output DisplayPort-1 | |
################################### | |
# on-demand application launching # | |
################################### | |
#launch calculator in floating mode | |
bindsym $mod+Shift+c exec gnome-calculator | |
for_window [title="Calculator"] floating enable | |
#launch browser | |
#bindsym $mod+b exec firefox | |
#bindsym $win+b exec google-chrome-stable | |
# Firefox | |
bindsym $mod+Shift+f exec firefox | |
assign [class="Firefox"] $ws1 | |
bindsym $mod+Control+f [class="Firefox"] kill | |
# Google Chrome | |
bindsym $mod+Shift+g exec google-chrome-unstable | |
assign [title="Google Chrome"] $ws1 | |
#for_window [class="Google Chrome"] move to workaspace 1 | |
#bindsym $mod+g [title="Google Chrome"], move to workspace 8 | |
#bindsym $mod+Shift+g [class="Google Chrome" title="Google Chrome"] focus | |
#bindsym $mod+Shift+g [title="Google Chrome"] focus | |
#screenshots | |
bindsym --release Print exec scrot -c -d 3 screenshot-$(date +%Y-%m-%d_%T_%Z%:z_%s).png -e 'mv $f ~/Pictures/screenshots' | |
bindsym --release Shift+Print exec scrot -s screenshot-$(date +%Y-%m-%d_%T_%Z%:z_%s).png -e 'mv $f ~/Pictures/screenshots' | |
bindsym --release $mod+p exec scrot -c -d 3 screenshot-$(date +%Y-%m-%d_%T_%Z%:z_%s).png -e 'mv $f ~/Pictures/screenshots' | |
bindsym --release $mod+Shift+p exec scrot -s screenshot-$(date +%Y-%m-%d_%T_%Z%:z_%s).png -e 'mv $f ~/Pictures/screenshots' | |
#settings | |
#bindsym $win+s exec unity-control-center | |
#bindsym $win+$mod+s exec unity-tweak-tool | |
#file browser | |
#bindsym $win+f exec nautilus --no-desktop | |
#system monitor | |
#bindsym $mod+control+Delete exec exec gnome-system-monitor | |
#assign [class="^Gnome-system-monitor$"] "10:" | |
# my | |
bindsym $mod+shift+m exec gnome-system-monitor | |
for_window [title="System Monitor"] move to workspace $ws10 | |
bindsym $mod+Control+m [class="System Monitor"] kill | |
bindsym $mod+Shift+e exec emacs | |
assign [class="Emacs"] $ws2 | |
#lauch synaptic | |
# bindsym $mod+Escape exec gksudo synaptic & | |
bindsym $mod+Shift+s exec gksudo synaptic & | |
assign [class="Synaptic"] 9 | |
bindsym $mod+Control+s [class="Synaptic"] kill | |
# Rhythmbox | |
bindsym $mod+Shift+h exec rhythmbox | |
assign [class="Rhythmbox"] 8 | |
#for_window [class="Rhythmbox"] move to workspace 8 | |
bindsym $mod+Control+h [class="Rhythmbox"] kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment