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