-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathniri.html
More file actions
1154 lines (1085 loc) · 33.7 KB
/
niri.html
File metadata and controls
1154 lines (1085 loc) · 33.7 KB
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
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Niri × Arch Linux 美化指南 — 滚动平铺的玻璃质感桌面</title>
<style>
:root {
--bg: #1e1e2e;
--bg2: #181825;
--surface: #313244;
--overlay: #45475a;
--text: #cdd6f4;
--subtext: #a6adc8;
--mauve: #cba6f7;
--pink: #f5c2e7;
--blue: #89b4fa;
--green: #a6e3a1;
--yellow: #f9e2af;
--red: #f38ba8;
--teal: #94e2d5;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
font-family:
"Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
background:
radial-gradient(1200px 800px at 10% -10%, #45475a55, transparent),
radial-gradient(1000px 700px at 110% 20%, #cba6f733, transparent),
var(--bg);
color: var(--text);
line-height: 1.75;
min-height: 100vh;
}
.layout {
display: grid;
grid-template-columns: 280px 1fr;
max-width: 1400px;
margin: 0 auto;
}
aside {
position: sticky;
top: 0;
height: 100vh;
overflow-y: auto;
padding: 24px 18px;
border-right: 1px solid #ffffff10;
background: linear-gradient(180deg, #1e1e2eaa, #181825cc);
backdrop-filter: blur(12px);
}
aside h2 {
color: var(--mauve);
font-size: 14px;
letter-spacing: 2px;
text-transform: uppercase;
margin: 16px 0 8px;
}
aside a {
display: block;
color: var(--subtext);
text-decoration: none;
padding: 6px 10px;
border-radius: 8px;
font-size: 14px;
transition: 0.2s;
}
aside a:hover {
background: #ffffff10;
color: var(--text);
transform: translateX(4px);
}
main {
padding: 48px 56px;
max-width: 980px;
}
header.hero {
padding: 60px 40px;
border-radius: 24px;
background:
linear-gradient(135deg, #cba6f733, #89b4fa22, #94e2d522), #1e1e2e88;
border: 1px solid #ffffff15;
backdrop-filter: blur(20px);
box-shadow: 0 20px 60px #00000055;
margin-bottom: 48px;
}
header.hero h1 {
font-size: 42px;
margin: 0 0 12px;
background: linear-gradient(
90deg,
var(--mauve),
var(--pink),
var(--blue)
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
header.hero p {
color: var(--subtext);
font-size: 17px;
margin: 0;
}
.badges {
margin-top: 20px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.badge {
padding: 4px 12px;
border-radius: 999px;
font-size: 12px;
background: #ffffff10;
border: 1px solid #ffffff20;
color: var(--teal);
}
h2.section {
font-size: 28px;
margin: 56px 0 16px;
padding-bottom: 12px;
border-bottom: 1px solid #ffffff15;
color: var(--blue);
}
h3 {
color: var(--pink);
margin-top: 32px;
font-size: 20px;
}
h4 {
color: var(--yellow);
margin-top: 24px;
font-size: 16px;
}
p {
color: var(--text);
}
a.link {
color: var(--blue);
text-decoration: none;
border-bottom: 1px dashed var(--blue);
}
a.link:hover {
color: var(--pink);
border-color: var(--pink);
}
pre {
position: relative;
background: #11111bdd;
border: 1px solid #ffffff10;
border-radius: 12px;
padding: 18px 20px;
overflow-x: auto;
font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
font-size: 13.5px;
line-height: 1.6;
box-shadow: inset 0 0 0 1px #00000040;
}
pre::before {
content: attr(data-lang);
position: absolute;
top: 8px;
right: 14px;
font-size: 11px;
color: var(--subtext);
letter-spacing: 1px;
}
code {
color: var(--green);
}
pre code {
color: var(--text);
}
.keyword {
color: var(--mauve);
}
.string {
color: var(--green);
}
.comment {
color: var(--overlay);
font-style: italic;
}
.number {
color: var(--yellow);
}
.copy-btn {
position: absolute;
top: 8px;
right: 60px;
background: #ffffff15;
border: 1px solid #ffffff20;
color: var(--text);
padding: 4px 10px;
border-radius: 6px;
font-size: 11px;
cursor: pointer;
transition: 0.2s;
}
.copy-btn:hover {
background: var(--mauve);
color: var(--bg);
}
.card {
background: #ffffff08;
border: 1px solid #ffffff12;
border-radius: 16px;
padding: 20px 24px;
margin: 20px 0;
backdrop-filter: blur(8px);
}
.card.tip {
border-left: 4px solid var(--green);
}
.card.warn {
border-left: 4px solid var(--yellow);
}
.card.info {
border-left: 4px solid var(--blue);
}
.grid2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
table {
width: 100%;
border-collapse: collapse;
margin: 16px 0;
font-size: 14px;
}
th,
td {
padding: 10px 14px;
text-align: left;
border-bottom: 1px solid #ffffff15;
}
th {
color: var(--mauve);
font-weight: 600;
background: #ffffff05;
}
td code {
background: #ffffff10;
padding: 2px 6px;
border-radius: 4px;
font-size: 12.5px;
}
kbd {
background: var(--surface);
border: 1px solid var(--overlay);
border-bottom-width: 2px;
border-radius: 4px;
padding: 2px 6px;
font-size: 12px;
font-family: monospace;
color: var(--yellow);
}
footer {
margin-top: 80px;
padding: 32px 0;
border-top: 1px solid #ffffff15;
color: var(--subtext);
text-align: center;
font-size: 13px;
}
@media (max-width: 900px) {
.layout {
grid-template-columns: 1fr;
}
aside {
position: static;
height: auto;
border-right: none;
border-bottom: 1px solid #ffffff10;
}
main {
padding: 24px;
}
.grid2 {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div class="layout">
<aside>
<h2>导航目录</h2>
<a href="#intro">为什么选 Niri</a>
<a href="#install">基础安装</a>
<a href="#niri">Niri 主配置</a>
<a href="#kitty">Kitty 终端</a>
<a href="#waybar">Waybar 状态栏</a>
<a href="#fuzzel">Fuzzel 启动器</a>
<a href="#mako">Mako 通知</a>
<a href="#wallpaper">壁纸 swww</a>
<a href="#lock">锁屏 hyprlock</a>
<a href="#theme">GTK 主题与字体</a>
<a href="#apps">推荐软件清单</a>
<a href="#shell">DankMaterialShell</a>
<a href="#tips">优化与排错</a>
</aside>
<main>
<header class="hero">
<h1>Niri × Arch Linux 美化指南</h1>
<p>
滚动平铺 · 毛玻璃模糊 · 流畅特效 · 一站式打造好看又好用的 Wayland
桌面
</p>
<div class="badges">
<span class="badge">Wayland</span>
<span class="badge">Niri 25.x+</span>
<span class="badge">Arch Linux</span>
<span class="badge">Catppuccin Mocha</span>
<span class="badge">JetBrainsMono NF</span>
</div>
</header>
<section id="intro">
<h2 class="section">一、为什么选 Niri</h2>
<p>
Niri 是一个用 Rust 编写的滚动式平铺 Wayland
合成器,窗口排在一条无限延伸的水平条带上,新窗口不会挤压旧窗口,工作区按显示器独立纵向排列。相比
Hyprland 的"花哨特效路线"和 Sway 的"i3 复刻路线",Niri
的卖点是<b>稳定、低输入延迟、滚动交互</b>,以及对多显示器的优雅处理。
</p>
<div class="card info">
<b>需要心里有数:</b> Niri
本身不内置窗口模糊/阴影/动画粒子。"透明模糊"主要靠终端自身(Kitty/Ghostty)+
Waybar/Fuzzel/Mako 的 CSS 半透明 + 壁纸虚化营造统一玻璃感。如果非要
Hyprland 级特效,可以搭配 <b>DankMaterialShell</b> 或
<b>Noctalia</b> 外壳。
</div>
</section>
<section id="install">
<h2 class="section">二、基础安装</h2>
<p>
假定你已经装好 Arch Linux 基础系统(使用 archinstall
或手动均可),用户已加入 <code>wheel</code> 组并能 sudo。
</p>
<h3>1. 启用 multilib 与 chaotic-aur(可选)</h3>
<pre data-lang="bash"><code>sudo pacman -Syu
sudo pacman -S --needed base-devel git</code></pre>
<h3>2. 安装 yay(AUR 助手)</h3>
<pre data-lang="bash"><code>cd /tmp
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin && makepkg -si</code></pre>
<h3>3. 安装 Niri 与全套伴生软件</h3>
<pre
data-lang="bash"
><code>sudo pacman -S niri kitty waybar fuzzel mako swaybg \
grim slurp wl-clipboard swappy brightnessctl \
pipewire pipewire-pulse wireplumber \
xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk \
polkit-gnome gnome-keyring qt5-wayland qt6-wayland \
noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-jetbrains-mono-nerd \
papirus-icon-theme thunar mpv playerctl pavucontrol
# AUR 部分
yay -S swww hyprlock hypridle hyprpicker xwayland-satellite \
bibata-cursor-theme catppuccin-gtk-theme-mocha</code></pre>
<div class="card tip">
<b>提示:</b> <code>xwayland-satellite</code> 让 Niri 能跑 X11
程序(微信、QQ、JetBrains 全家桶等);<code
>xdg-desktop-portal-gnome</code
>
提供截屏/录屏功能。
</div>
<h3>4. 启动 Niri</h3>
<p>
从 TTY 登录后输入 <code>niri-session</code>;或使用 GDM/SDDM 选择
"Niri" 会话项。
</p>
</section>
<section id="niri">
<h2 class="section">
三、Niri 主配置 <code>~/.config/niri/config.kdl</code>
</h2>
<p>
Niri 使用 KDL
语法配置。下面这份是带半透明、内边距、圆角和键位的完整模板。
</p>
<pre data-lang="kdl"><code>// ~/.config/niri/config.kdl
input {
keyboard {
xkb {
layout "us"
}
repeat-delay 300
repeat-rate 40
}
touchpad {
tap
natural-scroll
accel-speed 0.2
}
mouse { accel-profile "flat" }
focus-follows-mouse
warp-mouse-to-focus
}
output "eDP-1" {
mode "1920x1080@60.000"
scale 1.0
position x=0 y=0
}
layout {
gaps 10
center-focused-column "never"
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width { proportion 0.5; }
focus-ring {
width 2
active-color "#cba6f7"
inactive-color "#45475a"
}
border {
off
}
shadow {
on
softness 30
spread 5
offset x=0 y=5
color "#00000070"
}
struts {
left 0
right 0
top 0
bottom 0
}
}
prefer-no-csd
// 启动时拉起的常驻服务
spawn-at-startup "swww-daemon"
spawn-at-startup "waybar"
spawn-at-startup "mako"
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
spawn-at-startup "xwayland-satellite"
spawn-at-startup "hypridle"
spawn-at-startup "sh" "-c" "swww img ~/Pictures/wallpaper.jpg --transition-type wipe"
screenshot-path "~/Pictures/Screenshots/Screenshot_%Y%m%d_%H%M%S.png"
// 窗口规则:终端、启动器透明
window-rule {
match app-id="kitty"
opacity 0.92
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
// 动画
animations {
slowdown 1.0
workspace-switch { spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001; }
window-open { duration-ms 200; curve "ease-out-expo"; }
window-close { duration-ms 150; curve "ease-out-quad"; }
}
// 键位绑定
binds {
Mod+Return { spawn "kitty"; }
Mod+D { spawn "fuzzel"; }
Mod+E { spawn "thunar"; }
Mod+L { spawn "hyprlock"; }
Mod+Q { close-window; }
Mod+H { focus-column-left; }
Mod+L { focus-column-right; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+Shift+H { move-column-left; }
Mod+Shift+L { move-column-right; }
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+Shift+1 { move-column-to-workspace 1; }
Mod+R { switch-preset-column-width; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
Mod+Comma { consume-window-into-column; }
Mod+Period { expel-window-from-column; }
Print { screenshot; }
Mod+Print { screenshot-window; }
Mod+Shift+S { screenshot-screen; }
XF86AudioRaiseVolume { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
XF86AudioLowerVolume { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
XF86AudioMute { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86MonBrightnessUp { spawn "brightnessctl" "set" "5%+"; }
XF86MonBrightnessDown { spawn "brightnessctl" "set" "5%-"; }
Mod+Shift+E { quit; }
}</code></pre>
</section>
<section id="kitty">
<h2 class="section">
四、Kitty 终端 <code>~/.config/kitty/kitty.conf</code>
</h2>
<p>Kitty 是 Niri 上最稳的选择,GPU 加速 + 原生背景模糊 + 连字。</p>
<pre data-lang="conf"><code># 字体
font_family JetBrainsMono Nerd Font
bold_font auto
italic_font auto
font_size 12.5
disable_ligatures never
# 窗口外观
window_padding_width 12
window_margin_width 0
hide_window_decorations yes
confirm_os_window_close 0
# 透明与模糊(Wayland 下生效)
background_opacity 0.85
background_blur 20
dynamic_background_opacity yes
# 光标
cursor_shape beam
cursor_blink_interval 0.5
# 标签栏
tab_bar_edge top
tab_bar_style powerline
tab_powerline_style slanted
# Catppuccin Mocha 配色
foreground #CDD6F4
background #1E1E2E
selection_foreground #1E1E2E
selection_background #F5E0DC
cursor #F5E0DC
cursor_text_color #1E1E2E
url_color #F5E0DC
active_border_color #B4BEFE
inactive_border_color #6C7086
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
color0 #45475A
color8 #585B70
color1 #F38BA8
color9 #F38BA8
color2 #A6E3A1
color10 #A6E3A1
color3 #F9E2AF
color11 #F9E2AF
color4 #89B4FA
color12 #89B4FA
color5 #F5C2E7
color13 #F5C2E7
color6 #94E2D5
color14 #94E2D5
color7 #BAC2DE
color15 #A6ADC8
# 实用快捷键
map ctrl+shift+enter new_window
map ctrl+shift+t new_tab
map ctrl+shift+plus change_font_size all +1.0
map ctrl+shift+minus change_font_size all -1.0
map ctrl+shift+0 change_font_size all 0</code></pre>
<div class="card tip">
<b>说明:</b> <code>background_blur 20</code> 在大多数 Wayland
合成器(包括 Niri)上能呈现真正的窗口背景模糊;若你看不到效果,把
<code>background_opacity</code> 调到 0.7~0.9 之间最明显。
</div>
</section>
<section id="waybar">
<h2 class="section">五、Waybar 状态栏</h2>
<h3>config <code>~/.config/waybar/config.jsonc</code></h3>
<pre data-lang="jsonc"><code>{
"layer": "top",
"position": "top",
"height": 36,
"spacing": 6,
"margin-top": 8,
"margin-left": 12,
"margin-right": 12,
"modules-left": ["niri/workspaces", "niri/window"],
"modules-center": ["clock"],
"modules-right": ["tray", "pulseaudio", "network", "cpu", "memory", "battery", "custom/power"],
"niri/workspaces": {
"format": "{icon}",
"format-icons": {
"1": "一", "2": "二", "3": "三", "4": "四",
"active": "", "default": ""
}
},
"niri/window": { "max-length": 50, "format": " {}" },
"clock": {
"format": " {:%H:%M} ",
"format-alt": " {:%Y-%m-%d %A}",
"tooltip-format": "<tt>{calendar}</tt>"
},
"cpu": { "format": " {usage}%" },
"memory": { "format": " {}%" },
"battery": {
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-icons": ["", "", "", "", ""]
},
"network": {
"format-wifi": " {essid}",
"format-ethernet": " {ipaddr}",
"format-disconnected": " Off"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": " Muted",
"format-icons": { "default": ["", "", ""] },
"on-click": "pavucontrol"
},
"tray": { "spacing": 8 },
"custom/power": {
"format": "⏻",
"on-click": "wlogout"
}
}</code></pre>
<h3>style <code>~/.config/waybar/style.css</code></h3>
<pre data-lang="css"><code>* {
font-family: "JetBrainsMono Nerd Font", "Noto Sans CJK SC";
font-size: 13px;
border: none;
border-radius: 0;
min-height: 0;
}
window#waybar {
background: rgba(30, 30, 46, 0.55);
color: #cdd6f4;
border-radius: 14px;
border: 1px solid rgba(255,255,255,0.08);
/* 配合 niri/合成器的层级模糊;若无效请改用 hyprland */
}
#workspaces button {
padding: 0 10px;
margin: 4px 2px;
color: #a6adc8;
background: transparent;
border-radius: 8px;
transition: all .25s ease;
}
#workspaces button.active {
color: #1e1e2e;
background: linear-gradient(135deg, #cba6f7, #f5c2e7);
}
#workspaces button:hover { background: rgba(255,255,255,0.08); }
#window, #clock, #cpu, #memory, #battery, #network, #pulseaudio, #tray, #custom-power {
padding: 0 12px;
margin: 4px 2px;
background: rgba(255,255,255,0.05);
border-radius: 8px;
}
#clock { color: #f5c2e7; font-weight: 600; }
#cpu { color: #f9e2af; }
#memory { color: #a6e3a1; }
#battery { color: #94e2d5; }
#battery.warning { color: #f9e2af; }
#battery.critical { color: #f38ba8; animation: blink 1s infinite alternate; }
#network { color: #89b4fa; }
#pulseaudio { color: #fab387; }
#custom-power { color: #f38ba8; padding: 0 14px; }
@keyframes blink { to { background: #f38ba8; color: #1e1e2e; } }</code></pre>
</section>
<section id="fuzzel">
<h2 class="section">
六、Fuzzel 启动器 <code>~/.config/fuzzel/fuzzel.ini</code>
</h2>
<pre data-lang="ini"><code>[main]
font=JetBrainsMono Nerd Font:size=12
dpi-aware=yes
prompt=" "
icon-theme=Papirus-Dark
lines=8
width=36
horizontal-pad=20
vertical-pad=14
inner-pad=10
line-height=22
terminal=kitty
[colors]
background=1e1e2eee
text=cdd6f4ff
match=cba6f7ff
selection=313244ff
selection-text=f5c2e7ff
selection-match=cba6f7ff
border=cba6f7ff
[border]
width=2
radius=14
[dmenu]
exit-immediately-if-empty=yes</code></pre>
<p>
按 <kbd>Mod</kbd>+<kbd>D</kbd> 即可呼出。Fuzzel 是 Niri
官方文档推荐的轻量启动器,启动几乎没有可感延迟。
<a
class="link"
href="https://lwn.net/Articles/1025866/"
target="_blank"
>LWN</a
>
</p>
</section>
<section id="mako">
<h2 class="section">
七、Mako 通知 <code>~/.config/mako/config</code>
</h2>
<pre data-lang="conf"><code>sort=-time
layer=overlay
background-color=#1e1e2ecc
text-color=#cdd6f4
border-color=#cba6f7
border-radius=12
border-size=2
default-timeout=5000
ignore-timeout=1
font=JetBrainsMono Nerd Font 11
width=380
height=120
margin=12
padding=14
icons=1
max-icon-size=48
markup=1
actions=1
[urgency=low]
border-color=#94e2d5
[urgency=high]
border-color=#f38ba8
default-timeout=0</code></pre>
</section>
<section id="wallpaper">
<h2 class="section">八、壁纸 swww(带过渡动画)</h2>
<pre data-lang="bash"><code># 启动守护进程(已在 niri config 里 spawn)
swww-daemon &
# 设置壁纸,带渐隐动画
swww img ~/Pictures/wallpaper.jpg \
--transition-type wipe \
--transition-duration 1.5 \
--transition-fps 60
# 随机切换脚本(放进 ~/.local/bin/wallrand)
#!/usr/bin/env bash
DIR="$HOME/Pictures/Wallpapers"
swww img "$(find "$DIR" -type f | shuf -n 1)" \
--transition-type grow --transition-pos 0.85,0.85 \
--transition-duration 2</code></pre>
<p>
推荐去
<a class="link" href="https://wallhaven.cc" target="_blank"
>wallhaven.cc</a
>
找 Catppuccin/暗紫色调的高分辨率壁纸,与上面的配色融合最和谐。
</p>
</section>
<section id="lock">
<h2 class="section">九、锁屏 hyprlock + hypridle</h2>
<h3>hyprlock <code>~/.config/hypr/hyprlock.conf</code></h3>
<pre data-lang="conf"><code>background {
monitor =
path = ~/Pictures/wallpaper.jpg
blur_passes = 3
blur_size = 8
contrast = 0.9
brightness = 0.7
}
input-field {
monitor =
size = 280, 50
outline_thickness = 2
dots_size = 0.3
dots_spacing = 0.3
outer_color = rgba(203,166,247,0.8)
inner_color = rgba(30,30,46,0.6)
font_color = rgb(205,214,244)
fade_on_empty = false
placeholder_text = <i>输入密码…</i>
rounding = 14
position = 0, -80
halign = center
valign = center
}
label {
monitor =
text = cmd[update:1000] echo "$(date +'%H:%M')"
font_size = 92
font_family = JetBrainsMono Nerd Font Bold
color = rgba(255,255,255,0.95)
position = 0, 200
halign = center
valign = center
}
label {
monitor =
text = cmd[update:60000] echo "$(date +'%A, %B %d')"
font_size = 18
color = rgba(205,214,244,0.8)
position = 0, 130
halign = center
valign = center
}</code></pre>
<h3>hypridle <code>~/.config/hypr/hypridle.conf</code></h3>
<pre data-lang="conf"><code>general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = niri msg action power-on-monitors
}
listener { timeout = 300; on-timeout = brightnessctl -s set 10%; on-resume = brightnessctl -r; }
listener { timeout = 600; on-timeout = loginctl lock-session; }
listener { timeout = 660; on-timeout = niri msg action power-off-monitors; on-resume = niri msg action power-on-monitors; }
listener { timeout = 1800; on-timeout = systemctl suspend; }</code></pre>
</section>
<section id="theme">
<h2 class="section">十、GTK 主题与字体统一</h2>
<pre
data-lang="bash"
><code># 使用 gsettings(GNOME schema)统一 GTK4 应用风格
gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Mocha-Standard-Mauve-Dark'
gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark'
gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Classic'
gsettings set org.gnome.desktop.interface font-name 'Inter 11'
gsettings set org.gnome.desktop.interface monospace-font-name 'JetBrainsMono Nerd Font 11'
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
# 环境变量(写入 ~/.config/uwsm/env 或 ~/.profile)
export XCURSOR_THEME=Bibata-Modern-Classic
export XCURSOR_SIZE=24
export QT_QPA_PLATFORMTHEME=qt6ct
export GTK_THEME=Catppuccin-Mocha-Standard-Mauve-Dark</code></pre>
</section>
<section id="apps">
<h2 class="section">十一、推荐软件清单(实用 + 美观)</h2>
<table>
<tr>
<th>类别</th>
<th>软件</th>
<th>说明</th>
</tr>
<tr>
<td>浏览器</td>
<td><code>firefox</code> / <code>zen-browser-bin</code></td>
<td>Zen 是 Firefox 美化分支,圆角侧栏</td>
</tr>
<tr>
<td>文件管理</td>
<td><code>thunar</code> / <code>yazi</code></td>
<td>Yazi 在终端内,带图片预览</td>
</tr>
<tr>
<td>编辑器</td>
<td>
<code>neovim</code> + LazyVim / <code>code</code> /
<code>zed</code>
</td>
<td>Zed 启动飞快</td>
</tr>
<tr>
<td>系统监控</td>
<td><code>btop</code></td>
<td>比 htop 漂亮太多</td>
</tr>
<tr>
<td>音乐</td>
<td><code>spotify</code> + <code>spicetify-cli</code></td>
<td>Spicetify 给 Spotify 套主题</td>
</tr>
<tr>
<td>视频</td>
<td><code>mpv</code></td>
<td>配 uosc/thumbfast 脚本</td>
</tr>
<tr>
<td>图片查看</td>
<td><code>imv</code> / <code>swayimg</code></td>
<td>Wayland 原生</td>
</tr>
<tr>
<td>截图标注</td>
<td>
<code>grim</code> + <code>slurp</code> + <code>swappy</code>
</td>
<td>组合拳</td>
</tr>
<tr>
<td>录屏</td>
<td><code>wf-recorder</code> / <code>OBS</code></td>
<td>OBS 需启用 PipeWire 捕获</td>
</tr>
<tr>
<td>剪贴板历史</td>
<td><code>cliphist</code> + <code>wl-clipboard</code></td>
<td>配 fuzzel 调出</td>
</tr>
<tr>
<td>颜色拾取</td>
<td><code>hyprpicker</code></td>
<td>美化必备</td>
</tr>
<tr>
<td>电源菜单</td>
<td><code>wlogout</code></td>
<td>关机/重启/锁屏 GUI</td>
</tr>
<tr>
<td>蓝牙</td>
<td><code>bluetuith</code> / <code>blueman</code></td>
<td>tuith 是 TUI</td>
</tr>
<tr>
<td>网络管理</td>
<td><code>NetworkManager</code> + <code>nm-applet</code></td>
<td>系统托盘可点</td>
</tr>
<tr>
<td>中文输入</td>
<td><code>fcitx5-im</code> + <code>fcitx5-rime</code></td>
<td>必装</td>
</tr>
<tr>
<td>办公</td>
<td><code>onlyoffice-bin</code> / <code>wps-office</code></td>
<td>WPS 兼容性更好</td>
</tr>
<tr>
<td>聊天</td>
<td>
<code>linuxqq</code> / <code>wechat-uos</code> /
<code>telegram-desktop</code>
</td>
<td>需 xwayland-satellite</td>
</tr>
</table>
<h4>剪贴板历史一键安装</h4>
<pre data-lang="bash"><code>sudo pacman -S cliphist wl-clipboard
# 在 niri config 里 spawn-at-startup
spawn-at-startup "sh" "-c" "wl-paste --watch cliphist store"
# 绑一个键