用 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
+103
View File
@@ -0,0 +1,103 @@
{
"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
@@ -0,0 +1,74 @@
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;
}