summaryrefslogtreecommitdiff
path: root/.config/sway/config
blob: 4d20af62ca181f05e5bd7b12b70417416565f564 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# Read `man 5 sway` for a complete reference.

### Output configuration
output eDP-1 {
	resolution 1920x1080
}

output DP-3 {
	resolution 2560x1440
}

## GENERAL

font pango:sans-serif 13
set $term alacritty
set $sigaudio pkill -75 i3blocks

## WORKSPACES

#workspace_auto_back_and_forth yes

set $ws1  "1"
set $ws2  "2"
set $ws3  "3"
set $ws4  "4"
set $ws5  "5"
set $ws6  "6"
set $ws7  "7"
set $ws8  "8"
set $ws9  "9"
set $ws10 "10"

workspace $ws1 output  primary
workspace $ws2 output  primary
workspace $ws3 output  primary
workspace $ws4 output  primary
workspace $ws5 output  primary
workspace $ws6 output  primary
workspace $ws7 output  primary
workspace $ws8 output  primary
workspace $ws9 output  primary
workspace $ws10 output primary

# switch to workspace
bindsym Mod4+1 workspace $ws1
bindsym Mod4+2 workspace $ws2
bindsym Mod4+3 workspace $ws3
bindsym Mod4+4 workspace $ws4
bindsym Mod4+5 workspace $ws5
bindsym Mod4+6 workspace $ws6
bindsym Mod4+7 workspace $ws7
bindsym Mod4+8 workspace $ws8
bindsym Mod4+9 workspace $ws9
bindsym Mod4+0 workspace $ws10
bindsym Mod4+Tab workspace next_on_output
bindsym Mod4+Shift+Tab workspace prev_on_output
workspace_auto_back_and_forth yes

# move focused container to workspace
bindsym Mod4+shift+1 move container to workspace $ws1
bindsym Mod4+shift+2 move container to workspace $ws2
bindsym Mod4+shift+3 move container to workspace $ws3
bindsym Mod4+shift+4 move container to workspace $ws4
bindsym Mod4+shift+5 move container to workspace $ws5
bindsym Mod4+shift+6 move container to workspace $ws6
bindsym Mod4+shift+7 move container to workspace $ws7
bindsym Mod4+shift+8 move container to workspace $ws8
bindsym Mod4+shift+9 move container to workspace $ws9
bindsym Mod4+shift+0 move container to workspace $ws10

# move workspaces between outputs on dock
bindswitch --reload --locked lid:on  output eDP-1 disable ; output DP-3 enable;
bindswitch --reload --locked lid:off output eDP-1 enable  ; output DP-3 disable;

## WINDOWS

default_border pixel
hide_edge_borders smart
title_align center
floating_modifier Mod4
bindsym Mod4+shift+p move scratchpad
bindsym Mod4+p scratchpad show

# movement
set $down j
set $left h
set $right l
set $up k

# change focus
bindsym Mod4+$down focus down
bindsym Mod4+$left focus left
bindsym Mod4+$right focus right
bindsym Mod4+$up focus up

# move focused window
bindsym Mod4+shift+$down move down
bindsym Mod4+shift+$left move left
bindsym Mod4+shift+$right move right
bindsym Mod4+shift+$up move up

# resize
bindsym Mod4+i					resize grow height
bindsym Mod4+o 					resize grow width
bindsym Mod4+u 					resize shrink height
bindsym Mod4+y					resize shrink width

## LAYOUT

bindsym Mod4+f					fullscreen toggle
bindsym Mod4+shift+space		floating toggle
bindsym Mod4+shift+s			floating enable; sticky toggle

## CONTROLS

bindsym Mod4+q			kill
bindsym Mod4+shift+r			reload

## SHORTCUTS

bindsym Mod4+Return 			split horizontal; exec $term
bindsym Mod4+shift+Return		split vertical; exec $term
bindsym Mod4+control+Return		split horizontal; exec $term -e mosh dev.53hor.net
bindsym Mod4+control+shift+Return		split vertical; exec $term -e mosh dev.53hor.net
#bindsym Mod4+p					exec arandr
#bindsym Mod4+l					exec xautolock -locknow
bindsym Mod4+space				exec rofi -show combi
bindsym Mod4+F2					workspace $ws1 ; exec firefox
bindsym Mod4+F3					exec thunderbird
#bindsym Mod4+F4					exec passmenu.sh
#bindsym Mod4+F5  exec
#bindsym Mod4+F1  exec
#bindsym Mod4+F1  exec
#bindsym Mod4+F1  exec
#bindsym Mod4+F6  exec
#bindsym Mod4+F7  exec
#bindsym Mod4+F8  exec
#bindsym Mod4+F9					exec passmenu.sh
bindsym Mod4+F10				exec mixer vol 0 && $sigaudio
bindsym Mod4+F11				exec mixer vol -5 && $sigaudio
bindsym Mod4+F12				exec mixer vol +5 && $sigaudio
bindsym XF86AudioLowerVolume	exec mixer vol -5 && $sigaudio
bindsym XF86AudioRaiseVolume 	exec mixer vol +5 && $sigaudio
bindsym XF86AudioMute			exec mixer vol 0 && $sigaudio
bindsym --release Print			exec grim
bindsym Mod4+Pause				exec swaylock ; exec doas acpiconf -s3

## COLORS

# class border background text
client.focused #dcd8d4 #dcd8d4 #272729
client.unfocused #8F6B55 #8F6B55 #dcd8d4

## BARS

bar {
	swaybar_command waybar
}

## MODES

set $mode_record "󱊫 record 󱊬 webcam 󱊭 full HD 󱊮 quad HD"
mode $mode_record {
	bindsym Escape mode default
	bindsym F1		exec killall -INT wf-recorder || wf-recorder --audio=oss_input.dsp4 -f ~/recording-$(date +%Y-%m-%d-%T).mp4 ; mode default
	bindsym F2		exec killall pwcview || pwcview -s vga
	bindsym F3		output DP-3 resolution 1920x1080
	bindsym F4		output DP-3 resolution 2560x1440
}

set $mode_modes "󱊷 default 󱊫 recording"
bindsym Mod4+Escape		mode $mode_modes
mode $mode_modes {
	bindsym Escape mode default
	bindsym F1		mode $mode_record
}

set $mode_quit "Really quit? (y/N)"
mode $mode_quit {
	bindsym y exit
	bindsym Return mode default
	bindsym n mode default
	bindsym Escape mode default
}
bindsym Mod4+shift+q			mode $mode_quit

## ASSIGNMENTS

assign [class="Firefox"] $ws1
for_window [title="Reminders*"] floating enable
for_window [class="pwcview"] floating enable ; sticky enable
for_window [title="wpgtk*"] floating enable

## STARTUP
exec_always ~/.config/wpg/wp_init.sh
exec swayidle -w timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'