Skip to content

Commit e8f199f

Browse files
committed
Change Waybar css
1 parent 2fd2ec3 commit e8f199f

File tree

1 file changed

+145
-45
lines changed
  • archlinux/install/hyprland/config/waybar

1 file changed

+145
-45
lines changed
Lines changed: 145 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
1+
@define-color base-bg @background;
2+
@define-color accent @foreground;
13
@import "../theme/waybar.css";
24

5+
@define-color hover-bg alpha(@background, 0.7);
6+
@define-color warning #e5c07b;
7+
@define-color critical #e06c75;
8+
@define-color inactive #6a7a71;
9+
310
* {
4-
/* background-color: @background; */
511
color: @foreground;
6-
712
border: none;
813
border-radius: 0;
9-
min-height: 0;
1014
font-family: 'CaskaydiaMono Nerd Font';
11-
font-weight: bold;
1215
font-size: 12px;
16+
font-weight: bold;
17+
min-height: 0;
1318
}
1419

1520
window#waybar {
1621
background: transparent;
1722
margin-top: 10px;
1823
}
1924

20-
window#waybar.empty #window {
21-
background: transparent;
22-
padding: 0;
23-
margin-left: 0;
24-
}
25-
26-
mpris#waybar.empty #mpris {
27-
background: transparent;
28-
padding: 0;
29-
margin-right: 0;
30-
}
31-
32-
.modules-left {
33-
margin-left: 8px;
34-
}
35-
25+
.modules-left,
3626
.modules-right {
27+
margin-left: 8px;
28+
/* Original margin + 2px */
3729
margin-right: 8px;
30+
/* Original margin + 2px */
3831
}
3932

4033
#workspaces button {
@@ -48,55 +41,162 @@ mpris#waybar.empty #mpris {
4841
opacity: 0.5;
4942
}
5043

51-
#custom-weather,
52-
#memory,
53-
#custom-update,
44+
/* --- General Module Styles --- */
5445
#backlight,
5546
#window,
5647
#mpris,
57-
#tray,
5848
#cpu,
59-
#battery,
60-
#network,
49+
#memory,
50+
#temperature,
51+
#custom-update,
52+
#tray,
6153
#bluetooth,
54+
#network,
6255
#pulseaudio,
63-
#clock,
56+
#battery,
6457
#custom-omarchy,
65-
#workspaces,
66-
#tray-expander {
58+
#clock {
6759
background-color: @background;
6860
color: @foreground;
69-
border-radius: 10px;
7061
padding: 0 10px;
71-
margin: 5px 2;
62+
margin: 5px 0;
63+
transition: background-color 0.3s ease;
7264
}
7365

74-
#network.icon {
75-
padding-right: 14px;
66+
#cpu:hover,
67+
#memory:hover,
68+
#temperature:hover,
69+
#custom-update:hover,
70+
#bluetooth:hover,
71+
#network:hover,
72+
#pulseaudio:hover,
73+
#battery:hover,
74+
#custom-omarchy:hover {
75+
background-color: @hover-bg;
7676
}
7777

78-
#memory,
79-
#custom-weather {
80-
margin-right: -10px;
78+
/* --- Specific Module Styles & Overrides --- */
79+
#window {
80+
margin: 5px 0;
81+
padding: 0 10px;
82+
border-radius: 16px;
83+
margin-left: 5px;
8184
}
8285

83-
#pulseaudio {
84-
padding-right: 15px;
86+
#mpris {
87+
margin: 5px 0;
88+
padding: 0 10px;
89+
border-radius: 16px;
90+
margin-right: 5px;
8591
}
8692

87-
#custom-omarchy {
88-
padding-left: 10px;
93+
window#waybar.empty #window {
94+
background: transparent;
95+
padding: 0;
96+
margin-left: 0;
97+
}
98+
99+
mpris#waybar.empty #mpris {
100+
background: transparent;
101+
padding: 0;
102+
margin-right: 0;
89103
}
90104

91105
#custom-update {
92-
padding-left: 7px;
106+
border-radius: 16px;
107+
margin-left: 10px;
108+
padding-right: 12px;
93109
}
94110

95-
#custom-expand-icon {
96-
margin-right: -4px;
111+
#tray-expander {
112+
background: @background;
113+
margin: 5px 0;
114+
border-top-left-radius: 16px;
115+
border-bottom-left-radius: 16px;
116+
padding-left: 10px;
97117
}
98118

99-
tooltip {
119+
#battery {
120+
margin: 5px 0;
121+
border-top-right-radius: 16px;
122+
border-bottom-right-radius: 16px;
123+
padding-left: 10px;
124+
}
125+
126+
#tray {
127+
padding-left: 10px;
128+
}
129+
130+
#custom-omarchy {
131+
border-radius: 16px;
132+
margin-right: 5px;
133+
}
134+
135+
#clock {
136+
border-radius: 16px;
137+
padding-right: 10px;
138+
}
139+
140+
#workspaces {
141+
background-color: @background;
142+
color: @foreground;
143+
margin: 5px 0;
144+
transition: background-color 0.3s ease;
145+
border-radius: 16px;
146+
padding: 0 3px;
147+
}
148+
149+
#workspaces button {
150+
background: transparent;
151+
padding: 0 6px;
100152
border-radius: 10px;
101-
padding: 2px;
153+
}
154+
155+
#workspaces button:hover {
156+
background-color: alpha(#B9F6CA, 0.1);
157+
}
158+
159+
/* --- Module States --- */
160+
#network.disconnected,
161+
#bluetooth.disabled,
162+
#pulseaudio.muted {
163+
color: @critical;
164+
}
165+
166+
#battery.warning:not(.charging) {
167+
color: @warning;
168+
}
169+
170+
#battery.charging,
171+
#battery.plugged {
172+
color: @accent;
173+
}
174+
175+
@keyframes blink {
176+
to {
177+
background-color: @critical;
178+
color: @base-bg;
179+
}
180+
}
181+
182+
#battery.critical:not(.charging) {
183+
background-color: @critical;
184+
color: @base-bg;
185+
animation-name: blink;
186+
animation-duration: 0.5s;
187+
animation-timing-function: linear;
188+
animation-iteration-count: infinite;
189+
animation-direction: alternate;
190+
}
191+
192+
/* --- Tooltip --- */
193+
tooltip {
194+
background-color: @background;
195+
border-radius: 16px;
196+
padding: 8px 12px;
197+
opacity: 0.9;
198+
}
199+
200+
tooltip label {
201+
color: @foreground;
102202
}

0 commit comments

Comments
 (0)