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