e8709b96bc9fc5caadf1ff7b2a0acf933a1cafb4
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="Chromium"] $ws2
126assign[class="Spotify"] $ws6
127assign[class="Atom"] $ws3
128
129# assign workspaces to monitors
130workspace $ws6 output VGA1
131
132# reload the configuration file
133bindsym $mod+Shift+c reload
134# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
135bindsym $mod+Shift+r restart
136# exit i3 (logs you out of your X session)
137bindsym $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'"
138
139# resize window (you can also use the mouse for that)
140mode "resize" {
141 # These bindings trigger as soon as you enter the resize mode
142
143 # Pressing left will shrink the window’s width.
144 # Pressing right will grow the window’s width.
145 # Pressing up will shrink the window’s height.
146 # Pressing down will grow the window’s height.
147 bindsym j resize shrink width 10 px or 10 ppt
148 bindsym k resize grow height 10 px or 10 ppt
149 bindsym l resize shrink height 10 px or 10 ppt
150 bindsym semicolon resize grow width 10 px or 10 ppt
151
152 # same bindings, but for the arrow keys
153 bindsym Left resize shrink width 10 px or 10 ppt
154 bindsym Down resize grow height 10 px or 10 ppt
155 bindsym Up resize shrink height 10 px or 10 ppt
156 bindsym Right resize grow width 10 px or 10 ppt
157
158 # back to normal: Enter or Escape or $mod+r
159 bindsym Return mode "default"
160 bindsym Escape mode "default"
161 bindsym $mod+r mode "default"
162}
163
164bindsym $mod+r mode "resize"
165
166# move floating windows with keys
167bindsym $mod+m mode "move" focus floating
168mode "move" {
169 bindsym $mod+Tab focus right
170
171 bindsym Left move left
172 bindsym Down move down
173 bindsym Up move up
174 bindsym Right move right
175
176 bindsym h move left
177 bindsym j move down
178 bindsym k move up
179 bindsym l move right
180
181 # back to normal: Enter or Escape
182 bindsym Return mode "default"
183 bindsym Escape mode "default"
184}
185
186# media keys
187bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 1%+
188bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 1%-
189bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle
190bindsym XF86AudioPlay exec playerctl play-pause
191bindsym XF86AudioPause exec playerctl play-pause
192bindsym XF86AudioNext exec playerctl next
193bindsym XF86AudioPrev exec playerctl previous
194
195for_window [window_type=dialog] floating enable
196
197# i3bar
198bar {
199 font pango:Ubuntu Mono derivative Powerline 11
200 i3bar_command i3bar -t
201 status_command exec i3blocks
202# status_command i3status
203# output VGA-0
204 colors {
205 background $bar-color
206 }
207}
208
209
210# borders / gaps
211for_window[class="^.*"] border pixel 5
212gaps inner 15
213gaps outer 0
214
215# startup scripts
216exec_always --no-startup-id xrdb /home/andrew/.Xdefaults
217exec_always --no-startup-id xrandr --output HDMI-0 --pos 0x0 --output DVI-D-0 --pos 240x1080
218exec_always --no-startup-id feh --bg-fill /home/andrew/.wallpaper.jpg
219exec_always --no-startup-id compton -f -b --config /home/andrew/.compton.conf
220exec --no-startup-id chromium
221exec --no-startup-id spotify
222