]>
Commit | Line | Data |
---|---|---|
1 | ### load system | |
2 | include /etc/sway/config.d/* | |
3 | ||
4 | ### exports | |
5 | # XXX: this works but I feel like it shouldn't | |
6 | exec '\ | |
7 | export XDG_SESSION_TYPE=${XDG_SESSION_TYPE:-wayland}; \ | |
8 | export QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-wayland-egl}; \ | |
9 | export QT_WAYLAND_DISABLE_WINDOWDECORATION=${QT_WAYLAND_DISABLE_WINDOWDECORATION:--1}; \ | |
10 | export SDL_VIDEODRIVER=${SDL_VIDEODRIVER:-wayland}; \ | |
11 | export TERMINAL=${TERMINAL:-footclient}' | |
12 | ||
13 | ### daemons | |
14 | exec dunst | |
15 | exec foot --server | |
16 | #exec mpc-notify -d | |
17 | exec swayidle timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' | |
18 | # x220t | |
19 | # TODO: check hostname to load auxillary things | |
20 | # TODO: reformat for linux | |
21 | #exec acpi_ac "0x0`sysctl -n hw.acpi.acline`" | |
22 | ||
23 | ### Xorg config | |
24 | xwayland force | |
25 | # XXX: this works but I feel like it shouldn't | |
26 | exec xrdb -merge ~/.Xresources | |
27 | exec '\ | |
28 | find -L "$${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do \ | |
29 | [ -f "$$x/fonts.dir" ] && xset +fp "$$x"; \ | |
30 | done; \ | |
31 | xset fp rehash' | |
32 | ||
33 | ### inputs | |
34 | input 1:1:AT_Translated_Set_2_keyboard { | |
35 | xkb_layout us | |
36 | xkb_options caps:super | |
37 | xkb_numlock enable | |
38 | repeat_delay 290 | |
39 | repeat_rate 26 | |
40 | } | |
41 | ||
42 | ### binds | |
43 | set $mod Mod4 | |
44 | ||
45 | bindsym $mod+Shift+r reload | |
46 | bindsym $mod+Shift+e exec swaynag -t warning -m Exit? -b Yes 'swaymsg exit' | |
47 | ||
48 | ## terminal | |
49 | bindsym $mod+Return exec [ -n "$$TERMINAL" ] && exec $$TERMINAL || exec footclient | |
50 | bindsym $mod+KP_Enter exec [ -n "$$TERMINAL" ] && exec $$TERMINAL || exec footclient | |
51 | ||
52 | ## menu | |
53 | bindsym $mod+d exec nwgdmenu | |
54 | bindsym $mod+Shift+d exec nwggrid | |
55 | bindsym $mod+Ctrl+d exec nwgbar | |
56 | ||
57 | ## special | |
58 | # mpc | |
59 | #bindsym XF86AudioPlay exec mpc -h /var/mpd/socket play | |
60 | #bindsym XF86AudioStop exec mpc -h /var/mpd/socket pause | |
61 | #bindsym XF86AudioPrev exec mpc -h /var/mpd/socket cdprev | |
62 | #bindsym XF86AudioNext exec mpc -h /var/mpd/socket next | |
63 | # x220t bezel buttons | |
64 | #bindcode 198 exec rotate set normal | |
65 | #bindcode 204 exec rotate right | |
66 | ||
67 | ## window management | |
68 | set $up k | |
69 | set $down j | |
70 | set $left h | |
71 | set $right l | |
72 | set $up2 Up | |
73 | set $down2 Down | |
74 | set $left2 Left | |
75 | set $right2 Right | |
76 | ||
77 | bindsym $mod+$left focus left | |
78 | bindsym $mod+$down focus down | |
79 | bindsym $mod+$up focus up | |
80 | bindsym $mod+$right focus right | |
81 | bindsym $mod+$left2 focus left | |
82 | bindsym $mod+$down2 focus down | |
83 | bindsym $mod+$up2 focus up | |
84 | bindsym $mod+$right2 focus right | |
85 | bindsym $mod+a focus parent | |
86 | bindsym $mod+z focus child | |
87 | bindsym $mod+Shift+$left move left | |
88 | bindsym $mod+Shift+$down move down | |
89 | bindsym $mod+Shift+$up move up | |
90 | bindsym $mod+Shift+$right move right | |
91 | bindsym $mod+Shift+$left2 move left | |
92 | bindsym $mod+Shift+$down2 move down | |
93 | bindsym $mod+Shift+$up2 move up | |
94 | bindsym $mod+Shift+$right2 move right | |
95 | ||
96 | bindsym $mod+i split h | |
97 | bindsym $mod+o split v | |
98 | ||
99 | floating_modifier $mod | |
100 | bindsym $mod+Shift+space floating toggle | |
101 | bindsym $mod+space focus mode_toggle | |
102 | ||
103 | bindsym $mod+f fullscreen toggle | |
104 | bindsym $mod+Shift+f fullscreen toggle global | |
105 | ||
106 | bindsym $mod+s layout stacking | |
107 | bindsym $mod+w layout tabbed | |
108 | bindsym $mod+e layout toggle split | |
109 | ||
110 | bindsym $mod+Shift+q kill | |
111 | ||
112 | bindsym $mod+Shift+minus move scratchpad | |
113 | bindsym $mod+minus scratchpad show | |
114 | ||
115 | bindsym $mod+1 workspace 1 | |
116 | bindsym $mod+2 workspace 2 | |
117 | bindsym $mod+3 workspace 3 | |
118 | bindsym $mod+4 workspace 4 | |
119 | bindsym $mod+5 workspace 5 | |
120 | bindsym $mod+6 workspace 6 | |
121 | bindsym $mod+7 workspace 7 | |
122 | bindsym $mod+8 workspace 8 | |
123 | bindsym $mod+9 workspace 9 | |
124 | bindsym $mod+0 workspace 10 | |
125 | workspace_auto_back_and_forth yes | |
126 | ||
127 | bindsym $mod+Shift+1 move container to workspace 1 | |
128 | bindsym $mod+Shift+2 move container to workspace 2 | |
129 | bindsym $mod+Shift+3 move container to workspace 3 | |
130 | bindsym $mod+Shift+4 move container to workspace 4 | |
131 | bindsym $mod+Shift+5 move container to workspace 5 | |
132 | bindsym $mod+Shift+6 move container to workspace 6 | |
133 | bindsym $mod+Shift+7 move container to workspace 7 | |
134 | bindsym $mod+Shift+8 move container to workspace 8 | |
135 | bindsym $mod+Shift+9 move container to workspace 9 | |
136 | bindsym $mod+Shift+0 move container to workspace 10 | |
137 | ||
138 | mode "translate" { | |
139 | bindsym $left resize shrink width 20 px | |
140 | bindsym $down resize grow height 20 px | |
141 | bindsym $up resize shrink height 20 px | |
142 | bindsym $right resize grow width 20 px | |
143 | bindsym $left2 resize shrink width 20 px | |
144 | bindsym $down2 resize grow height 20 px | |
145 | bindsym $up2 resize shrink height 20 px | |
146 | bindsym $right2 resize grow width 20 px | |
147 | ||
148 | bindsym Shift+$left move left 20 px | |
149 | bindsym Shift+$down move down 20 px | |
150 | bindsym Shift+$up move up 20 px | |
151 | bindsym Shift+$right move right 20 px | |
152 | bindsym Shift+$left2 move left 20 px | |
153 | bindsym Shift+$down2 move down 20 px | |
154 | bindsym Shift+$up2 move up 20 px | |
155 | bindsym Shift+$right2 move right 20 px | |
156 | ||
157 | # smaller movements | |
158 | bindsym Control+$left resize shrink width 1 px or 1 ppt | |
159 | bindsym Control+$down resize grow height 1 px or 1 ppt | |
160 | bindsym Control+$up resize shrink height 1 px or 1 ppt | |
161 | bindsym Control+$right resize grow width 1 px or 1 ppt | |
162 | bindsym Control+$left2 resize shrink width 1 px or 1 ppt | |
163 | bindsym Control+$down2 resize grow height 1 px or 1 ppt | |
164 | bindsym Control+$up2 resize shrink height 1 px or 1 ppt | |
165 | bindsym Control+$right2 resize grow width 1 px or 1 ppt | |
166 | ||
167 | bindsym Control+Shift+$left move left 1 px | |
168 | bindsym Control+Shift+$down move down 1 px | |
169 | bindsym Control+Shift+$up move up 1 px | |
170 | bindsym Control+Shift+$right move right 1 px | |
171 | bindsym Control+Shift+$left2 move left 1 px | |
172 | bindsym Control+Shift+$down2 move down 1 px | |
173 | bindsym Control+Shift+$up2 move up 1 px | |
174 | bindsym Control+Shift+$right2 move right 1 px | |
175 | ||
176 | # focus | |
177 | bindsym $mod+a focus parent | |
178 | bindsym $mod+z focus child | |
179 | ||
180 | # floating | |
181 | bindsym $mod+Shift+space floating toggle | |
182 | bindsym $mod+space focus mode_toggle | |
183 | ||
184 | # exit | |
185 | bindsym Return mode default | |
186 | bindsym Escape mode default | |
187 | bindsym $mod+r mode default | |
188 | } | |
189 | bindsym $mod+r mode "translate" | |
190 | ||
191 | ||
192 | ### appearance | |
193 | font pango:monospace 10 | |
194 | seat seat0 xcursor_theme Paper 16 | |
195 | ## borders | |
196 | default_border pixel 1 | |
197 | hide_edge_borders smart | |
198 | gaps inner 6 | |
199 | smart_gaps on | |
200 | ## colors | |
201 | # generic | |
202 | set $bg #110800 | |
203 | set $fg #93a1a1 | |
204 | # focused | |
205 | set $f_bdr #cc6600 | |
206 | set $f_bg #aa5500 | |
207 | set $f_fg #eee8d5 | |
208 | set $f_ind #4466ff | |
209 | set $f_chb #cc6600 | |
210 | # inactive | |
211 | set $i_bdr #884400 | |
212 | set $i_bg #221100 | |
213 | set $i_fg $fg | |
214 | set $i_ind #264bd2 | |
215 | set $i_chb #884400 | |
216 | # urgent | |
217 | set $u_bdr #ff4444 | |
218 | set $u_bg #dc322f | |
219 | set $u_fg #000000 | |
220 | set $u_ind #4466ff | |
221 | set $u_chb #ff4444 | |
222 | # blue | |
223 | set $b_bdr #4466ff | |
224 | set $b_bg #268bd2 | |
225 | set $b_fg #fdf6e3 | |
226 | set $b_ind #264db2 | |
227 | set $b_chb #4466ff | |
228 | # class border backgr. text indicator child_border | |
229 | client.focused $f_bdr $f_bg $f_fg $f_ind $f_chb | |
230 | client.focused_inactive $i_bdr $i_bg $i_fg $i_ind $i_chb | |
231 | client.unfocused $i_bdr $i_bg $i_fg $i_ind $i_chb | |
232 | client.urgent $u_bdr $u_bg $u_fg $u_ind $u_chb | |
233 | client.placeholder $b_bdr $b_bg $b_fg $b_ind $b_chb | |
234 | client.background #221100 | |
235 | force_display_urgency_hint 2000 ms | |
236 | ||
237 | bar { | |
238 | position top | |
239 | tray_output primary | |
240 | status_command i3status | |
241 | separator_symbol "|" | |
242 | ||
243 | colors { | |
244 | background $bg | |
245 | statusline $fg | |
246 | separator $b_ind | |
247 | ||
248 | # class border backgr. text | |
249 | focused_workspace $f_bdr $f_bg $f_fg | |
250 | active_workspace $i_bdr $i_bg $i_fg | |
251 | inactive_workspace $i_bdr $i_bg $i_fg | |
252 | urgent_workspace $u_bdr $u_bg $u_fg | |
253 | binding_mode $b_bdr $b_bg $b_fg | |
254 | } | |
255 | } | |
256 | ||
257 | ### load site-local | |
258 | include config.d/* |