]> git.sev.monster Git - dotfiles.git/blame - etc/sway/config
sway: also bind kp_enter to terminal
[dotfiles.git] / etc / sway / config
CommitLineData
2ec9d552 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}
189288f7 41
2ec9d552 42### binds
fd602313 43set $mod Mod4
189288f7 44
2ec9d552 45bindsym $mod+Shift+r reload
46bindsym $mod+Shift+e exec swaynag -t warning -m Exit? -b Yes 'swaymsg exit'
fd602313 47
2ec9d552 48## terminal
49bindsym $mod+Return exec [ -n "$$TERMINAL" ] && exec $$TERMINAL || exec footclient
c51966c0 50bindsym $mod+KP_Enter exec [ -n "$$TERMINAL" ] && exec $$TERMINAL || exec footclient
189288f7 51
2ec9d552 52## menu
53bindsym $mod+d exec nwgdmenu
54bindsym $mod+Shift+d exec nwggrid
55bindsym $mod+Ctrl+d exec nwgbar
189288f7 56
2ec9d552 57## special
fd602313 58# mpc
2ec9d552 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
fd602313 66
2ec9d552 67## window management
189288f7 68set $up k
69set $down j
70set $left h
71set $right l
189288f7 72set $up2 Up
73set $down2 Down
74set $left2 Left
75set $right2 Right
76
189288f7 77bindsym $mod+$left focus left
78bindsym $mod+$down focus down
79bindsym $mod+$up focus up
80bindsym $mod+$right focus right
81bindsym $mod+$left2 focus left
82bindsym $mod+$down2 focus down
83bindsym $mod+$up2 focus up
84bindsym $mod+$right2 focus right
2ec9d552 85bindsym $mod+a focus parent
86bindsym $mod+z focus child
189288f7 87bindsym $mod+Shift+$left move left
88bindsym $mod+Shift+$down move down
89bindsym $mod+Shift+$up move up
90bindsym $mod+Shift+$right move right
91bindsym $mod+Shift+$left2 move left
92bindsym $mod+Shift+$down2 move down
93bindsym $mod+Shift+$up2 move up
94bindsym $mod+Shift+$right2 move right
95
189288f7 96bindsym $mod+i split h
189288f7 97bindsym $mod+o split v
98
fd602313 99floating_modifier $mod
2ec9d552 100bindsym $mod+Shift+space floating toggle
101bindsym $mod+space focus mode_toggle
fd602313 102
189288f7 103bindsym $mod+f fullscreen toggle
104bindsym $mod+Shift+f fullscreen toggle global
105
189288f7 106bindsym $mod+s layout stacking
107bindsym $mod+w layout tabbed
108bindsym $mod+e layout toggle split
109
fd602313 110bindsym $mod+Shift+q kill
111
189288f7 112bindsym $mod+Shift+minus move scratchpad
189288f7 113bindsym $mod+minus scratchpad show
114
189288f7 115bindsym $mod+1 workspace 1
116bindsym $mod+2 workspace 2
117bindsym $mod+3 workspace 3
118bindsym $mod+4 workspace 4
119bindsym $mod+5 workspace 5
120bindsym $mod+6 workspace 6
121bindsym $mod+7 workspace 7
122bindsym $mod+8 workspace 8
123bindsym $mod+9 workspace 9
124bindsym $mod+0 workspace 10
fd602313 125workspace_auto_back_and_forth yes
189288f7 126
189288f7 127bindsym $mod+Shift+1 move container to workspace 1
128bindsym $mod+Shift+2 move container to workspace 2
129bindsym $mod+Shift+3 move container to workspace 3
130bindsym $mod+Shift+4 move container to workspace 4
131bindsym $mod+Shift+5 move container to workspace 5
132bindsym $mod+Shift+6 move container to workspace 6
133bindsym $mod+Shift+7 move container to workspace 7
134bindsym $mod+Shift+8 move container to workspace 8
135bindsym $mod+Shift+9 move container to workspace 9
2ec9d552 136bindsym $mod+Shift+0 move container to workspace 10
189288f7 137
189288f7 138mode "translate" {
9fddba79 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
189288f7 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
9fddba79 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
189288f7 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
9fddba79 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
189288f7 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
9fddba79 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
189288f7 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
2ec9d552 176 # focus
189288f7 177 bindsym $mod+a focus parent
189288f7 178 bindsym $mod+z focus child
179
2ec9d552 180 # floating
181 bindsym $mod+Shift+space floating toggle
182 bindsym $mod+space focus mode_toggle
183
184 # exit
9fddba79 185 bindsym Return mode default
186 bindsym Escape mode default
189288f7 187 bindsym $mod+r mode default
188}
189bindsym $mod+r mode "translate"
190
fd602313 191
2ec9d552 192### appearance
193font pango:monospace 10
194seat seat0 xcursor_theme Paper 16
195## borders
196default_border pixel 1
189288f7 197hide_edge_borders smart
189288f7 198gaps inner 6
199smart_gaps on
2ec9d552 200## colors
fd602313 201# generic
a568f7fa 202set $bg #110800
203set $fg #93a1a1
fd602313 204# focused
a568f7fa 205set $f_bdr #cc6600
206set $f_bg #aa5500
207set $f_fg #eee8d5
208set $f_ind #4466ff
209set $f_chb #cc6600
fd602313 210# inactive
a568f7fa 211set $i_bdr #884400
212set $i_bg #221100
213set $i_fg $fg
214set $i_ind #264bd2
215set $i_chb #884400
fd602313 216# urgent
a568f7fa 217set $u_bdr #ff4444
218set $u_bg #dc322f
219set $u_fg #000000
220set $u_ind #4466ff
221set $u_chb #ff4444
fd602313 222# blue
a568f7fa 223set $b_bdr #4466ff
224set $b_bg #268bd2
225set $b_fg #fdf6e3
226set $b_ind #264db2
227set $b_chb #4466ff
189288f7 228# class border backgr. text indicator child_border
a568f7fa 229client.focused $f_bdr $f_bg $f_fg $f_ind $f_chb
230client.focused_inactive $i_bdr $i_bg $i_fg $i_ind $i_chb
231client.unfocused $i_bdr $i_bg $i_fg $i_ind $i_chb
232client.urgent $u_bdr $u_bg $u_fg $u_ind $u_chb
233client.placeholder $b_bdr $b_bg $b_fg $b_ind $b_chb
189288f7 234client.background #221100
fd602313 235force_display_urgency_hint 2000 ms
2ec9d552 236
237bar {
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
258include config.d/*
This page took 0.100047 seconds and 4 git commands to generate.