# 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).
#

# 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.
# 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 11
#font -*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*
# 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

# kill focused window
bindsym $mod+Shift+q        kill

# 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.

# 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+g 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

# 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

# assign workspace names
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 10

# 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
bindsym $mod+Page_Up   workspace prev_on_output
bindsym $mod+Page_Down workspace next_on_output

# 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
bindsym $mod+Shift+Page_Up   move container to workspace prev_on_output
bindsym $mod+Shift+Page_Down move container to workspace next_on_output

bindsym $mod+Shift+grave move scratchpad
bindsym $mod+grave scratchpad show

# mark mode
bindsym $mod+equal               mode "mark"

mode "mark" {
  bindsym m     exec i3-winmark mark   ; mode "default"
  bindsym u     exec i3-winmark unmark ; mode "default"
  bindsym g     exec i3-winmark goto   ; mode "default"

  bindsym $mod+equal mode "default"
  bindsym Escape mode "default"
  bindsym Return mode "default"
}

# 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
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+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-msg exit'"


bindsym $mod+r mode "resize"
mode "resize" {
        bindsym Left        resize shrink   width   200 px or 12 ppt
        bindsym Down        resize grow     height  200 px or 12 ppt
        bindsym Up          resize shrink   height  200 px or 12 ppt
        bindsym Right       resize grow     width   200 px or 12 ppt
        bindsym Shift+Left  resize shrink   width   25 px or 2 ppt
        bindsym Shift+Down  resize grow     height  25 px or 2 ppt
        bindsym Shift+Up    resize shrink   height  25 px or 2 ppt
        bindsym Shift+Right resize grow     width   25 px or 2 ppt
        bindsym $mod+r      mode "default"
        bindsym Return      mode "default"
        bindsym Escape      mode "default"
}

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        status_command i3status
}

# show CapsLock state in statusbar
bindsym Caps_Lock           mode "caps"
bindsym Shift+Caps_Lock     mode "caps"
bindsym Ctrl+Caps_Lock      mode "caps"
bindsym $mod+Caps_Lock      mode "caps"
mode "caps" {
        bindsym Caps_Lock       mode "default"
        bindsym Shift+Caps_Lock mode "default"
        bindsym Ctrl+Caps_Lock  mode "default"
        bindsym $mod+Caps_Lock  mode "default"
}


### MINE
bindsym $mod+Return         exec "urxvt"
bindsym $mod+Shift+Return   exec "xfce4-terminal"
bindsym $mod+b              exec "saturnin www -1 | head -1 | uba -a"
bindsym $mod+Shift+b        exec "saturnin www -1 | uba"
bindsym $mod+i              exec "saturnin conf -j -S www.ini | saturnin dmenu -l 20 --split = | uba"
bindsym $mod+Shift+i        exec "tac .local/share/uzbl/history | uniq | saturnin dmenu -l 20 --split-field 3 | uba"
bindsym $mod+c              exec "saturnin clip save"
bindsym $mod+Shift+c        exec "saturnin clip load"
bindsym $mod+Shift+f        exec thunar
bindsym $mod+Shift+o        exec "urxvt -e mocp"

bindsym $mod+Escape         exec "saturnin iam afk"
bindsym $mod+Shift+Escape   exec "saturnin iam gone"

bindsym $mod+m              exec "saturnin conf -j -S -s dmenu.item | saturnin dmenu --split = | bash -"
bindsym $mod+Shift+m        exec "i3-dmenu-desktop --dmenu='saturnin dmenu'"
bindsym $mod+p              exec "dmenu_path | saturnin dmenu | bash -"
bindsym $mod+Shift+p        exec "tac .dmenu_history | uniq | saturnin dmenu | tee -a .dmenu_history | bash -"

bindsym $mod+n              exec "saturnin iam bbl"
bindsym $mod+Shift+n        exec "saturnin iam bbldone"

bindsym XF86AudioRaiseVolume exec "saturnin iam deaf"
bindsym XF86AudioLowerVolume exec "saturnin iam deafnomore"
bindsym XF86AudioMute        exec "saturnin iam listening"

mouse_warping none


for_window [class="Shutter"]    floating enable
for_window [class="Orage"]      floating enable

exec "newfeh"
exec "dunst"
exec "owncloud"
exec "psi"
exec "orage"
exec "orage -t"
exec "dropbox start"
exec "xchat"
exec "nm-applet"
exec "shutter --min_at_startup"