用 Noctalia Shell 替代各种琐碎组件

This commit is contained in:
2026-05-19 20:19:28 +08:00
parent f1b8e14be3
commit bcc383a383
15 changed files with 127 additions and 265 deletions
+1 -1
View File
@@ -180,4 +180,4 @@ find-next=Control+n
# select-row=BTN_LEFT-3
[main]
include=/usr/share/foot/themes/rose-pine
include=~/.config/foot/themes/noctalia
+1
View File
@@ -25,3 +25,4 @@ selection-text = e0def4ff
selection-match = ebbcbaff
prompt = 908caaff
input = 9ccfd8ff
include=~/.config/fuzzel/themes/noctalia
-5
View File
@@ -1,5 +0,0 @@
[main]
style=/home/agxcoy/.config/gtklock/style.css
time-format=%H:%M:%S
date-format=%Y-%m-%d, %A
monitor-priority=HDMI-A-1;eDP-1
-15
View File
@@ -1,15 +0,0 @@
*{
transition: 1000ms ease ;
}
window {
background-image: url("/home/agxcoy/.cache/wallpaper_blur");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: rgba(0,0,0,0.3);
font-family: 'monospace';
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7)
}
#input-field {
background-color: rgba(3, 3, 3, 0.15)
}
-29
View File
@@ -1,29 +0,0 @@
sort=-time
layer=overlay
output=eDP-1
background-color=#1e1e2e
width=360
height=560
border-size=1
border-color=#45475a
border-radius=12
icons=1
max-icon-size=32
default-timeout=5000
ignore-timeout=1
font=MesloLGSNF 11
padding=8
[urgency=low]
border-color=#45475a
[urgency=normal]
border-color=#45475a
[urgency=high]
border-color=#f38ba8
default-timeout=0
[category=mpd]
default-timeout=2000
group-by=category
+18 -16
View File
@@ -9,7 +9,8 @@ binds {
//Shift+Mod+Return hotkey-overlay-title="Steam" { spawn "steam"; }
Mod+F12 hotkey-overlay-title="打开桌面项目 ... (VSCode)" { spawn ".fuzzel-vscode"; }
Mod+Space hotkey-overlay-title="运行命令 ... (fuzzel)" { spawn ".fuzzel-startb"; }
Mod+R hotkey-overlay-title="运行命令 ... (fuzzel)" { spawn ".fuzzel-startb"; }
Mod+Space hotkey-overlay-title="启动面板 (Noctalia)" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
@@ -20,12 +21,11 @@ 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="大退(注销)" { 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";
}
XF86PowerOff hotkey-overlay-title="电源管理 (Noctalia)" { spawn-sh "qs -c noctalia-shell ipc call sessionMenu toggle"; }
Super+Escape hotkey-overlay-title="锁屏 (Noctalia)" { spawn-sh "qs -c noctalia-shell ipc call lockScreen lock"; }
Mod+Delete hotkey-overlay-title="锁屏并睡眠... (Noctalia)" allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call sessionMenu lockAndSuspend"; }
// 有兴趣可以自己替换成 noctalia 的命令行。我是发现保持现状依然可以看到视觉反馈,没必要替换。
XF86AudioRaiseVolume hotkey-overlay-title=null allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+"; }
XF86AudioLowerVolume hotkey-overlay-title=null allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-"; }
XF86AudioMute hotkey-overlay-title=null allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
@@ -33,12 +33,14 @@ binds {
//Mod+Shift+M allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioPause allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86AudioStop allow-when-locked=true { spawn "playerctl" "stop"; }
// 这块还真得换。`yay -Rs waybar` 发现 playerctl 也给带走了。
XF86AudioPlay allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; }
XF86AudioPause allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; }
XF86AudioNext allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media next"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media previous"; }
XF86AudioStop allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media stop"; }
// 结果 Noctalia 自己就依赖 brightnessctl。那留着。
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+5%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "5%-"; }
@@ -179,14 +181,14 @@ binds {
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+X { switch-preset-column-width; }
Mod+Shift+X { switch-preset-window-height; }
Mod+Ctrl+X { reset-window-height; }
Mod+F11 { maximize-column; }
Mod+Shift+F11 { toggle-windowed-fullscreen; }
Mod+Ctrl+F11 { fullscreen-window; }
Mod+T hotkey-overlay-title="Expand column to available width" { expand-column-to-available-width; }
Mod+W hotkey-overlay-title="Tabbed Column Mode" { toggle-column-tabbed-display; }
Mod+T hotkey-overlay-title="将整列窗口撑满整个显示器" { expand-column-to-available-width; }
Mod+W hotkey-overlay-title="用页签表示(所选)窗口所在列" { toggle-column-tabbed-display; }
Mod+C { center-column; }
Mod+Ctrl+C { center-visible-columns; }
+22 -3
View File
@@ -5,9 +5,28 @@ window-rule {
clip-to-geometry true
}
window-rule {
// 以下应用不应该开模糊——开了模糊也只是附上一层边框色,并不具备通常意义上的亚克力、云母质感。
// 排除列表随时更新。因为我测不过来。
// 另注:为什么不用正则组合成一行?正则越长性能开销越大。况且单独的应用方便用注释切换。
exclude app-id="QQ"
exclude app-id="wechat"
exclude app-id="steam"
exclude app-id="google-chrome"
exclude app-id="org.telegram.desktop"
exclude app-id=".exe$" // wine
exclude title=r#"Visual Studio Code$"# app-id=r#"^code"#
// match app-id="(foot|obs)"
opacity 0.8
background-effect {
blur true
xray false
}
}
window-rule {
match app-id="QQ"
match app-id="Electron" title="MetaCubeXD$"
match app-id="[Ee]lectron" title="MetaCubeXD$"
match app-id="wechat"
match app-id="org.telegram.desktop"
match app-id="nwjs" // mainly for rpgmaker games.
@@ -27,8 +46,8 @@ window-rule {
}
window-rule {
match app-id="Electron" title="Test" // frg2089.BiliLive.Observer
match app-id="Electron" title="Blivechat-Openlive" // blivechat
match app-id="[Ee]lectron" title="Test" // frg2089.BiliLive.Observer
match app-id="[Ee]lectron" title="Blivechat-Openlive" // blivechat
default-column-width { proportion 0.42; }
// default-column-display "tabbed"
open-on-output "eDP-1"
+17 -6
View File
@@ -1,4 +1,4 @@
// edited. thx to fizzyizzy05.
// edited. thx to fizzyizzy05 & silvaire-qwq.
input {
keyboard {
xkb {
@@ -58,8 +58,9 @@ output "HDMI-A-1" {
}
layout {
gaps 6
gaps 8
background-color "transparent"
center-focused-column "never"
preset-column-widths {
@@ -127,10 +128,17 @@ overview {
}
layer-rule {
match namespace="^wallpaper$"
match namespace="^noctalia-overview*"
place-within-backdrop true
}
layer-rule {
match namespace="^noctalia-(background|launcher-overlay|dock)-.*$"
background-effect {
xray false
}
}
animations {
// off
@@ -175,15 +183,15 @@ animations {
}
}
// 我看雪叶是把能拆的大板块都拆得一干二净,但就我这份配置而言,拆两份常用的出来已经足矣
// 我看雪叶是把能拆的大板块都拆得一干二净,但就我这份配置而言,拆两份常用的出来已经足矣。
// 部分视觉效果拆出去可能还会失效(比如窗口边框)。
include "config-window.kdl"
include "config-keyboard.kdl"
// spawn-at-startup "waybar" // 建议交给 systemctl --user,它自己没法热重载。
// spawn-sh-at-startup "wl-paste --watch cliphist store"
spawn-at-startup "awww-daemon"
// spawn-at-startup "awww-daemon" "--namespace" "blur"
// spawn-at-startup "awww-daemon"
spawn-at-startup "qs" "-c" "noctalia-shell"
spawn-at-startup "xwayland-satellite"
spawn-at-startup "/usr/lib/pam_kwallet_init"
@@ -208,3 +216,6 @@ prefer-no-csd
// 我自己搞了个软链接,把截图丢进 tmpfs 里了。参见 .zshrc。
screenshot-path "~/.tmp/Screenshots/%Y-%m-%d %H-%M-%S.png"
// screenshot-path null
include "./noctalia.kdl"
-103
View File
@@ -1,103 +0,0 @@
{
"layer": "top",
"modules-left": [
"niri/workspaces",
"niri/window"
// 我参考的那两人还用 sway,甚至大杂烩。而我只知道 niri,甚至一度也不想知道(不习惯)。
],
"modules-center": [
"clock"
],
"modules-right": [
"mpris",
"tray",
"battery",
"cpu",
"memory",
"temperature",
"pulseaudio"
],
"sway/scratchpad": {
"format": "󱂬 {count}"
},
"pulseaudio": {
"format": " {volume}%",
"format-muted": "x {volume}%",
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"on-click-right": "pavucontrol-qt"
},
"niri/workspaces": {
"format": "{index}"
},
"niri/window": {
"format": "{}",
"icon": true,
"max-length": 40,
"icon-size": 14,
"rewrite": {
"(.*) — Mozilla Firefox": "$1",
"(.*) - Google Chrome": "$1",
"(.*) - Visual Studio Code": "$1",
"(.*) - VLC media player": "$1",
"Yazi: (.*)": "$1"
}
},
// 这玩意说实话没想象中那么好用,但移植雪叶那个脚本,效果甚至还没这个好。
"mpris": {
"format": "{status_icon} {title}",
"format-stopped": "",
"max-length": 40,
"status-icons": {
"paused": "",
"playing": "󰐊"
},
"interval": "3"
},
"clock": {
"format": "{:%d %b %H:%M}",
"interval": 1,
"tooltip-format": "{:%A %d %B %Y}"
},
"tray": {
"spacing": 12
},
// 忘记用哪个工具确定设备节点了。实在不行终端开 yazi 来回翻。
"temperature": {
// "thermal-zone": 1,
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
"input-filename": "temp1_input",
"critical-threshold": 90,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{icon} {temperatureC}°C",
"format-icons": [
"",
"",
""
]
},
"memory": {
"format": " {percentage}%",
"interval": 5
},
"cpu": {
"format": " {usage}%",
"interval": 2
},
"battery": {
"format": "{icon} {capacity}%",
"format-charging": "{icon} {capacity}% ",
"format-icons": [
"󰁺",
"󰁻",
"󰁼",
"󰁽",
"󰁾",
"󰁿",
"󰂀",
"󰂁",
"󰂂",
"󰁹"
],
"interval": 1
}
}
-74
View File
@@ -1,74 +0,0 @@
window#waybar {
background-color: rgba(25, 23, 36, 0.75);
color: #cdd6f4;
transition-property: background-color;
transition-duration: .5s;
border-bottom: 1px solid rgba(144, 140, 170, 0.35);
}
* {
font-family: "Symbols Nerd Font", monospace;
font-size: 10pt;
}
#workspaces button {
padding-top: 4px;
padding-bottom: 4px;
padding-left: 8px;
padding-right: 8px;
background-color: transparent;
border-radius: 100%;
border: 6px #f5c2e7;
font-weight: 800;
color: #a6adc8;
}
#workspaces button.urgent {
color: #fab387;
}
#workspaces button:hover {
background: rgba(69, 71, 90, 0.65);
color: #cdd6f4;
border: 12px #f5c2e7;
transition: none;
}
#workspaces button.focused {
color: #f5c2e7;
border: 12px #f5c2e7;
}
label.module {
padding: 0 10px 0 10px;
}
box.module button:hover {
box-shadow: none;
outline: none;
font-style: normal;
text-shadow: none;
}
#tray {
padding: 0 8 0 8;
}
menu {
background-color: #181825;
color: #cdd6f4;
border: 1px solid #494d64;
padding: 6px;
border-radius: 12px;
}
#tray menu menuitem:hover {
background-color: #1e1e2e;
color: #f5c2e7;
border-radius: 5px;
}
#window {
font-weight: 800;
padding: 0px 8px 0px 8px;
}
+3
View File
@@ -0,0 +1,3 @@
[flavor]
dark = "noctalia"
light = "noctalia"