~xdavidwu/dotfiles

ref: e7119d56f0d36dcb0bee259dc3dbf9df985d4b82 dotfiles/.config/sway/config -rw-r--r-- 4.2 KiB
e7119d56Pinghao Wu sway: leavecc 3 months ago
                                                                                
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
exec {
	himitsud
	hissh-agent
	pipewire
	mako
	foot --server
	~/.local/libexec/title-watch
	wlchewing -e -d no -f "Noto Sans CJK TC 11" -b#303030 -s#80cbc4 -S#101a19 2>/tmp/wlchewing.log
	dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP GTK_THEME
	wayvnc 0.0.0.0
}

#xwayland disable 

output {
	eDP-1 {
		pos 0 0
		scale 3
	}

	DP-2 {
		pos 1280 0
	}

	HEADLESS-1 {
		mode 1080x1220
		scale 2
	}

	* background ~/.local/share/backgrounds/20618.jpg fill
}

bindswitch lid:toggle output eDP-1 toggle

input {
	1739:30383:DELL07E6:00_06CB:76AF_Touchpad tap enabled
	1267:9454:ELAN24EE:00_04F3:24EE map_to_output eDP-1
}

set $m Mod4

# Use Mouse+$m to drag floating windows to their wanted position
floating_modifier $m

set $show_brightness notify-send Brightness "Brightness set to $(brightnessctl -m | cut -f 4 -d ,)"

bindsym {
	$m+Return	exec footclient
	$m+d	exec j4-dmenu-desktop --dmenu='wmenu -f "Noto Sans CJK TC 11" -i -n c0c0c0 -N 303030 -s ffffff -S 37474f' --no-generic --term=footclient --usage-log=$XDG_CACHE_HOME/j4desktop

	$m+Shift+q	kill

	$m+Left	focus left
	$m+Down	focus down
	$m+Up	focus up
	$m+Right	focus right

	$m+space	focus mode_toggle

	$m+Shift+Left	move left
	$m+Shift+Down	move down
	$m+Shift+Up	move up
	$m+Shift+Right	move right

	$m+h	split h
	$m+v	split v

	$m+s	layout stacking
	$m+w	layout tabbed
	$m+e	layout toggle split

	$m+f	fullscreen toggle
	$m+p	sticky toggle
	$m+b	border toggle
	$m+Shift+space	floating toggle

	$m+1	workspace 1
	$m+2	workspace 2
	$m+3	workspace 3
	$m+4	workspace 4
	$m+5	workspace 5
	$m+6	workspace 6
	$m+7	workspace 7
	$m+8	workspace 8
	$m+9	workspace 9
	$m+0	workspace 10

	$m+Shift+1	move container to workspace 1
	$m+Shift+2	move container to workspace 2
	$m+Shift+3	move container to workspace 3
	$m+Shift+4	move container to workspace 4
	$m+Shift+5	move container to workspace 5
	$m+Shift+6	move container to workspace 6
	$m+Shift+7	move container to workspace 7
	$m+Shift+8	move container to workspace 8
	$m+Shift+9	move container to workspace 9
	$m+Shift+0	move container to workspace 10

	$m+Shift+c	reload
	$m+Shift+e	exit
	$m+Shift+l	exec swaylockd

	XF86AudioMute	exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
	XF86AudioLowerVolume	exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
	XF86AudioRaiseVolume	exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+

	XF86AudioPlay	exec playerctl play-pause
	XF86AudioPrev	exec playerctl previous
	XF86AudioNext	exec playerctl next
	XF86Search	exec playerctl shuffle Toggle

	XF86MonBrightnessUp	exec brightnessctl set 5%+ && $show_brightness
	XF86MonBrightnessDown	exec brightnessctl set 5%- && $show_brightness

	Print	exec screenshot
	$m+Print	exec screenshot crop
}

bindgesture {
	swipe:right	focus right
	swipe:left	focus left

	pinch:inward+up	move up
	pinch:inward+down	move down
	pinch:inward+left	move left
	pinch:inward+right	move right
}

mode resize {
        bindsym {
		Left	resize shrink width
        	Down	resize grow height
        	Up	resize shrink height
        	Right	resize grow width
		$m+r	mode default
	}
}

bindsym $m+r mode resize

bar {
        status_command i3status
	colors {
		# mtrl grey 850 background_material_dark
		background #303030
		statusline #ffffff
		# mtrl calced divider
		separator #494949
		# mtrl dark accent
		focused_workspace #80cbc4 #80cbc4 #101a19
		inactive_workspace #303030 #303030 #ffffff
		# mtrl red 500
		urgent_workspace #F44336 #F44336 #ffffff
	}
	separator_symbol |
}

font pango:Noto Sans Mono, Noto Sans Mono CJK TC 8

# mtrl dark secondary
client.focused #37474f #37474f #ffffff #37474f #37474f
client.unfocused #303030 #303030 #c0c0c0 #303030 #303030
client.urgent #f44336 #f44336 #ffffff #f44336 #f44336

default_border normal 1
hide_edge_borders both
focus_on_window_activation urgent

set $ff "^(org\.mozilla\.)?firefox$"

for_window {
	[app_id=$ff title="^(Picture-in-Picture|子母畫面)$"] {
		border none
		floating enable
		sticky enable
		move right 390 px
		move down 210 px
		resize set 480 270
	}

	[app_id=$ff title="^Extension: \(Open in Browser\) \- Opening "] floating enable

	[app_id=$ff title="^Opening "] floating enable

	[app_id=$ff title="^Firefox — (Sharing Indicator|分享指示器)$"] {
		border none
		floating enable
		resize set 80 50
	}
}