i3 / .i3 / configon commit add tilda support, minor fixes (236d47d)
   1# colours
   2set $bg-color             #268bd2
   3set $inactive-bg-color    #2f343f
   4set $text-color           #2f343f
   5set $inactive-text-color  #839495
   6set $urgent-bg-color      #dc322f
   7set $bar-color            #082833cc
   8
   9# windows key
  10set $mod Mod4
  11
  12# default font (titles & bar)
  13font pango:Ubuntu Mono derivative Powerline 11, Awesome 8
  14
  15# mouse+$mod to drag floating windows
  16floating_modifier $mod
  17
  18# terminal
  19bindsym $mod+Return exec urxvt
  20
  21# kill focused window
  22bindsym $mod+Shift+q kill
  23
  24# window colours
  25# state                 border              background          text                  indicator
  26client.focused          $bg-color           $bg-color           $text-color           $bg-color
  27client.unfocused        $inactive-bg-color  $inactive-bg-color  $inactive-text-color  $inactive-bg-color
  28client.focused_inactive $inactive-bg-color  $inactive-bg-color  $inactive-text-color  $inactive-bg-color
  29client.urgent           $urgent-bg-color    $urgent-bg-color    $text-color           $urgent-bg-color
  30
  31# rofi
  32bindsym $mod+d exec rofi -show run
  33
  34# passmenu
  35bindsym $mod+p exec passmenu
  36
  37# change focus
  38bindsym $mod+j focus left
  39bindsym $mod+k focus down
  40bindsym $mod+l focus up
  41bindsym $mod+semicolon focus right
  42
  43# alternatively, you can use the cursor keys:
  44bindsym $mod+Left focus left
  45bindsym $mod+Down focus down
  46bindsym $mod+Up focus up
  47bindsym $mod+Right focus right
  48
  49# move focused window
  50bindsym $mod+Shift+j move left
  51bindsym $mod+Shift+k move down
  52bindsym $mod+Shift+l move up
  53bindsym $mod+Shift+semicolon move right
  54
  55# alternatively, you can use the cursor keys:
  56bindsym $mod+Shift+Left move left
  57bindsym $mod+Shift+Down move down
  58bindsym $mod+Shift+Up move up
  59bindsym $mod+Shift+Right move right
  60
  61# split in horizontal orientation
  62bindsym $mod+h split h
  63
  64# split in vertical orientation
  65bindsym $mod+v split v
  66
  67# enter fullscreen mode for the focused container
  68bindsym $mod+f fullscreen toggle
  69
  70# change container layout (stacked, tabbed, toggle split)
  71bindsym $mod+s layout stacking
  72bindsym $mod+w layout tabbed
  73bindsym $mod+e layout toggle split
  74
  75# toggle tiling / floating
  76bindsym $mod+Shift+space floating toggle
  77
  78# change focus between tiling / floating windows
  79bindsym $mod+space focus mode_toggle
  80
  81# focus the parent container
  82bindsym $mod+a focus parent
  83
  84# focus the child container
  85#bindsym $mod+d focus child
  86
  87# Define names for default workspaces for which we configure key bindings later on.
  88# We use variables to avoid repeating the names in multiple places.
  89set $ws1 " term"
  90set $ws2 " chrome"
  91set $ws3 " code"
  92set $ws4 "misc"
  93set $ws5 " school"
  94set $ws6 " spotify"
  95set $ws7 " evince"
  96set $ws8 " discord"
  97set $ws9 "9"
  98set $ws10 "10"
  99
 100# switch to workspace
 101bindsym $mod+1 workspace $ws1
 102bindsym $mod+2 workspace $ws2
 103bindsym $mod+3 workspace $ws3
 104bindsym $mod+4 workspace $ws4
 105bindsym $mod+5 workspace $ws5
 106bindsym $mod+6 workspace $ws6
 107bindsym $mod+7 workspace $ws7
 108bindsym $mod+8 workspace $ws8
 109bindsym $mod+9 workspace $ws9
 110bindsym $mod+0 workspace $ws10
 111
 112# move focused container to workspace
 113bindsym $mod+Shift+1 move container to workspace $ws1
 114bindsym $mod+Shift+2 move container to workspace $ws2
 115bindsym $mod+Shift+3 move container to workspace $ws3
 116bindsym $mod+Shift+4 move container to workspace $ws4
 117bindsym $mod+Shift+5 move container to workspace $ws5
 118bindsym $mod+Shift+6 move container to workspace $ws6
 119bindsym $mod+Shift+7 move container to workspace $ws7
 120bindsym $mod+Shift+8 move container to workspace $ws8
 121bindsym $mod+Shift+9 move container to workspace $ws9
 122bindsym $mod+Shift+0 move container to workspace $ws10
 123
 124# assign windows to workspaces
 125assign[class="urxvt"] $ws1
 126assign[class="Chromium"] $ws2
 127assign[class="Spotify"] $ws6
 128assign[class="Atom"] $ws3
 129
 130# assign workspaces to monitors
 131workspace $ws6 output VGA1
 132
 133# reload the configuration file
 134bindsym $mod+Shift+c reload
 135# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
 136bindsym $mod+Shift+r restart
 137# exit i3 (logs you out of your X session)
 138bindsym $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' 'i3-msg exit'"
 139
 140# resize window (you can also use the mouse for that)
 141mode "resize" {
 142        # These bindings trigger as soon as you enter the resize mode
 143
 144        # Pressing left will shrink the window’s width.
 145        # Pressing right will grow the window’s width.
 146        # Pressing up will shrink the window’s height.
 147        # Pressing down will grow the window’s height.
 148        bindsym j resize shrink width 10 px or 10 ppt
 149        bindsym k resize grow height 10 px or 10 ppt
 150        bindsym l resize shrink height 10 px or 10 ppt
 151        bindsym semicolon resize grow width 10 px or 10 ppt
 152
 153        bindsym Shift+j resize shrink width 1px or 1ppt
 154        bindsym Shift+k resize grow height 1px or 1ppt
 155        bindsym Shift+l resize shrink height 1px or 1ppt
 156        bindsym Shift+semicolon resize grow width 1px or 1ppt
 157
 158        # same bindings, but for the arrow keys
 159        bindsym Left resize shrink width 10 px or 10 ppt
 160        bindsym Down resize grow height 10 px or 10 ppt
 161        bindsym Up resize shrink height 10 px or 10 ppt
 162        bindsym Right resize grow width 10 px or 10 ppt
 163
 164        bindsym Shift+Left resize shrink width 1 px or 1 ppt
 165        bindsym Shift+Down resize grow height 1 px or 1 ppt
 166        bindsym Shift+Up resize shrink height 1 px or 1 ppt
 167        bindsym Shift+Right resize grow width 1 px or 1 ppt
 168
 169        # back to normal: Enter or Escape or $mod+r
 170        bindsym Return mode "default"
 171        bindsym Escape mode "default"
 172        bindsym $mod+r mode "default"
 173}
 174
 175bindsym $mod+r mode "resize"
 176
 177# move floating windows with keys
 178bindsym $mod+m mode "move" focus floating
 179mode "move" {
 180    bindsym $mod+Tab focus right
 181
 182    bindsym Left  move left
 183    bindsym Down  move down
 184    bindsym Up    move up
 185    bindsym Right move right
 186
 187    bindsym h     move left
 188    bindsym j     move down
 189    bindsym k     move up
 190    bindsym l     move right
 191
 192    # back to normal: Enter or Escape
 193    bindsym Return mode "default"
 194    bindsym Escape mode "default"
 195}
 196
 197# media keys
 198bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 1%+
 199bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 1%-
 200bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle
 201bindsym XF86AudioPlay exec playerctl play-pause
 202bindsym XF86AudioPause exec playerctl play-pause
 203bindsym XF86AudioNext exec playerctl next
 204bindsym XF86AudioPrev exec playerctl previous
 205
 206for_window [window_type=dialog] floating enable
 207
 208# i3bar
 209bar {
 210        font pango:Ubuntu Mono derivative Powerline 11
 211        i3bar_command i3bar -t
 212        status_command exec i3blocks
 213#       status_command i3status
 214#       output VGA-0
 215        colors {
 216                background $bar-color
 217        }
 218}
 219
 220
 221# borders / gaps
 222default_border pixel 5
 223for_window[class="Tilda"] border pixel 0
 224gaps inner 15
 225gaps outer 0
 226
 227# startup background services
 228exec_always --no-startup-id xrdb /home/andrew/.Xdefaults
 229exec_always --no-startup-id xrandr --output HDMI-0 --pos 0x0 --output DVI-D-0 --pos 240x1080
 230exec_always --no-startup-id feh --bg-fill /home/andrew/.wallpaper.jpg
 231exec_always --no-startup-id compton -b --config /home/andrew/.compton.conf
 232exec_always --no-startup-id tilda
 233
 234# start GUI apps
 235exec --no-startup-id i3-msg 'workspace $ws2; exec chromium'
 236exec --no-startup-id i3-msg 'workspace $ws6; exec spotify'
 237exec --no-startup-id i3-msg 'workspace $ws1; exec urxvt'