sway: clean config + TODO: pass launcher
Victor Franzi
5 years ago
0 | # i3 config file (v4) | |
1 | # | |
2 | # Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
0 | # Sway config | |
3 | 1 | |
4 | 2 | set $mod Mod4 |
3 | floating_modifier $mod | |
5 | 4 | set $browser qutebrowser |
6 | 5 | set $term termite |
7 | set $editor termite -e 'nvim' | |
8 | set $mail thunderbird | |
6 | set $editor termite -e "bash -c 'sleep 0.1 && nvim'" | |
7 | set $mail termite -e 'neomutt' | |
9 | 8 | |
10 | 9 | exec "$HOME/bin/bat.notify.sh" |
11 | 10 | |
11 | bindsym $mod+Return exec $term | |
12 | bindsym $mod+Shift+Return exec $browser | |
13 | bindsym $mod+u exec $editor | |
14 | bindsym $mod+Shift+u exec $mail | |
15 | bindsym $mod+Shift+X kill | |
16 | ||
17 | # rofi-style | |
12 | 18 | set $menu termite -e "bash -c 'compgen -c | sort -u | fzf --reverse | xargs -r swaymsg -t command exec'" -t "launcher" |
13 | 19 | bindsym $mod+r exec $menu |
14 | 20 | for_window [app_id="termite" title="launcher"] floating enable, border pixel 3 |
15 | 21 | |
22 | # FIXME pass integration (rofi-pass not available on wayland) | |
23 | set $pass termite -e "bash -c 'find $HOME/.password-store -type f | fzf --reverse | cut -d\'/\' -f5- | sed \'s/.gpg//\' | xargs -r pass -c'" | |
24 | bindsym $mod+Shift+r exec $pass | |
25 | for_window [app_id="termite" title="pass"] floating enable, border pixel 3 | |
26 | ||
27 | # media keys | |
16 | 28 | bindsym $mod+a exec pavucontrol |
17 | 29 | bindsym $mod+Shift+a exec blueman-applet |
18 | 30 | bindsym XF86MonBrightnessDown exec "$HOME/bin/stm bl down" |
30 | 42 | outer 0 |
31 | 43 | } |
32 | 44 | |
33 | # cursor (wayland specific) | |
45 | # cursor | |
34 | 46 | seat * hide_cursor 5000 |
35 | 47 | |
36 | # background (wayland specific) | |
48 | # background + screens | |
37 | 49 | output * bg "#000000" solid_color |
38 | 50 | |
39 | # input configs | |
40 | # keyboard | |
51 | # keyboard + touchpad | |
41 | 52 | input * { |
53 | tap enabled | |
42 | 54 | xkb_layout fr |
43 | 55 | xkb_model oss |
44 | 56 | xkb_options compose:rctrl |
45 | 57 | repeat_delay 200 |
46 | repeat_rate 25 | |
47 | } | |
48 | # trackpad | |
49 | input * tap enabled | |
50 | ||
51 | # clear notifications | |
58 | repeat_rate 20 | |
59 | } | |
60 | ||
61 | # notifications | |
52 | 62 | bindsym Ctrl+Space exec "makoctl dismiss" |
53 | 63 | bindsym Ctrl+Shift+Space exec "makoctl dismiss -a" |
54 | 64 | |
63 | 73 | |
64 | 74 | # can be useful |
65 | 75 | focus_follows_mouse yes |
66 | ||
67 | # Use Mouse+$mod to drag floating windows to their wanted position | |
68 | floating_modifier $mod | |
69 | ||
70 | # start a terminal | |
71 | bindsym $mod+Return exec $term | |
72 | # start browser | |
73 | bindsym $mod+Shift+Return exec $browser | |
74 | # start editor/mail | |
75 | bindsym $mod+u exec $editor | |
76 | bindsym $mod+Shift+u exec $mail | |
77 | ||
78 | # kill focused window | |
79 | bindsym $mod+Shift+X kill | |
80 | 76 | |
81 | 77 | # change focus |
82 | 78 | bindsym $mod+h focus left |
83 | 79 | bindsym $mod+j focus down |
84 | 80 | bindsym $mod+k focus up |
85 | 81 | bindsym $mod+l focus right |
86 | ||
87 | 82 | bindsym $mod+Left focus left |
88 | 83 | bindsym $mod+Down focus down |
89 | 84 | bindsym $mod+Up focus up |
94 | 89 | bindsym $mod+Shift+j move down |
95 | 90 | bindsym $mod+Shift+k move up |
96 | 91 | bindsym $mod+Shift+l move right |
97 | ||
98 | # alternatively, you can use the cursor keys: | |
99 | 92 | bindsym $mod+Shift+Left move left |
100 | 93 | bindsym $mod+Shift+Down move down |
101 | 94 | bindsym $mod+Shift+Up move up |
109 | 102 | # q s d |
110 | 103 | # | | |
111 | 104 | # w-----x-----c |
112 | ||
105 | # | |
113 | 106 | # corner |
114 | 107 | # <border> <window> <gap> |
115 | 108 | # ± 1920 ± (1920 / 5) ± (1920 / 20) |
166 | 159 | # change focus between tiling / floating windows |
167 | 160 | bindsym $mod+space focus mode_toggle |
168 | 161 | |
169 | ||
162 | # workspaces | |
170 | 163 | set $workspace1 "1" |
171 | 164 | set $workspace2 "2" |
172 | 165 | set $workspace3 "3" |
203 | 196 | bindsym $mod+0 move container to workspace $workspace10 |
204 | 197 | |
205 | 198 | # move workspace between screens |
206 | bindsym $mod+v exec i3-msg move workspace to output left | |
207 | bindsym $mod+b exec i3-msg move workspace to output right | |
199 | bindsym $mod+v move workspace to output left | |
200 | bindsym $mod+b move workspace to output right | |
208 | 201 | |
209 | 202 | # reload the configuration file |
210 | 203 | bindsym $mod+Shift+c reload |
213 | 206 | # exit i3 (logs you out of your X session) |
214 | 207 | bindsym $mod+Shift+q exit |
215 | 208 | |
209 | for_window [class=".*"] split h | |
210 | ||
216 | 211 | # specefics floating windows |
217 | 212 | # for_window[class=".*"] border pixel 1 |
218 | 213 | for_window [class="mpv"] floating enable |
219 | 214 | for_window [class="feh"] floating enable |
220 | for_window [class=".*"] split h | |
221 | for_window [instance="sun-awt-X11-XFramePeer"] floating enable # Java windows | |
215 | for_window [class="sxiv"] floating enable | |
222 | 216 | #for_window [class="Adl"] floating enable # Dofus |
223 | 217 | for_window [window_role="pop-up"] floating enable |
224 | 218 | for_window [window_role="task_dialog"] floating enable |
230 | 224 | for_window [class="Minecraft .*"] floating enable |
231 | 225 | for_window [class="Matplotlib"] floating enable |
232 | 226 | |
233 | assign [class="discord"] $workspace1 | |
234 | assign [class="Hexchat"] $workspace1 | |
235 | assign [class="Caprine"] $workspace1 | |
236 | assign [title="neomutt"] $workspace1 | |
237 | assign [class="Thunderbird"] $workspace1 | |
238 | ||
239 | assign [class="Firefox"] $workspace2 | |
240 | 227 | assign [class="qutebrowser"] $workspace2 |
241 | ||
242 | assign [class="code"] $workspace3 | |
243 | assign [class="Code"] $workspace3 | |
244 | 228 | assign [class="Gummi"] $workspace3 |
245 | ||
246 | assign [class="VMWare"] $workspace4 | |
247 | 229 | |
248 | 230 | |
249 | 231 | # resize window (you can also use the mouse for that) |
287 | 269 | modifier Mod4 |
288 | 270 | workspace_buttons no |
289 | 271 | font pango:Input Mono Condensed 8 |
290 | status_command bumblebee-status -m arch-update nic cpu memory battery date time pasink pasource -p timeout=1 time.format="%R" date.format="%B %d %Y" -t default | |
291 | } | |
272 | status_command bumblebee-status -m arch-update vault nic cpu memory battery date time pasink pasource -p timeout=1 time.format="%R" date.format="%B %d %Y" vault.text="<pass>" -t default | |
273 | } |