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