first commit
This commit is contained in:
66
waybar/style.css
Normal file
66
waybar/style.css
Normal file
@@ -0,0 +1,66 @@
|
||||
* {
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user