Files
sway-dotfile/waybar/style.css
2025-12-11 14:43:01 +08:00

67 lines
1.5 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

* {
border: none;
border-radius: 0;
/* 设置全局字体,确保图标显示正常 */
font-family: "Maple Mono NF CN", "Font Awesome 7 Free", "Font Awesome 7 Brands", "FontAwesome", Roboto, Helvetica, Arial, sans-serif;
font-size: 14px;
min-height: 0;
}
/* --- 核心:设置 Bar 的背景透明度 --- */
window#waybar {
/* rgba(红, 绿, 蓝, 透明度) */
/* 0.5 表示半透明0 表示全透明1 表示不透明 */
background-color: rgba(29, 31, 33, 0.7);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
/* 当 Bar 变得隐形时的样式(如果配置了自动隐藏模式) */
window#waybar.hidden {
opacity: 0.2;
}
/* --- 模块样式 --- */
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
/* 给各个模块加一点边距和背景色,让它们看起来像“胶囊” */
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#tray,
#mode,
#idle_inhibitor {
padding: 0 10px;
margin: 4px 2px;
color: #ffffff;
background-color: rgba(255, 255, 255, 0.1); /* 模块自己的半透明背景 */
border-radius: 10px; /* 圆角 */
}
/* 针对电量低的情况变色 */
#battery.charging, #battery.plugged {
color: #26A65B;
background-color: rgba(38, 166, 91, 0.2);
}
#battery.warning:not(.charging) {
background-color: #ff5d43;
color: black;
}