i3 / .i3 / configon commit general updates (6b50dac)
   1# colours
   2set $bg-color             #268bd2
   3set $inactive-bg-color    #2f343f
   4#set $inactive-bg-color             #268bd2
   5set $text-color           #2f343f
   6set $inactive-text-color  #839495
   7set $urgent-bg-color      #dc322f
   8set $bar-color            #082833bf
   9
  10# windows key
  11set $mod Mod4
  12
  13# default font (titles & bar)
  14font pango:Ubuntu Mono derivative Powerline 11, Awesome 8
  15
  16# mouse+$mod to drag floating windows
  17floating_modifier $mod
  18
  19# terminal
  20bindsym $mod+Return exec urxvt
  21
  22# kill focused window
  23bindsym $mod+Shift+q kill
  24
  25# window colours
  26# state                 border              background          text                  indicator
  27client.focused          $bg-color           $bg-color           $text-color           $bg-color
  28client.unfocused        $inactive-bg-color  $inactive-bg-color  $inactive-text-color  $inactive-bg-color
  29client.focused_inactive $inactive-bg-color  $inactive-bg-color  $inactive-text-color  $inactive-bg-color
  30client.urgent           $urgent-bg-color    $urgent-bg-color    $text-color           $urgent-bg-color
  31
  32# rofi
  33bindsym $mod+d exec "rofi -modi drun,run -show drun -show-icons -icon-theme Numix-Circle"
  34
  35# change focus
  36bindsym $mod+h focus left
  37bindsym $mod+j focus down
  38bindsym $mod+k focus up
  39bindsym $mod+l focus right
  40
  41# alternatively, you can use the cursor keys:
  42bindsym $mod+Left focus left
  43bindsym $mod+Down focus down
  44bindsym $mod+Up focus up
  45bindsym $mod+Right focus right
  46
  47# move focused window
  48bindsym $mod+Shift+h move left
  49bindsym $mod+Shift+j move down
  50bindsym $mod+Shift+k move up
  51bindsym $mod+Shift+l move right
  52
  53# alternatively, you can use the cursor keys:
  54bindsym $mod+Shift+Left move left
  55bindsym $mod+Shift+Down move down
  56bindsym $mod+Shift+Up move up
  57bindsym $mod+Shift+Right move right
  58
  59# move workspace to other monitor
  60bindsym $mod+Control+l move workspace to output right
  61
  62# split in horizontal orientation
  63bindsym $mod+s 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)
  72#bindsym $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 h resize shrink width 10 px or 10 ppt
 151        bindsym j resize grow height 10 px or 10 ppt
 152        bindsym k resize shrink height 10 px or 10 ppt
 153        bindsym l resize grow width 10 px or 10 ppt
 154
 155        bindsym Shift+h resize shrink width 1px or 1ppt
 156        bindsym Shift+j resize grow height 1px or 1ppt
 157        bindsym Shift+k resize shrink height 1px or 1ppt
 158        bindsym Shift+l 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 $mod+p exec playerctl play-pause
 206bindsym $mod+bracketleft exec playerctl previous
 207bindsym $mod+bracketright exec playerctl next
 208bindsym XF86AudioNext exec playerctl next
 209bindsym XF86AudioPrev exec playerctl previous
 210
 211# float dialogs
 212for_window [window_type=dialog] floating enable
 213#for_window [title="^zoom$"] floating enable
 214
 215# centre splash windows
 216for_window [window_type=splash] move position center
 217
 218# don't focus popups
 219no_focus [window_type="splash"]
 220no_focus [window_role="pop-up"]
 221no_focus [window_role="^zoom$"]
 222
 223# switch to actionable windows
 224focus_on_window_activation focus
 225
 226# i3bar
 227bar {
 228  i3bar_command i3bar -t
 229  status_command exec i3blocks
 230  colors {
 231          background $bar-color
 232  }
 233  font pango:Ubuntu Mono derivative Powerline 11
 234#       status_command i3status
 235#       output VGA-0
 236}
 237
 238
 239# borders / gaps
 240for_window[class="^.*"] border pixel 4
 241gaps inner 15
 242gaps outer 0
 243
 244# startup background services
 245exec_always --no-startup-id xrdb /home/andrew/.Xdefaults
 246#exec_always --no-startup-id xrandr --output DVI-D-0 --off --output HDMI-0 --mode 2560x1440 --pos 0x181 --rotate normal --output DP-0 --off --output DP-1 --off --output HDMI-1 --mode 1920x1080 --pos 2560x0 --rotate right
 247#exec_always --no-startup-id xrandr --output DVI-D-1 --off --output HDMI-1 --primary --mode 2560x1440 --pos 0x240 --rotate normal --output DP-1 --off --output HDMI-2 --mode 1920x1080 --pos 2560x0 --rotate right
 248
 249exec_always --no-startup-id feh --bg-scale --no-xinerama /home/andrew/.wallpaper.jpg
 250exec_always --no-startup-id picom -b --config /home/andrew/.picom.conf
 251exec_always --no-startup-id xbindkeys --poll-rc
 252
 253# start GUI apps
 254exec --no-startup-id i3-msg 'workspace $ws2; exec google-chrome-stable'
 255exec --no-startup-id i3-msg 'workspace $ws1; exec urxvt'
 256exec --no-startup-id tilda