🔧 (neodymium/home) add caffein button in eww bar + fix separator cursed margins

This commit is contained in:
Laureηt 2023-10-18 18:57:36 +02:00
parent af6ab87de7
commit 3858f23292
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
2 changed files with 22 additions and 11 deletions

View file

@ -35,31 +35,35 @@ $colors: $rosewater, $flamingo, $pink, $mauve, $red, $maroon, $peach, $yellow, $
} }
.seperator { .seperator {
font-size: 19px; font-size: 21px;
margin-top: -1px;
&.up { &.up {
margin-top: -1px;
margin-bottom: -2px;
color: mix(nth($colors, $i), $mantle, 30%); color: mix(nth($colors, $i), $mantle, 30%);
}
&.up.active { &.active {
color: mix(nth($colors, $i), $mantle, 100%); color: mix(nth($colors, $i), $mantle, 100%);
} }
}
&.down { &.down {
margin-left: -12px; margin-left: -12px;
margin-right: -1px; margin-right: -1px;
margin-bottom: -1px;
margin-top: -2px;
@if $i ==10 { @if $i ==10 {
color: transparent; color: transparent;
} }
@else { @else {
color: mix(nth($colors, $i + 1), $mantle, 30%);
&.active { &.active {
color: mix(nth($colors, $i + 1), $mantle, 100%); color: mix(nth($colors, $i + 1), $mantle, 100%);
} }
color: mix(nth($colors, $i + 1), $mantle, 30%);
} }
} }
} }
@ -73,6 +77,13 @@ $colors: $rosewater, $flamingo, $pink, $mauve, $red, $maroon, $peach, $yellow, $
all: unset; all: unset;
} }
checkbutton {
all: unset;
margin: 4 20px;
border-radius: 50%;
background-color: $surface0;
}
.metric scale trough highlight { .metric scale trough highlight {
all: unset; all: unset;
background-color: $blue; background-color: $blue;

View file

@ -6,7 +6,6 @@
:x "0%" :x "0%"
:y "0%" :y "0%"
:width "100%" :width "100%"
:height "22px"
:anchor "top center" :anchor "top center"
) )
:reserve (struts :reserve (struts
@ -31,6 +30,10 @@
:orientation "h" :orientation "h"
:space-evenly false :space-evenly false
:halign "end" :halign "end"
(checkbox
:onchecked "systemctl --user stop swayidle"
:onunchecked "systemctl --user restart swayidle"
)
(metric (metric
:label "󰕾" :label "󰕾"
:value volume :value volume
@ -100,8 +103,6 @@
) )
) )
(defwidget metric [label value onchange] (defwidget metric [label value onchange]
(box (box
:orientation "h" :orientation "h"
@ -121,7 +122,6 @@
) )
) )
(defpoll volume (defpoll volume
:interval "1s" :interval "1s"
"pamixer --get-volume" "pamixer --get-volume"