Skip to content

Commit

Permalink
feat ✨(waybar): waybar battery indicator blink
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Hang <[email protected]>
  • Loading branch information
Banh-Canh committed Oct 15, 2024
1 parent b287539 commit 34c9590
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion homeManagerModules/k9sConfig.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ let
didactiklabsConfYaml = ''
k9s:
cluster: kubernetes
readOnly: true
readOnly: false
namespace:
active: all
lockFavorites: false
Expand Down
34 changes: 34 additions & 0 deletions homeManagerModules/waybarConfig.nix
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ in
escape = true;
};
"battery" = {
interval = 5;
states = {
warning = 30;
critical = 15;
Expand Down Expand Up @@ -340,6 +341,39 @@ in
border-radius: 10px 24px 10px 24px;
padding: 0px 18px;
}
#battery.charging {
background-color: #1DB954;
}
#battery.plugged {
background-color: #1DB954;
}
#battery.warning:not(.charging) {
background-color: #e0ad75;
animation-name: blink;
animation-duration: 2s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#battery.critical:not(.charging) {
background-color: #e06c75;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
#clock {
font-weight: bold;
color: #0D0E15;
Expand Down

0 comments on commit 34c9590

Please sign in to comment.