重写 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,6 +1,5 @@
# Proxy, set in environment.d?
http_proxy="http://127.0.0.1:7890/"
https_proxy="http://127.0.0.1:7890/"
# also needs manual configuration in firefox.
# firefox 记得单独配一次.
no_proxy="127.*,192.168.*,10.147.17.*"

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

View File

@@ -1,3 +1,7 @@
# 像这种有明显时间规律的定时任务我懒得专门搞配套。不觉得 timer 非得跟 service 同名搞绑定很啰嗦吗?
# 我完全可以 on-hourly@renew-wallpaper.timer、on-hourly@webapi-health-check.timer 嘛。
# 当然这样也算不上简洁,但至少不需要另装个 cronarch 不自带)。
[Unit]
Description=Run %i hourly

View File

@@ -1,12 +0,0 @@
[Unit]
Description=Run %i monthly
[Timer]
OnCalendar=monthly
RandomizedDelaySec=5m
AccuracySec=5s
Persistent=true
Unit=%i.service
[Install]
WantedBy=timers.target

View File

@@ -1,12 +0,0 @@
[Unit]
Description=Run %i weekly
[Timer]
OnCalendar=weekly
RandomizedDelaySec=2m
AccuracySec=2s
Persistent=true
Unit=%i.service
[Install]
WantedBy=timers.target

View File

@@ -3,6 +3,7 @@
"modules-left": [
"niri/workspaces",
"niri/window"
// 我参考的那两人还用 sway甚至大杂烩。而我只知道 niri甚至一度也不想知道不习惯
],
"modules-center": [
"clock"
@@ -41,6 +42,7 @@
"Yazi: (.*)": "$1"
}
},
// 这玩意说实话没想象中那么好用,但移植雪叶那个脚本,效果甚至还没这个好。
"mpris": {
"format": "{status_icon} {title}",
"format-stopped": "",
@@ -59,6 +61,7 @@
"tray": {
"spacing": 12
},
// 忘记用哪个工具确定设备节点了。实在不行终端开 yazi 来回翻。
"temperature": {
// "thermal-zone": 1,
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",

View File

@@ -2,5 +2,6 @@
default=gnome;gtk;
org.freedesktop.impl.portal.Access=gtk
org.freedesktop.impl.portal.Notification=gtk
# gnome 密码框太丑了。
org.freedesktop.impl.portal.Secret=kwallet
org.freedesktop.impl.portal.FileChooser=gtk