Skip to content

Commit 98ae235

Browse files
committed
waybar: urgent/critical animations
1 parent 874a6b3 commit 98ae235

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

waybar/.config/waybar/style.css

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
@define-color urgent @pink;
1818
@define-color critical @red;
1919

20+
@keyframes urgent-animation {
21+
50% {
22+
background: @urgent;
23+
}
24+
}
25+
26+
@keyframes critical-animation {
27+
50% {
28+
background: @critical;
29+
}
30+
}
31+
2032
* {
2133
border: none;
2234
border-radius: 0;
@@ -58,7 +70,7 @@ tooltip label {
5870
}
5971

6072
#workspaces button.urgent {
61-
background: @urgent;
73+
animation: urgent-animation 1s steps(3) infinite;
6274
}
6375

6476
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
@@ -127,6 +139,12 @@ tooltip label {
127139
background: @light-blue;
128140
}
129141

142+
#custom-right-spacer-information {
143+
color: @blue;
144+
padding: 0;
145+
font-size: 20px;
146+
}
147+
130148
#tray {
131149
padding: 0 4px;
132150
}
@@ -141,7 +159,7 @@ tooltip label {
141159

142160
#tray>.needs-attention {
143161
-gtk-icon-effect: highlight;
144-
background-color: @urgent;
162+
animation: urgent-animation 0.5s steps(10) infinite;
145163
}
146164

147165
#privacy {
@@ -160,6 +178,12 @@ tooltip label {
160178
background: @purple-alt;
161179
}
162180

181+
#custom-yubikey {
182+
color: @yellow;
183+
font-size: 20px;
184+
animation: urgent-animation 0.5s steps(10) infinite;
185+
}
186+
163187
#custom-weather,
164188
#custom-crypto {
165189
background: @blue;
@@ -169,12 +193,6 @@ tooltip label {
169193
font-family: cryptocoins, monospace;
170194
}
171195

172-
#custom-right-spacer-information {
173-
color: @blue;
174-
padding: 0;
175-
font-size: 20px;
176-
}
177-
178196
#pulseaudio,
179197
#memory,
180198
#cpu,
@@ -202,13 +220,8 @@ tooltip label {
202220

203221
#temperature.critical,
204222
#temperature.gpu.critical {
205-
background: @critical;
206223
color: @blue;
207-
animation-name: blink;
208-
animation-duration: 0.5s;
209-
animation-timing-function: linear;
210-
animation-iteration-count: infinite;
211-
animation-direction: alternate;
224+
animation: critical-animation 0.5s steps(10) infinite;
212225
}
213226

214227
#disk {
@@ -254,11 +267,6 @@ tooltip label {
254267
}
255268

256269
#battery.critical:not(.charging) {
257-
background: @critical;
258270
color: @blue;
259-
animation-name: blink;
260-
animation-duration: 0.5s;
261-
animation-timing-function: linear;
262-
animation-iteration-count: infinite;
263-
animation-direction: alternate;
271+
animation: critical-animation 0.5s steps(10) infinite;
264272
}

0 commit comments

Comments
 (0)