重写 startb;补点中文注释;删减多余的定时模板

为啥又中文了?英文太长,中英夹杂键起来别扭。

不会真有人用我原始人般的配置吧?
This commit is contained in:
2026-03-24 03:08:10 +08:00
parent 8b9589c8c9
commit a1a0c2bdb6
17 changed files with 78 additions and 332 deletions

View File

@@ -1,13 +1,15 @@
binds {
Mod+F1 { show-hotkey-overlay; }
// 芝士快捷键表。我自己也很难说能熟练用,所以从`config.kdl`里拆出来了。所幸它支持 include。
Mod+Return hotkey-overlay-title="Terminal (foot)" { spawn "foot"; }
Mod+F9 hotkey-overlay-title="Browser (chrome)" { spawn "google-chrome-stable"; }
Mod+E hotkey-overlay-title="Explorer (yazi)" { spawn "foot" "yazi"; }
binds {
Mod+F1 hotkey-overlay-title="显示帮助喵" { show-hotkey-overlay; }
Mod+Return hotkey-overlay-title="终端 (foot)" { spawn "foot"; }
Mod+F9 hotkey-overlay-title="浏览器 (chrome)" { spawn "google-chrome-stable"; }
Mod+E hotkey-overlay-title="文件管理器 (yazi)" { spawn "foot" "yazi"; }
//Shift+Mod+Return hotkey-overlay-title="Steam" { spawn "steam"; }
Mod+F12 hotkey-overlay-title="Open Projects ... (VSCode)" { spawn ".fuzzel-vscode"; }
Mod+Space hotkey-overlay-title="Run a command ... (fuzzel)" { spawn ".fuzzel-startb"; }
Mod+F12 hotkey-overlay-title="打开桌面项目 ... (VSCode)" { spawn ".fuzzel-vscode"; }
Mod+Space hotkey-overlay-title="运行命令 ... (fuzzel)" { spawn ".fuzzel-startb"; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
@@ -18,9 +20,9 @@ binds {
// The allow-inhibiting=false property can be applied to other binds as well,
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Alt+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
XF86PowerOff hotkey-overlay-title="Exit niri" { quit; }
Super+Escape hotkey-overlay-title="Lock the Screen (gtklock)" { spawn "gtklock" "-d"; }
Mod+Delete hotkey-overlay-title="Lock screen and Hibernate ..." allow-when-locked=true {
XF86PowerOff hotkey-overlay-title="大退(注销)" { quit; }
Super+Escape hotkey-overlay-title="锁屏 (gtklock)" { spawn "gtklock" "-d"; }
Mod+Delete hotkey-overlay-title="锁屏并休眠 ..." allow-when-locked=true {
spawn-sh "(pgrep gtklock || gtklock -d) && sleep 1.5 && systemctl hibernate";
}
@@ -40,6 +42,7 @@ binds {
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+5%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "5%-"; }
// 有些键位懒得补汉化说明,自己摁两下就知道了。
Alt+Tab hotkey-overlay-title=null repeat=false { toggle-overview; }
Alt+F4 { close-window; }
@@ -212,7 +215,7 @@ binds {
// Mod+Shift+Space { switch-layout "prev"; }
Print hotkey-overlay-title=null { screenshot-screen; }
Mod+Shift+S { screenshot; }
Mod+Shift+S hotkey-overlay-title="截取矩形画面(和 Win11 类似)" { screenshot; }
Alt+Print { screenshot-window; }
// Powers off the monitors. To turn them back on, do any input like

View File

@@ -1,3 +1,5 @@
// 这是窗口布局表。由于经常改,也拆出来了。
window-rule {
geometry-corner-radius 6
clip-to-geometry true

View File

@@ -41,7 +41,7 @@ input {
}
warp-mouse-to-focus
// also needs ignore in `/etc/systemd/logind.conf`.
// 还需要在`/etc/systemd/logind.conf`里屏蔽关机键行为.
disable-power-key-handling
focus-follows-mouse max-scroll-amount="0%"
}
@@ -174,10 +174,12 @@ animations {
}
}
include "config.window.kdl"
include "config.keyboard.kdl"
// 我看雪叶是把能拆的大板块都拆得一干二净,但就我这份配置而言,拆两份常用的出来已经足矣了。
// 部分视觉效果拆出去可能还会失效(比如窗口边框)。
include "config-window.kdl"
include "config-keyboard.kdl"
// spawn-at-startup "waybar"
// spawn-at-startup "waybar" // 建议交给 systemctl --user它自己没法热重载。
// spawn-sh-at-startup "wl-paste --watch cliphist store"
spawn-at-startup "swww-daemon"
spawn-at-startup "swww-daemon" "--namespace" "blur"
@@ -202,5 +204,6 @@ gestures {
prefer-no-csd
// 我自己搞了个软链接,把截图丢进 tmpfs 里了。参见 .zshrc。
screenshot-path "~/.tmp/Screenshots/%Y-%m-%d %H-%M-%S.png"
// screenshot-path null