-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwayfire.ini
480 lines (422 loc) · 14.3 KB
/
wayfire.ini
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# Default config for Wayfire
#
# Copy this to ~/.config/wayfire.ini and edit it to your liking.
#
# Take the tutorial to get started.
# https://github.com/WayfireWM/wayfire/wiki/Tutorial
#
# Read the Configuration document for a complete reference.
# wayfire配置 WIKI页面
# https://github.com/WayfireWM/wayfire/wiki/Configuration
# Input configuration ──────────────────────────────────────────────────────────
# 键盘输出设置
# Example configuration:
# 举例
# [input]
# xkb_layout = us,fr
# xkb_variant = dvorak,bepo
#
# See Input options for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration#input
[input]
# 键盘格式
# US键盘输入格式
xkb_layout = us
# 鼠标加速 default none adaptive flat
mouse_accel_profile = adaptive
# 小键盘数字键
#kb_numlock_default_state = true
# 鼠标主题
cursor_theme = Adwaita
# 鼠标大小 这些仅作用于wayfire
#cursor_size = 36
# 键盘映射组合规则文件
xkb_rules = evdev
# Output configuration ─────────────────────────────────────────────────────────
# Example configuration:
# 举例
# [output:eDP-1]
# mode = 1920x1080@60000
# position = 0,0
# transform = normal
# scale = 1.000000
[output:DP-2]
# 屏幕输出分辨率,位置,缩放,方向等
# 分辨率 刷新率
mode = 1920x1080@75000
position = 0, 0
scale = 1.000000
transform = normal
[output:eDP-1]
mode = 2560x1600@60000
position = 1920, 260
scale = 2.000000
transform = normal
# You can get the names of your outputs with wlr-randr.
# 你可以通过wlr-randr来查看你的显示器名
# https://github.com/emersion/wlr-randr
#
# See also kanshi for configuring your outputs automatically.
# https://wayland.emersion.fr/kanshi/
#
# See Output options for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration#output
# Core options ─────────────────────────────────────────────────────────────────
[core]
# List of plugins to be enabled.
# See the Configuration document for a complete list.
plugins = \
alpha \
blur \
animate \
autostart \
command \
cube \
decoration \
expo \
fast-switcher \
fisheye \
grid \
idle \
invert \
move \
oswitch \
scale \
place \
resize \
switcher \
vswitch \
window-rules \
wm-actions \
wobbly \
wrot \
zoom \
simple-tile \
preserve-output
# Note: [blur] is not enabled by default, because it can be resource-intensive.
# blur 默认配置中不开启,因为它可能会占用大量资源,但这里已开启
# Feel free to add it to the list if you want it.
# You can find its documentation here:
# https://github.com/WayfireWM/wayfire/wiki/Configuration#blur
# Workspaces arranged into a grid: 3 × 3.
# 工作区间数量比例
vwidth = 2
vheight = 2
# Prefer client-side decoration or server-side decoration
# 首选窗口装饰
preferred_decoration_mode = server
# 设置工作区的背景颜色
background_color = \#1A1A1AFF
# 关闭窗口
close_top_view = <super> KEY_Q | <alt> KEY_F4
# 控制延迟优化。
# 较低的值意味着 Wayfire 将保留更少的时间来重绘输出,
# 从而为客户端更新自己留出更多时间。
max_render_time = -1
# 启用或禁用XWayland支持
xwayland = true
# Effects ──────────────────────────────────────────────────────────────────────
# 特效
[animate]
# 指定打开窗口时的动画类型。
open_animation = zoom
# 指定关闭窗口时的动画类型。
close_animation = zoom
# 以毫秒为单位设置动画的持续时间。默认值为500。
duration = 200
# Mouse bindings ───────────────────────────────────────────────────────────────
# 鼠标绑定
# 装饰
[decoration]
# 标题栏高度
title_height = 0
# 边框大小
border_size = 2
# 活动窗口的颜色
active_color = \#DC9FB4FF
# 未活动窗口的颜色
inactive_color = \#77767BFF
# Drag windows by holding down Super and left mouse button.
# 窗口移动,super+左键 BTN_LEFT是鼠标左键
[move]
activate = <super> BTN_LEFT
# Resize them with right mouse button + Super.
# 窗口大小,super+右键
[resize]
activate = <super> BTN_RIGHT
# Zoom in the desktop by scrolling + Super.
# 缩放(放大镜) super+滚轮
[zoom]
modifier = <super>
# 速度
speed = 0.010000
# 平滑持续
smoothing_duration = 300
# Change opacity by scrolling with Super + Alt.
# 窗口透明度 super+alt+滚轮
[alpha]
# 最小不透明度 default = 0.1
min_value = 0.4
modifier = <super> <alt>
# Rotate windows with the mouse.
# 窗口旋转 super+alt+右键
[wrot]
activate = <super> <ctrl> BTN_RIGHT
# Fisheye effect.
# 鱼眼
[fisheye]
toggle = <super> <ctrl> KEY_F
# Startup commands ─────────────────────────────────────────────────────────────
# 自启
[autostart]
# Automatically start background and panel.
# Set to false if you want to override the default clients.
#
# Set the wallpaper, start a panel and dock if you want one.
# https://github.com/WayfireWM/wf-shell
#
# These are started by the autostart_wf_shell option above.
#
# 确认开启自启
autostart_wf_shell = false
0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY
# Screen color temperature
# 屏幕色温 已关闭,启用时请安装 wlsunset
# https://sr.ht/~kennylevinsen/wlsunset/
#gamma = wlsunset
# Idle configuration
# 空闲设置
# https://github.com/swaywm/swayidle
# https://github.com/swaywm/swaylock
idle = swayidle -w timeout 900 swaylock
# 输入法
inputmethod = fcitx5
# Notifications
# 通知
# https://wayland.emersion.fr/mako/
notifications = mako
# Output configuration
# 屏幕输出
# https://wayland.emersion.fr/kanshi/
outputs = kanshi
# bar
bar = waybar
# 壁纸
# auto select 'swaybg -i $(find $HOME/Pictures/wallpaper/ -type f | shuf -n1) -m fill'
# swaybg -i $(find $HOME/Pictures/wallpaper/ -type f | shuf -n1) -m fill
#background = bash -c "$HOME/.config/waybar/scripts/background-auto-changer"
background = wpaperd
# XDG desktop portal
# Needed by some GTK applications
portal = /usr/lib/xdg-desktop-portal
########################################################
wifi = nm-applet --indicator
bluetooth = blueman-applet
# clash = cfw
pollit = /usr/lib/xfce-polkit/xfce-polkit
# toolbox = /opt/jetbrains-toolbox/jetbrains-toolbox
########################################################
# 空闲设置
[idle]
cube_max_zoom = 1.500000
cube_rotate_speed = 1.000000
cube_zoom_speed = 1000
# 禁用全屏空闲
disable_on_fullscreen = true
# 在指定的不活动秒数后进入省电模式
dpms_timeout = 905
# 在指定的非活动秒数后显示屏幕保护程序
screensaver_timeout = 300
# 使用指定的激活器禁用合成器空闲
toggle = <super> <shift> KEY_L
# Command ─────────────────────────────────────────────────────────────────
# 自定义命令
[command]
# open nemo
binding_file_browser = <super> KEY_E
command_file_browser = nautilus
# brightnessctl 屏幕亮度 先装brightnessctl这个包
binding_brightness_down = KEY_BRIGHTNESSDOWN
command_brightness_down = brightnessctl set 5%-
binding_brightness_up = KEY_BRIGHTNESSUP
command_brightness_up = brightnessctl set 5%+
# Start a terminal
# 启动一个终端
# https://github.com/alacritty/alacritty
binding_terminal = <super> KEY_ENTER
command_terminal = alacritty # kitty -o "linux_display_server=wayland" # 默认 alacritty
# Toggle Waybar
# 切换是否隐藏waybar
binding_waybar = <super> KEY_W
command_waybar = killall -s USR1 waybar
# Start your launcher
# 启动luncher
# https://hg.sr.ht/~scoopta/wofi
# Note: Add mode=run or mode=drun to ~/.config/wofi/config.
# You can also specify the mode with --show option.
binding_launcher = <super> KEY_D
command_launcher = rofi -show drun
# Screen locker
# 屏幕锁屏
# https://github.com/swaywm/swaylock
binding_lock = <super> KEY_ESC
command_lock = swaylock
# Logout
# 登出 登录管理器
# https://github.com/ArtsyMacaw/wlogout
binding_logout = <super> <shift> KEY_ESC
command_logout = wlogout
# Screenshots
# 截图
# https://wayland.emersion.fr/grim/
# https://wayland.emersion.fr/slurp/
binding_screenshot = <ctrl> <super> <alt> KEY_C
command_screenshot = grim $HOME/Pictures/screenshot/$(date "+%F_%T").png
binding_screenshot_clip_paste = <ctrl> <alt> KEY_A
command_screenshot_clip_paste = slurp | grim -g - - | wl-copy && wl-paste > $HOME/Pictures/screenshot/$(date '+%F_%T').png
# Volume controls
# 音量控制
# https://alsa-project.org
repeatable_binding_volume_up = KEY_VOLUMEUP
#command_volume_up = amixer set Master 1%+
command_volume_up = $HOME/.config/waybar/scripts/set_voice +1%
repeatable_binding_volume_down = KEY_VOLUMEDOWN
#command_volume_down = amixer set Master 1%-
command_volume_down = $HOME/.config/waybar/scripts/set_voice -1%
binding_mute = KEY_MUTE
#command_mute = amixer set 'Speaker' unmute; amixer set 'Master' toggle
command_mute = $HOME/.config/waybar/scripts/set_voice 0
# Windows ──────────────────────────────────────────────────────────────────────
# 窗口
# Actions related to window management functionalities.
#
# 窗口管理器动作
[wm-actions]
# 全屏
toggle_fullscreen = <super> KEY_F
# 始终置顶
# toggle_always_on_top = <super> KEY_X
# toggle_sticky = <super> <shift> KEY_X
# Position the windows in certain regions of the output.
# 设定窗口显示在屏幕的位置
[grid]
#
# ⇱ ↑ ⇲ │ 7 8 9
# ← f → │ 4 5 6
# ⇱ ↓ ⇲ d │ 1 2 3 0
# ‾ ‾
# b是bottom c是center t是top
# l是左 r是右
# 所以可以显示在左下,右上,中间,左边什么的
# 通过super加小键盘数字键设置
slot_bl = <super> KEY_KP1
slot_b = <super> KEY_KP2
slot_br = <super> KEY_KP3
slot_l = <super> KEY_LEFT | <super> KEY_KP4
slot_c = <super> KEY_UP | <super> KEY_KP5
slot_r = <super> KEY_RIGHT | <super> KEY_KP6
slot_tl = <super> KEY_KP7
slot_t = <super> KEY_KP8
slot_tr = <super> KEY_KP9
# Restore default.
# 恢复窗口位置
restore = <super> KEY_DOWN | <super> KEY_KP0
# Change active window with an animation.
# 切换活动窗口
[switcher]
next_view = <alt> KEY_TAB
prev_view = <alt> <shift> KEY_TAB
# Simple active window switcher.
# 快速切换窗口
[fast-switcher]
activate = <alt> KEY_ESC
# Workspaces ───────────────────────────────────────────────────────────────────
# 工作区间
# Switch to workspace.
# 工作区间切换
[vswitch]
binding_left = <ctrl> <super> KEY_LEFT
binding_down = <ctrl> <super> KEY_DOWN
binding_up = <ctrl> <super> KEY_UP
binding_right = <ctrl> <super> KEY_RIGHT
# Move the focused window with the same key-bindings, but add ctrl.
# 带着活动窗口一起切换工作区间
with_win_left = <ctrl> <super> KEY_LEFT
with_win_down = <ctrl> <super> KEY_DOWN
with_win_up = <ctrl> <super> KEY_UP
with_win_right = <ctrl> <super> KEY_RIGHT
# Show the current workspace row as a cube.
# 以立方体显示所有工作区间
[cube]
activate = <ctrl> <alt> BTN_LEFT
# Switch to the next or previous workspace.
# 快速切换到下一个工作区间
rotate_left = <super> <ctrl> KEY_H
rotate_right = <super> <ctrl> KEY_L
# Show an overview of all workspaces.
# 显示所有工作区间
[expo]
toggle = <super>
# Select a workspace.
# Workspaces are arranged into a grid of 3 × 3.
# The numbering is left to right, line by line.
# 编号是从左到右,从上到下一行一行
# See core.vwidth and core.vheight for configuring the grid.
# 切换到指定工作区间(根据自己有多少个来设置)
select_workspace_1 = KEY_1
select_workspace_2 = KEY_2
select_workspace_3 = KEY_3
select_workspace_4 = KEY_4
select_workspace_5 = KEY_5
select_workspace_6 = KEY_6
select_workspace_7 = KEY_7
select_workspace_8 = KEY_8
select_workspace_9 = KEY_9
# Outputs ──────────────────────────────────────────────────────────────────────
# 输出(屏幕)
# Change focused output.
# 屏幕切换,如果你接双屏的话
[oswitch]
# Switch to the next output.
# 切换到下一个屏幕
next_output = <super> KEY_O
# Same with the window.
# 带上活动窗口切换到下一个屏幕
next_output_with_win = <super> <shift> KEY_O
[scale]
toggle = <super> KEY_TAB | hotspot top-left 10x10 300
# 缩放初始动画的持续时间
duration = 300
# 在交互和非交互模式下在窗口上单击鼠标中键关闭该窗口
middle_click_close = true
# Invert the colors of the whole output.
# 反色
[invert]
toggle = <super> KEY_I
# 受Sway启发,提供一些平铺功能的插件。
[simple-tile]
key_toggle = <super> <alt> KEY_P
tile_by_default = none
inner_gap_size = 0
button_move = <super> BTN_LEFT
keep_fullscreen_on_adjacent = false
key_focus_above = <super> KEY_UP
key_focus_below = <super> KEY_DOWN
key_focus_left = <super> KEY_LEFT
key_focus_right = <super> KEY_RIGHT
# Rules ────────────────────────────────────────────────────────────────────────
# 规则
# Example configuration:
# 举例
# [window-rules]
# maximize_alacritty = on created if app_id is "Alacritty" then maximize
#
# You can get the properties of your applications with the following command:
# $ WAYLAND_DEBUG=1 alacritty 2>&1 | kak
#
# See Window rules for a complete reference.
# https://github.com/WayfireWM/wayfire/wiki/Configuration#window-rules
# 窗口规则
[window-rules]
# waybar启动后边置顶
rule_1 = on created if app_id is "waybar" then keepabove