Update i3 config for current semester
- Author
- Maarten 'Vngngdn' Vangeneugden
- Date
- Oct. 4, 2017, 4:14 p.m.
- Hash
- 4a2304cf6e55ecdc5e6bb57bf896c7e1fade831f
- Parent
- d2cf11c09b6c88cb60dbe8977495c1a0849bfb8c
- Modified file
- i3/config
i3/config ¶
15 additions and 15 deletions.
View changes Hide changes
1 |
1 |
# |
2 |
2 |
# Copy this to ~/.config/sway/config and edit it to your liking. |
3 |
3 |
# |
4 |
4 |
# Read `man 5 sway` for a complete reference. |
5 |
5 |
|
6 |
6 |
### Variables |
7 |
7 |
# |
8 |
8 |
# Logo key. Use Mod1 for Alt. |
9 |
9 |
set $mod Mod4 |
10 |
10 |
# Home row direction keys, like vim |
11 |
11 |
set $left h |
12 |
12 |
set $down j |
13 |
13 |
set $up k |
14 |
14 |
set $right l |
15 |
15 |
# Your preferred terminal emulator |
16 |
16 |
set $term urxvt |
17 |
17 |
# Your preferred application launcher |
18 |
18 |
set $menu rofi -show run |
19 |
19 |
|
20 |
20 |
|
21 |
21 |
### Output configuration |
22 |
22 |
# |
23 |
23 |
# Default wallpaper (more resolutions are available in /usr/share/sway/) |
24 |
24 |
#output * bg ~/.wallpapers/Abstract\ with\ lime\ green\ and\ blue\ accents.jpg fill |
25 |
25 |
# |
26 |
26 |
# Example configuration: |
27 |
27 |
# |
28 |
28 |
# output HDMI-A-1 resolution 1920x1080 position 1920,0 |
29 |
29 |
# |
30 |
30 |
# You can get the names of your outputs by running: swaymsg -t get_outputs |
31 |
31 |
|
32 |
32 |
### Input configuration |
33 |
33 |
# |
34 |
34 |
# Example configuration: |
35 |
35 |
# |
36 |
36 |
# input "2:14:SynPS/2_Synaptics_TouchPad" { |
37 |
37 |
# dwt enabled |
38 |
38 |
# tap enabled |
39 |
39 |
# natural_scroll enabled |
40 |
40 |
# middle_emulation enabled |
41 |
41 |
# } |
42 |
42 |
# |
43 |
43 |
# You can get the names of your inputs by running: swaymsg -t get_inputs |
44 |
44 |
# The escape symbol "\" has to be removed. |
45 |
45 |
# Read `man 5 sway-input` for more information about this section. |
46 |
46 |
|
47 |
47 |
### Key bindings |
48 |
48 |
# |
49 |
49 |
# Basics: |
50 |
50 |
# |
51 |
51 |
# start a terminal |
52 |
52 |
bindsym $mod+Return exec $term |
53 |
53 |
|
54 |
54 |
# kill focused window |
55 |
55 |
bindsym $mod+Shift+q kill |
56 |
56 |
|
57 |
57 |
# start your launcher |
58 |
58 |
bindsym $mod+d exec $menu |
59 |
59 |
|
60 |
60 |
# Start GNU Emacs |
61 |
61 |
bindsym $mod+m exec emacsclient -nc -s gnuemacs |
62 |
62 |
|
63 |
63 |
# Scream in chicken |
64 |
64 |
bindsym $mod+p exec mpv ~/Movies/raaaaah.mp4 |
65 |
65 |
|
66 |
66 |
# Mouse+$mod to drag floating windows |
67 |
67 |
floating_modifier $mod |
68 |
68 |
|
69 |
69 |
# Lock screen |
70 |
70 |
bindsym $mod+i exec i3lock-wrapper |
71 |
71 |
|
72 |
72 |
# reload the configuration file |
73 |
73 |
bindsym $mod+Shift+c reload |
74 |
74 |
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) |
75 |
75 |
bindsym $mod+Shift+r restart |
76 |
76 |
# exit i3 (logs you out of your X session) |
77 |
77 |
bindsym $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'" |
78 |
78 |
# |
79 |
79 |
# Moving around: |
80 |
80 |
# |
81 |
81 |
# Move your focus around |
82 |
82 |
bindsym $mod+$left focus left |
83 |
83 |
bindsym $mod+$down focus down |
84 |
84 |
bindsym $mod+$up focus up |
85 |
85 |
bindsym $mod+$right focus right |
86 |
86 |
# or use $mod+[up|down|left|right] |
87 |
87 |
bindsym $mod+Left focus left |
88 |
88 |
bindsym $mod+Down focus down |
89 |
89 |
bindsym $mod+Up focus up |
90 |
90 |
bindsym $mod+Right focus right |
91 |
91 |
|
92 |
92 |
# _move_ the focused window with the same, but add Shift |
93 |
93 |
bindsym $mod+Shift+$left move left |
94 |
94 |
bindsym $mod+Shift+$down move down |
95 |
95 |
bindsym $mod+Shift+$up move up |
96 |
96 |
bindsym $mod+Shift+$right move right |
97 |
97 |
# ditto, with arrow keys |
98 |
98 |
bindsym $mod+Shift+Left move left |
99 |
99 |
bindsym $mod+Shift+Down move down |
100 |
100 |
bindsym $mod+Shift+Up move up |
101 |
101 |
bindsym $mod+Shift+Right move right |
102 |
102 |
# |
103 |
103 |
# Workspaces: |
104 |
104 |
# |
105 |
105 |
# switch to workspace |
106 |
106 |
bindsym $mod+1 workspace 1 |
107 |
- | bindsym $mod+2 workspace 2 |
108 |
- | bindsym $mod+3 workspace 3 |
109 |
- | bindsym $mod+4 workspace 4 |
110 |
- | bindsym $mod+5 workspace 5 |
+ |
107 |
bindsym $mod+2 workspace 2: Bachelor |
+ |
108 |
bindsym $mod+3 workspace 3: WAna1 |
+ |
109 |
bindsym $mod+4 workspace 4: Diary |
+ |
110 |
bindsym $mod+5 workspace 5 |
111 |
111 |
bindsym $mod+6 workspace 6 |
112 |
112 |
bindsym $mod+7 workspace 7 |
113 |
- | bindsym $mod+8 workspace 8: Website |
114 |
- | bindsym $mod+9 workspace 9: Games |
115 |
- | bindsym $mod+0 workspace 10: University |
116 |
- | # move focused container to workspace |
+ |
113 |
bindsym $mod+8 workspace 8 |
+ |
114 |
bindsym $mod+9 workspace 9: Website |
+ |
115 |
bindsym $mod+0 workspace 10: Leisure |
+ |
116 |
# move focused container to workspace |
117 |
117 |
bindsym $mod+Shift+1 move container to workspace 1 |
118 |
- | bindsym $mod+Shift+2 move container to workspace 2 |
119 |
- | bindsym $mod+Shift+3 move container to workspace 3 |
120 |
- | bindsym $mod+Shift+4 move container to workspace 4 |
121 |
- | bindsym $mod+Shift+5 move container to workspace 5 |
+ |
118 |
bindsym $mod+Shift+2 move container to workspace 2: Bachelor |
+ |
119 |
bindsym $mod+Shift+3 move container to workspace 3: WAna1 |
+ |
120 |
bindsym $mod+Shift+4 move container to workspace 4: Diary |
+ |
121 |
bindsym $mod+Shift+5 move container to workspace 5 |
122 |
122 |
bindsym $mod+Shift+6 move container to workspace 6 |
123 |
123 |
bindsym $mod+Shift+7 move container to workspace 7 |
124 |
124 |
bindsym $mod+Shift+8 move container to workspace 8: Website |
125 |
- | bindsym $mod+Shift+9 move container to workspace 9: Games |
126 |
- | bindsym $mod+Shift+0 move container to workspace 10: University |
127 |
- | # Note: workspaces can have any name you want, not just numbers. |
+ |
125 |
bindsym $mod+Shift+9 move container to workspace 9: Website |
+ |
126 |
bindsym $mod+Shift+0 move container to workspace 10: Leisure |
+ |
127 |
# Note: workspaces can have any name you want, not just numbers. |
128 |
128 |
# We just use 1-10 as the default. |
129 |
129 |
# |
130 |
130 |
# Layout stuff: |
131 |
131 |
# |
132 |
132 |
# You can "split" the current object of your focus with |
133 |
133 |
# $mod+b or $mod+v, for horizontal and vertical splits |
134 |
134 |
# respectively. |
135 |
135 |
bindsym $mod+b split h |
136 |
136 |
bindsym $mod+v split v |
137 |
137 |
|
138 |
138 |
# Switch the current container between different layout styles |
139 |
139 |
bindsym $mod+s layout stacking |
140 |
140 |
bindsym $mod+w layout tabbed |
141 |
141 |
bindsym $mod+e layout toggle split |
142 |
142 |
|
143 |
143 |
# Make the current focus fullscreen |
144 |
144 |
bindsym $mod+f fullscreen toggle |
145 |
145 |
|
146 |
146 |
# Toggle the current focus between tiling and floating mode |
147 |
147 |
bindsym $mod+Shift+space floating toggle |
148 |
148 |
|
149 |
149 |
# Swap focus between the tiling area and the floating area |
150 |
150 |
bindsym $mod+space focus mode_toggle |
151 |
151 |
|
152 |
152 |
# move focus to the parent container |
153 |
153 |
bindsym $mod+a focus parent |
154 |
154 |
# |
155 |
155 |
# Scratchpad: |
156 |
156 |
# |
157 |
157 |
# Sway has a "scratchpad", which is a bag of holding for windows. |
158 |
158 |
# You can send windows there and get them back later. |
159 |
159 |
|
160 |
160 |
# Move the currently focused window to the scratchpad |
161 |
161 |
bindsym $mod+Shift+minus move scratchpad |
162 |
162 |
|
163 |
163 |
# Show the next scratchpad window or hide the focused scratchpad window. |
164 |
164 |
# If there are multiple scratchpad windows, this command cycles through them. |
165 |
165 |
bindsym $mod+minus scratchpad show |
166 |
166 |
# |
167 |
167 |
# Resizing containers: |
168 |
168 |
# |
169 |
169 |
mode "resize" { |
170 |
170 |
# left will shrink the containers width |
171 |
171 |
# right will grow the containers width |
172 |
172 |
# up will shrink the containers height |
173 |
173 |
# down will grow the containers height |
174 |
174 |
bindsym $left resize shrink width 10 px or 10 ppt |
175 |
175 |
bindsym $down resize grow height 10 px or 10 ppt |
176 |
176 |
bindsym $up resize shrink height 10 px or 10 ppt |
177 |
177 |
bindsym $right resize grow width 10 px or 10 ppt |
178 |
178 |
|
179 |
179 |
# ditto, with arrow keys |
180 |
180 |
bindsym Left resize shrink width 10 px or 10 ppt |
181 |
181 |
bindsym Down resize grow height 10 px or 10 ppt |
182 |
182 |
bindsym Up resize shrink height 10 px or 10 ppt |
183 |
183 |
bindsym Right resize grow width 10 px or 10 ppt |
184 |
184 |
|
185 |
185 |
# return to default mode |
186 |
186 |
bindsym Return mode "default" |
187 |
187 |
bindsym Escape mode "default" |
188 |
188 |
} |
189 |
189 |
bindsym $mod+r mode "resize" |
190 |
190 |
|
191 |
191 |
# --recursive allows subdirectories to contain wallpapers as well, which is nice |
192 |
192 |
# if you want to organize. |
193 |
193 |
# --randomize chooses a different wallpaper for each screen (and of course, |
194 |
194 |
# randomizes during startup) |
195 |
195 |
# --bg-scale scales the wallpaper to fit the screen, so any 16:9 wallpaper is |
196 |
196 |
# scaled to fit, instead of staying oversized. |
197 |
197 |
exec_always feh --recursive --randomize --bg-scale ~/.wallpapers/* |
198 |
198 |
exec compton -b -i 0.5 |
199 |
199 |
exec polybar top |
200 |
200 |
|
201 |
201 |
|
202 |
202 |
# Makes my FN buttons work properly. |
203 |
203 |
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute |
204 |
204 |
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute |
205 |
205 |
bindsym XF86AudioToggle exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle |
206 |
206 |
|
207 |
207 |
bindsym XF86MonBrightnessDown exec light -U 5 |
208 |
208 |
bindsym XF86MonBrightnessUp exec light -A 5 |
209 |
209 |
bindsym Print exec scrot # Printscreen button |
210 |
210 |
bindsym $mod+Print exec scrot -s # scrot, but click for window, or drag for rectangle screenshot. |
211 |
211 |
|
212 |
212 |
|
213 |
213 |
# Font settings |
214 |
214 |
font pango:Ubuntu Regular 11 |
215 |
215 |
|
216 |
216 |
# Border settings |
217 |
217 |
#hide_edge_borders both |
218 |
218 |
|
219 |
219 |
# Color settings (yeah Material Design, I know, don't judge) |
220 |
220 |
|
221 |
221 |
client.focused #283593 #283593 #ffffff #283593 #283593 |
222 |
222 |
client.focused_inactive #5C6BC0 #5C6BC0 #FFFFFF #5C6BC0 #5C6BC0 |
223 |
223 |
client.unfocused #9FA8DA #9FA8DA #000000 #9FA8DA #9FA8DA |
224 |
224 |
client.urgent #D50000 #D50000 #ffffff #D50000 #D50000 |
225 |
225 |
#client.placeholder |
226 |
226 |
|
227 |
227 |
# Stops the mouse defining what the active window is. |
228 |
228 |
focus_follows_mouse no |
229 |
229 |
|
230 |
230 |
# i3-gaps configuration |
231 |
231 |
# |
232 |
232 |
# i3-gaps can only work properly if title bars are completely disabled, which the |
233 |
233 |
# next line is responsible for. |
234 |
234 |
for_window [class="^.*"] border pixel 5 |
235 |
235 |
|
236 |
236 |
gaps inner 15 |
237 |
237 |
gaps outer 5 |
238 |
238 |
# smart_gaps disables gaps if there is only 1 container on the workspace. |
239 |
239 |
smart_gaps on |
240 |
240 |
# smart_borders does the same thing. If set to "on", it will always disable the |
241 |
241 |
# border if it's the only container on the workspace. If set to "no-gaps", it |
242 |
242 |
# only disables the border if the gap size to the edge of the screen is 0. |
243 |
243 |
smart_borders no_gaps |