diff options
author | Max Christian Pohle | 2020-02-02 16:07:37 +0100 |
---|---|---|
committer | Max Christian Pohle | 2020-02-02 16:07:37 +0100 |
commit | 0f5a68c2c6e15216f9357dd80310ee65a1dc6245 (patch) | |
tree | d93887b6a1ea6360bf4fd39a006090e7e89b27c9 /01-config.conf | |
parent | 72821c3fa130753100088177a09a730abe39ba6b (diff) | |
download | sway-staging.tar.bz2 sway-staging.zip |
playing aroundstaging
Diffstat (limited to '01-config.conf')
-rw-r--r-- | 01-config.conf | 400 |
1 files changed, 400 insertions, 0 deletions
diff --git a/01-config.conf b/01-config.conf new file mode 100644 index 0000000..ae35d65 --- /dev/null +++ b/01-config.conf | |||
@@ -0,0 +1,400 @@ | |||
1 | # sway configuration file | ||
2 | # man sway(5) | ||
3 | |||
4 | # ================================================================================ | ||
5 | # output device configuration | ||
6 | # man sway-output(5) | ||
7 | # ================================================================================ | ||
8 | # force_xinerama yes | ||
9 | # fake-outputs 3840x1080+0+0 | ||
10 | |||
11 | |||
12 | output DP-2 { | ||
13 | pos 0 0 | ||
14 | res 1920x1080 | ||
15 | background ~/.local/share/backgrounds/01-0.jpg fill | ||
16 | dpms on | ||
17 | } | ||
18 | |||
19 | output DP-1 { | ||
20 | pos 1920 0 | ||
21 | res 1920x1080 | ||
22 | background ~/.local/share/backgrounds/01-1.jpg fill | ||
23 | # transform 270 | ||
24 | dpms on | ||
25 | } | ||
26 | |||
27 | # ================================================================================ | ||
28 | # Workspace settings | ||
29 | # ================================================================================ | ||
30 | workspace 1 output VGA1 | ||
31 | workspace_layout tabbed | ||
32 | |||
33 | # customize workspace names | ||
34 | set $WS0 0:🄌 | ||
35 | set $WS1 1:➊ | ||
36 | set $WS2 2:➋ | ||
37 | set $WS3 3:➌ | ||
38 | set $WS4 4:➍ | ||
39 | set $WS5 5:➎ | ||
40 | set $WS6 6:➏ | ||
41 | set $WS7 7:➐ | ||
42 | set $WS8 8:➑ | ||
43 | set $WS9 9:➒ | ||
44 | |||
45 | workspace $WS0 output XWAYLAND1 HDMI-1 DP-1 VGA-1 | ||
46 | workspace $WS1 output primary | ||
47 | workspace $WS9 output XWAYLAND1 HDMI-1 DP-1 VGA-1 | ||
48 | |||
49 | bindsym Mod4+BackSpace exec i3-msg move workspace to output right | ||
50 | |||
51 | # switch to workspace | ||
52 | bindsym Mod4+0 workspace $WS0 | ||
53 | bindsym Mod4+1 workspace $WS1 | ||
54 | bindsym Mod4+2 workspace $WS2 | ||
55 | bindsym Mod4+3 workspace $WS3 | ||
56 | bindsym Mod4+4 workspace $WS4 | ||
57 | bindsym Mod4+5 workspace $WS5 | ||
58 | bindsym Mod4+6 workspace $WS6 | ||
59 | bindsym Mod4+7 workspace $WS7 | ||
60 | bindsym Mod4+8 workspace $WS8 | ||
61 | bindsym Mod4+9 workspace $WS9 | ||
62 | |||
63 | # move focused container to workspace | ||
64 | bindsym Mod4+Shift+0 move container to workspace $WS0 | ||
65 | bindsym Mod4+Shift+1 move container to workspace $WS1 | ||
66 | bindsym Mod4+Shift+2 move container to workspace $WS2 | ||
67 | bindsym Mod4+Shift+3 move container to workspace $WS3 | ||
68 | bindsym Mod4+Shift+4 move container to workspace $WS4 | ||
69 | bindsym Mod4+Shift+5 move container to workspace $WS5 | ||
70 | bindsym Mod4+Shift+6 move container to workspace $WS6 | ||
71 | bindsym Mod4+Shift+7 move container to workspace $WS7 | ||
72 | bindsym Mod4+Shift+8 move container to workspace $WS8 | ||
73 | bindsym Mod4+Shift+9 move container to workspace $WS9 | ||
74 | |||
75 | # ================================================================================ | ||
76 | # base16 Xressource depenend color configuration | ||
77 | # with default values from base16-tomorrow-night | ||
78 | # ================================================================================ | ||
79 | xwayland enable | ||
80 | hide_edge_borders both | ||
81 | title_align left | ||
82 | # gaps inner 6 | ||
83 | # smart_gaps on | ||
84 | # smart_borders no_gaps | ||
85 | # focus_follows_mouse no | ||
86 | # mouse_warping none | ||
87 | |||
88 | # we basically want to configure our font with ~/.config/fontconfig/* and can | ||
89 | # configure what is called monospace that way. It is more portable that way. | ||
90 | font pango:monospace 9 | ||
91 | # font pango:GoMono Nerd Font 9 | ||
92 | # font pango:FuraCode Nerd Font Mono 9 | ||
93 | # font pango:Code New Roman Nerd Font 9 | ||
94 | |||
95 | # load xrdb | ||
96 | exec xrdb ~/.Xresources ; swaymsg reload | ||
97 | |||
98 | # include /home/max/.config/base16/base16-sway/themes/base16-tomorrow.config | ||
99 | # include /home/max/.config/base16/base16-sway/themes/base16-papercolor-light.config | ||
100 | # main variables ssource default | ||
101 | # d variable default | ||
102 | set $background $base00 | ||
103 | set $foreground $base05 | ||
104 | set $cursorColor $foreground | ||
105 | |||
106 | # set_from_resource $foreground base16.cursor $cursorColor | ||
107 | # set_from_resource $foreground base16.cursor $base05 | ||
108 | |||
109 | # Basic bar configuration using the Base16 variables. | ||
110 | bar { | ||
111 | # status_command i3status --config ~/.config/i3/i3status.conf | ||
112 | font pango:monospace 9 | ||
113 | status_command i3status --config ~/.config/i3/i3status.conf | ||
114 | # swaybar_command swaybar | ||
115 | |||
116 | tray_padding 2 | ||
117 | tray_output DP-1 | ||
118 | mode dock | ||
119 | strip_workspace_numbers yes | ||
120 | # separator_symbol "|" | ||
121 | separator_symbol " " | ||
122 | |||
123 | colors { | ||
124 | background $background | ||
125 | separator $foreground | ||
126 | statusline $foreground | ||
127 | |||
128 | focused_workspace $background $background $base05 | ||
129 | active_workspace $background $background $cursorColor | ||
130 | inactive_workspace $background $background $base03 | ||
131 | urgent_workspace $background $background $base08 | ||
132 | binding_mode $background $background $foreground | ||
133 | } | ||
134 | } | ||
135 | |||
136 | # Basic color configuration using the Base16 variables for windows and borders. | ||
137 | # Property Name Border BG Text Indicator Child Border | ||
138 | client.focused $base05 $base04 $base00 $base04 $base04 | ||
139 | client.focused_inactive $base05 $base0F $base07 $base03 $base01 | ||
140 | client.unfocused $base05 $base00 $base05 $base01 $base01 | ||
141 | client.urgent $base08 $base08 $base00 $base08 $base08 | ||
142 | client.placeholder $base00 $base00 $base05 $base00 $base00 | ||
143 | client.background $background | ||
144 | |||
145 | |||
146 | |||
147 | |||
148 | # ================================================================================ | ||
149 | # windows assignments and special treatment, e.g. icons | ||
150 | # ================================================================================ | ||
151 | assign [class="^Pidgin"] $WS0 | ||
152 | assign [class="^Hexchat"] $WS0 | ||
153 | assign [class="(?i)pidgin"] $WS0 | ||
154 | assign [class="^Thunderbird$"] $WS0 | ||
155 | assign [title="(?i)weechat"] $WS0 | ||
156 | # for_window [class="^.*"] border normal 3 | ||
157 | # for_window [title="^.*Thunderbird"] border pixel 0 | ||
158 | # for_window [title="^.*Chromium"] border pixel 0 | ||
159 | # for_window [class="Gvim"] border pixel 0 | ||
160 | for_window [title="(?i)Evolution"] title_format "📧 %title" | ||
161 | for_window [class="(?i)firefox"] title_format " %title" | ||
162 | for_window [class="(?i)chromium"] title_format " %title" | ||
163 | for_window [class="(?i)hexchat"] title_format " %title" | ||
164 | for_window [class="(?i)pidgin"] title_format "👥 %title" | ||
165 | for_window [class="(?i)thunar"] title_format "🗄️ %title" | ||
166 | for_window [class="(?i)keepassx?"] title_format "🔑 %title" | ||
167 | for_window [class="(?i).*terminal?"] title_format " %title" | ||
168 | for_window [class="(?i).*termite?"] title_format " %title" | ||
169 | for_window [class="(?i)xfce4-appfinder"] title_format " %title" | ||
170 | for_window [class="(?i)thunderbird"] title_format " %title" | ||
171 | for_window [title="(?i)weechat"] title_format " %title" | ||
172 | for_window [title="YouTube"] title_format " %title" | ||
173 | for_window [title=""] title_format "%title" | ||
174 | for_window [title=" "] title_format "%title" | ||
175 | |||
176 | # for_window [class="(?i)xfce4-terminal"] border pixel 0 | ||
177 | # for_window [class="(?i)xfce4-appfinder"] border pixel 0 | ||
178 | # for_window [title="^.*\|"] border pixel 4 | ||
179 | # for_window [title="^HexChat.*"] border pixel 0 | ||
180 | # for_window [title="^.*"] exec pkill -SIGRTMIN+11 i3blocks | ||
181 | # for_window [title="^.*"] exec pkill -SIGRTMIN+11 i3blocks | ||
182 | # for_window [title="cairo-dock"] floating enable ; border none | ||
183 | # for_window[class="Plank"] floating enable,move absolute center | ||
184 | # for_window [class=".*"] title_format "┋ %title" | ||
185 | # for_window [con_id="__focused__"] title_format "<u>%title</u>" | ||
186 | |||
187 | |||
188 | |||
189 | # ================================================================================ | ||
190 | # Keyboard mappings | ||
191 | # Mod1 ctrl | ||
192 | # Mod4 windows key | ||
193 | # ================================================================================ | ||
194 | |||
195 | set $mod Mod4 | ||
196 | bindsym $mod+j "mark --toggle a" | ||
197 | |||
198 | # Use Mouse+$mod to drag floating windows to their wanted position | ||
199 | floating_modifier $mod | ||
200 | |||
201 | # restart sway or reload config | ||
202 | bindsym $mod+Shift+c reload | ||
203 | bindsym $mod+Shift+r restart | ||
204 | |||
205 | # kill focused window | ||
206 | bindsym $mod+Shift+q kill | ||
207 | bindsym Mod1+F4 kill | ||
208 | |||
209 | bindsym $mod+F2 exec i3-input -F 'rename workspace to "%s"' -P 'New name: ' | ||
210 | bindsym Control+Mod1+Left workspace prev_on_output | ||
211 | bindsym Control+Mod1+Right workspace next_on_output | ||
212 | |||
213 | # move focused window | ||
214 | bindsym $mod+Shift+h move left | ||
215 | bindsym $mod+Shift+j move down | ||
216 | bindsym $mod+Shift+k move up | ||
217 | bindsym $mod+Shift+l move right | ||
218 | |||
219 | |||
220 | bindsym $mod+Tab focus output right | ||
221 | bindsym $mod+Shift+Tab focus output left | ||
222 | bindsym mod1+Tab focus right | ||
223 | bindsym mod1+Shift+Tab focus left | ||
224 | bindsym $mod+Next focus child | ||
225 | bindsym $mod+Left focus left | ||
226 | bindsym $mod+Right focus right | ||
227 | bindsym $mod+Down focus down | ||
228 | bindsym $mod+Up focus up | ||
229 | bindsym $mod+Prior focus parent | ||
230 | bindsym $mod+a focus parent | ||
231 | |||
232 | # alternatively, you can use the cursor keys: | ||
233 | bindsym $mod+Shift+Left move left ; exec pkill -SIGRTMIN+11 i3blocks | ||
234 | bindsym $mod+Shift+Down move down ; exec pkill -SIGRTMIN+11 i3blocks | ||
235 | bindsym $mod+Shift+Up move up ; exec pkill -SIGRTMIN+11 i3blocks | ||
236 | bindsym $mod+Shift+Right move right ; exec pkill -SIGRTMIN+11 i3blocks | ||
237 | |||
238 | |||
239 | # change container layout (stacked, tabbed, toggle split) | ||
240 | bindsym $mod+s layout stacking | ||
241 | bindsym $mod+w layout tabbed | ||
242 | bindsym $mod+q layout toggle split | ||
243 | bindsym $mod+x layout toggle all | ||
244 | |||
245 | bindsym $mod+v split toggle | ||
246 | bindsym $mod+space split toggle | ||
247 | |||
248 | # enter fullscreen mode for the focused container | ||
249 | bindsym $mod+f fullscreen toggle | ||
250 | bindsym $mod+g fullscreen toggle global | ||
251 | |||
252 | # toggle tiling / floating | ||
253 | bindsym $mod+Shift+space floating toggle | ||
254 | bindsym $mod+m move scratchpad | ||
255 | bindsym $mod+Shift+m scratchpad show ; resize set 1920 920 ; move position center | ||
256 | |||
257 | # start a terminal | ||
258 | # bindsym $mod+Return exec i3-sensible-terminal | ||
259 | bindsym $mod+Return exec "killall rofi ; rofi -show drun -show-icons" | ||
260 | bindsym Mod1+F2 exec "killall rofi ; rofi -show drun -bg #222222 -fg #888888 -hlbg #285577 -hlfg #ffffff -show-icons -5" | ||
261 | bindsym $mod+t exec alacritty | ||
262 | bindsym $mod+e exec thunar | ||
263 | bindsym $mod+l exec swaylock -K -f -F -c "#000000" --text-color '#ffffff' --indicator-radius 200 --indicator-thickness 10 | ||
264 | bindsym $mod+d exec i3-dmenu-desktop | ||
265 | # Pulse Audio controls | ||
266 | bindsym $mod+F10 exec pactl set-sink-mute @DEFAULT_SINK@ toggle | ||
267 | bindsym $mod+F11 exec pactl set-sink-volume @DEFAULT_SINK@ -5% | ||
268 | bindsym $mod+F12 exec pactl set-sink-volume @DEFAULT_SINK@ +5% | ||
269 | bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% | ||
270 | bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% | ||
271 | bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle | ||
272 | |||
273 | |||
274 | |||
275 | # change focus between tiling / floating windows | ||
276 | # bindsym $mod+space focus mode_toggle | ||
277 | |||
278 | # focus the child container | ||
279 | #bindsym $mod+d focus child | ||
280 | |||
281 | # exit i3 (logs you out of your X session) | ||
282 | # 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'" | ||
283 | # split in horizontal orientation | ||
284 | # bindsym $mod+h split h | ||
285 | |||
286 | # split in vertical orientation | ||
287 | # bindsym $mod+v split v | ||
288 | |||
289 | # resize window (you can also use the mouse for that) | ||
290 | bindsym $mod+r mode "resize" | ||
291 | mode "resize" { | ||
292 | # These bindings trigger as soon as you enter the resize mode | ||
293 | |||
294 | # Pressing left will shrink the window’s width. | ||
295 | # Pressing right will grow the window’s width. | ||
296 | # Pressing up will shrink the window’s height. | ||
297 | # Pressing down will grow the window’s height. | ||
298 | bindsym $mod+h resize shrink width 4 px or 4 ppt | ||
299 | bindsym $mod+j resize grow height 4 px or 4 ppt | ||
300 | bindsym $mod+k resize shrink height 4 px or 4 ppt | ||
301 | bindsym $mod+l resize grow width 4 px or 4 ppt | ||
302 | |||
303 | # same bindings, but for the arrow keys | ||
304 | bindsym Left resize shrink width 4 px or 4 ppt | ||
305 | bindsym Up resize grow height 4 px or 4 ppt | ||
306 | bindsym Down resize shrink height 4 px or 4 ppt | ||
307 | bindsym Right resize grow width 4 px or 4 ppt | ||
308 | |||
309 | # back to normal: Enter or Escape | ||
310 | bindsym Return mode "default" | ||
311 | bindsym Escape mode "default" | ||
312 | } | ||
313 | |||
314 | |||
315 | set $mode_brightness "display brightness 🔅 🔆" | ||
316 | bindsym $mod+b mode $mode_brightness | ||
317 | mode $mode_brightness { | ||
318 | bindsym Up exec xrandr-brightness .1 | ||
319 | bindsym Down exec xrandr-brightness -.1 | ||
320 | bindsym Return mode "default" | ||
321 | bindsym Escape mode "default" | ||
322 | } | ||
323 | |||
324 | |||
325 | # Press $mod+o followed by either f, t, Escape or Return to launch firefox, | ||
326 | # thunderbird or return to the default mode, respectively. | ||
327 | set $mode_launcher Launch: [f]irefox [t]hunderbird | ||
328 | bindsym $mod+o mode "$mode_launcher" | ||
329 | |||
330 | mode "$mode_launcher" { | ||
331 | bindsym f exec firefox | ||
332 | bindsym t exec thunderbird | ||
333 | |||
334 | bindsym Escape mode "default" | ||
335 | bindsym Return mode "default" | ||
336 | } | ||
337 | # bindsym $mod+d exec --no-startup-id j4-dmenu-desktop | ||
338 | # exec xrandr --dpi 95.48 --output LVDS-1 --mode 1024x768 && xrandr --output LVDS-1 --mode 1280x800 | ||
339 | # bindcode 156 | ||
340 | # exec xrandr --output DP-1 --rotate left --pos 1920x-420 | ||
341 | # exec xrandr --output DP1 --rotate left --right-of HDMI1 | ||
342 | # exec xrandr --output DP1 --rotate left --pos 1920x-420 | ||
343 | |||
344 | |||
345 | |||
346 | |||
347 | |||
348 | |||
349 | # ================================================================================ | ||
350 | # Execute (autostart) further applications | ||
351 | |||
352 | #! exec: execute when starting | ||
353 | #! exec_always: execute when starting or restarting | ||
354 | # ================================================================================ | ||
355 | |||
356 | |||
357 | # exec xrandr --output HDMI-1 --right-of DP-1 | ||
358 | # exec xrandr --output HDMI-1 --right-of VGA-1 | ||
359 | # exec /usr/bin/xrandr-reset.sh | ||
360 | # exec setsid xautolock -locker swaylock | ||
361 | |||
362 | exec swayidle -w timeout 300 'swaylock -f' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' | ||
363 | |||
364 | # exec gnome-keyring-daemon --start --components=secrets | ||
365 | # start compositor... | ||
366 | # exec compton -b --config ~/.config/i3/compton.conf | ||
367 | # exec nitrogen --restore | ||
368 | exec mako | ||
369 | bindsym ctrl+space exec makoctl dismiss -a | ||
370 | |||
371 | exec nm-applet | ||
372 | # exec pidgin | ||
373 | exec bash -c 'for d in ~/.config/autostart/*.desktop; do awk -e 'match($0,"Exec=(.*)",q){ gsub(/ %.+/, "", q[1]); system("setsid -f " q[1])};' $d; done' | ||
374 | |||
375 | # exec setxkbmap de,us -device evdev -model pc105 -option "" -option keypad:pointerkeys,grp_led:caps,grp:caps_toggle,terminate:ctrl_alt_bksp -v 1 -print | ||
376 | # exec xset r rate 330 40 | ||
377 | # exec xinput --set-prop 'Xornet gaming mouse' 'libinput Accel Speed' 0.1 | ||
378 | # exec setxkbmap -option caps:escape | ||
379 | |||
380 | |||
381 | |||
382 | # input 16700:8467:Dell_KB216_Wired_Keyboard_Consumer_Control { | ||
383 | # xkb_layout "us" | ||
384 | # xkb_variant "altgr-intl,nodeadkeys" | ||
385 | # xkb_options "keypad:pointerkeys,grp_led:caps,grp:caps_toggle,terminate:ctrl_alt_bksp" | ||
386 | # xkb_model "pc105" | ||
387 | # xkb_numlock "enable" | ||
388 | # repeat_delay 100 | ||
389 | # repeat_rate 330 | ||
390 | # } | ||
391 | |||
392 | |||
393 | |||
394 | |||
395 | |||
396 | # exec setsid hexchat -e --minimize=2 | ||
397 | exec termite -e /home/max/.local/bin/weechat | ||
398 | |||
399 | |||
400 | # vim: iskeyword+=\$,\-,\#,(,) nospell ft=tcl | ||