diff --git a/packages/waybar/custom/config b/packages/waybar/custom/config
index 88707f8..602c1fa 100644
--- a/packages/waybar/custom/config
+++ b/packages/waybar/custom/config
@@ -1,123 +1,152 @@
-// -*- mode: json -*-
-
{
- "layer": "top",
- "position": "bottom",
-
- "modules-left": [
- "sway/workspaces",
- "custom/right-arrow-dark"
- ],
- "modules-center": [
- "custom/left-arrow-dark",
- "clock#1",
- "custom/left-arrow-light",
- "custom/left-arrow-dark",
- "clock#2",
- "custom/right-arrow-dark",
- "custom/right-arrow-light",
- "clock#3",
- "custom/right-arrow-dark"
- ],
- "modules-right": [
- "custom/left-arrow-dark",
- "pulseaudio",
- "custom/left-arrow-light",
- "custom/left-arrow-dark",
- "memory",
- "custom/left-arrow-light",
- "custom/left-arrow-dark",
- "cpu",
- "custom/left-arrow-light",
- "custom/left-arrow-dark",
- "battery",
- "custom/left-arrow-light",
- "custom/left-arrow-dark",
- "disk",
- "custom/left-arrow-light",
- "custom/left-arrow-dark",
- "tray"
- ],
-
- "custom/left-arrow-dark": {
- "format": "",
- "tooltip": false
- },
- "custom/left-arrow-light": {
- "format": "",
- "tooltip": false
- },
- "custom/right-arrow-dark": {
- "format": "",
- "tooltip": false
- },
- "custom/right-arrow-light": {
- "format": "",
- "tooltip": false
- },
-
- "sway/workspaces": {
- "disable-scroll": true,
- "format": "{name}"
- },
-
- "clock#1": {
- "format": "{:%a}",
- "tooltip": false
- },
- "clock#2": {
- "format": "{:%H:%M}",
- "tooltip": false
- },
- "clock#3": {
- "format": "{:%m-%d}",
- "tooltip": false
- },
-
- "pulseaudio": {
- "format": "{icon} {volume:2}%",
- "format-bluetooth": "{icon} {volume}%",
- "format-muted": "MUTE",
- "format-icons": {
- "headphones": "",
- "default": [
- "",
- ""
- ]
- },
- "scroll-step": 5,
- "on-click": "pamixer -t",
- "on-click-right": "pavucontrol"
- },
- "memory": {
- "interval": 5,
- "format": "Mem {}%"
- },
- "cpu": {
- "interval": 5,
- "format": "CPU {usage:2}%"
- },
- "battery": {
- "states": {
- "good": 95,
- "warning": 30,
- "critical": 15
- },
- "format": "{icon} {capacity}%",
- "format-icons": [
- "",
- "",
- "",
- "",
- ""
- ]
- },
- "disk": {
- "interval": 5,
- "format": "Disk {percentage_used:2}%",
- "path": "/"
- },
- "tray": {
- "icon-size": 20
- }
+ "layer": "top",
+ "position": "top",
+ "height": 45,
+ "spacing": 0,
+ "modules-left": [
+ "hyprland/workspaces",
+ "tray",
+ "custom/lock",
+ "custom/reboot",
+ "custom/power",
+ "clock"
+ ],
+ "modules-center": ["hyprland/window"],
+ "modules-right": [
+ "network",
+ "battery",
+ "bluetooth",
+ "pulseaudio",
+ "backlight",
+ "custom/temperature",
+ "memory",
+ "cpu"
+ ],
+ "hyprland/workspaces": {
+ "disable-scroll": false,
+ "all-outputs": true,
+ "format": "{icon}",
+ "on-click": "activate",
+ "persistent-workspaces": {
+ "*":[1,2,3,4,5,6,7]
+ },
+ "format-icons":{
+ "1": "",
+ "2": "",
+ "3": "",
+ "4": "",
+ "5": "",
+ "6": "",
+ "7": "",
+ "active": ""
+ }
+ },
+ "custom/lock": {
+ "format": " ",
+ "on-click": "hyprlock",
+ "tooltip": true,
+ "tooltip-format": "锁屏"
+ },
+ "custom/reboot": {
+ "format": " ",
+ "on-click": "systemctl reboot",
+ "tooltip": true,
+ "tooltip-format": "重启"
+ },
+ "custom/power": {
+ "format": " ",
+ "on-click": "systemctl poweroff",
+ "tooltip": true,
+ "tooltip-format": "关机"
+ },
+ "network": {
+ "format-wifi": " {essid} ",
+ "format-ethernet": " Wired ",
+ "tooltip-format": " {bandwidthUpBytes} {bandwidthDownBytes}",
+ "format-linked": " {ifname} (No IP) ",
+ "format-disconnected": " Disconnected ",
+ "format-alt": " {signalStrength}% ",
+ "interval": 1
+ },
+ "battery": {
+ "states": {
+ "warning": 30,
+ "critical": 15
+ },
+ "format": " {icon} {capacity}% ",
+ "format-charging": " {capacity}%",
+ "interval": 1,
+ "format-icons": ["", "", "", "", ""],
+ "tooltip": true
+ },
+ "pulseaudio": {
+ "format": "{icon}{volume}% ",
+ "format-muted": " 0% ",
+ "format-icons": {
+ "headphone": " ",
+ "hands-free": " ",
+ "headset": " ",
+ "phone": " ",
+ "portable": " ",
+ "car": " ",
+ "default": [
+ " ",
+ " ",
+ " "
+ ]
+ },
+ "on-click-right": "pavucontrol -t 3",
+ "on-click": "pactl -- set-sink-mute 0 toggle",
+ "tooltip": true,
+ "tooltip-format": "当前系统声音: {volume}%"
+ },
+ "custom/temperature": {
+ "exec": "sensors | awk '/^Package id 0:/ {print int($4)}'",
+ "format": " {}°C ",
+ "interval": 5,
+ "tooltip": true,
+ "tooltip-format": "当前 CPU 温度: {}°C"
+ },
+ "memory": {
+ "format": " {used:0.1f}G/{total:0.1f}G ",
+ "tooltip": true,
+ "tooltip-format": "当前内存占比: {used:0.2f}G/{total:0.2f}G"
+ },
+ "cpu": {
+ "format": " {usage}% ",
+ "tooltip": true
+ },
+ "clock": {
+ "interval": 1,
+ "timezone": "Asia/Chengdu",
+ "format": " {:%H:%M} ",
+ "tooltip": true,
+ "tooltip-format": "{:L%Y 年 %m 月 %d 日, %A}"
+ },
+ "tray": {
+ "icon-size": 17,
+ "spacing": 6
+ },
+ "backlight": {
+ "device": "intel_backlight",
+ "format": "{icon}{percent}% ",
+ "tooltip": true,
+ "tooltip-format": "当前屏幕亮度: {percent}%",
+ "format-icons": [
+ " ", // 暗 - 深灰
+ " ", // 中 - 灰
+ " ", // 亮 - 柠檬黄
+ " " // 最亮 - 金色
+ ]
+ },
+ "bluetooth": {
+ "format": " {status} ",
+ "format-connected": " {device_alias} ",
+ "format-connected-battery": " {device_alias}{device_battery_percentage}% ",
+ "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
+ "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
+ "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
+ "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%"
+ }
}
+
diff --git a/packages/waybar/custom/style.css b/packages/waybar/custom/style.css
index 7454ecf..767c252 100644
--- a/packages/waybar/custom/style.css
+++ b/packages/waybar/custom/style.css
@@ -1,74 +1,131 @@
* {
- font-size: 20px;
- font-family: monospace;
+ font-family: "CaskaydiaCove Nerd Font", "Font Awesome 6 Free", "Font Awesome 6 Free Solid";
+ font-size: 16px;
+ border-radius: 0;
+ min-height: 0;
+ border: none;
+ font-weight: bold;
}
-window#waybar {
- background: #292b2e;
- color: #fdf6e3;
+#workspaces{
+ background-color: rgba(24,24,37,1.0);
+ border: none;
+ box-shadow: none;
}
-#custom-right-arrow-dark,
-#custom-left-arrow-dark {
- color: #1a1a1a;
-}
-#custom-right-arrow-light,
-#custom-left-arrow-light {
- color: #292b2e;
- background: #1a1a1a;
+#tray{
+ margin: 6px 3px;
+ background-color: rgba(36, 36, 52, 1.0);
+ padding: 6px 12px; /* 保持内部间距 */
+ border-radius: 6px;
+ border-width: 0px;
}
-#workspaces,
-#clock.1,
-#clock.2,
-#clock.3,
+#waybar {
+ background-color: #181825;
+ transition-property: background-color;
+ transition-duration: 0.5s;
+}
+
+#window,
+#clock,
+#custom-power,
+#custom-reboot,
+#bluetooth,
+#battery,
#pulseaudio,
+#backlight,
+#custom-temperature,
#memory,
#cpu,
-#battery,
-#disk,
-#tray {
- background: #1a1a1a;
+#network,
+#custom-lock{
+ border-radius: 4px;
+ margin: 6px 3px;
+ padding: 6px 12px;
+ background-color: #1e1e2e;
+ color: #181825;
+}
+
+#clock {
+ background-color: #89b4fa;
+}
+#custom-power{
+ background-color: #f38ba8;
+}
+#custom-reboot{
+ background-color: #a6e3a1;
+}
+#bluetooth{
+ background-color: #f9e2af;
+}
+#battery{
+ background-color: #cba6f7;
+}
+#pulseaudio{
+ background-color: #89dceb;
+}
+#backlight{
+ background-color: #a6a3a1;
+}
+#custom-temperature{
+ background-color: #74c7ec;
+}
+#memory{
+ background-color: #f7768e;
+}
+#cpu{
+ background-color: #f38ba8;
+}
+#network{
+ background-color: #fab387;
+}
+#custom-lock{
+ background-color: #94e2d5;
+}
+#window{
+ background-color: #74c7ec;
+}
+
+#waybar.hidden {
+ opacity: 0.5;
}
#workspaces button {
- padding: 0 2px;
- color: #fdf6e3;
-}
-#workspaces button.focused {
- color: #268bd2;
-}
-#workspaces button:hover {
- box-shadow: inherit;
- text-shadow: inherit;
-}
-#workspaces button:hover {
- background: #1a1a1a;
- border: #1a1a1a;
- padding: 0 3px;
+ all: initial;
+ /* Remove GTK theme values (waybar #1351) */
+ min-width: 0;
+ /* Fix weird spacing in materia (waybar #450) */
+ box-shadow: inset 0 -3px transparent;
+ /* Use box-shadow instead of border so the text isn't offset */
+ padding: 6px 18px;
+ margin: 6px 3px;
+ border-radius: 4px;
+ background-color: rgba(36, 36, 52, 1.0);
+ color: #cdd6f4;
}
-#pulseaudio {
- color: #268bd2;
-}
-#memory {
- color: #2aa198;
-}
-#cpu {
- color: #6c71c4;
-}
-#battery {
- color: #859900;
-}
-#disk {
- color: #b58900;
+#workspaces button.active {
+ color: #1e1e2e;
+ background-color: #cdd6f4;
}
-#clock,
-#pulseaudio,
-#memory,
-#cpu,
-#battery,
-#disk {
- padding: 0 10px;
+#workspaces button:hover {
+ box-shadow: inherit;
+ text-shadow: inherit;
+ color: #1e1e2e;
+ background-color: #cdd6f4;
+}
+
+tooltip {
+ border-radius: 8px;
+ padding: 16px;
+ background-color: #131822;
+ color: #C0C0C0;
+}
+
+tooltip label {
+ padding: 5px;
+ background-color: #131822;
+ color: #C0C0C0;
}