From ac251e6d90ade52fb8e6bba18aa61dc9b3e064d9 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 27 Mar 2025 01:57:44 +0100 Subject: [PATCH] start mullvad thing --- .../eww/configDir/bottomBar/bottomBar.yuck | 22 ++++++++++++++----- .../home/eww/configDir/eww.css | 16 ++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/modules/desktop-environment/home/eww/configDir/bottomBar/bottomBar.yuck b/modules/desktop-environment/home/eww/configDir/bottomBar/bottomBar.yuck index fd0bcbe..d955d31 100644 --- a/modules/desktop-environment/home/eww/configDir/bottomBar/bottomBar.yuck +++ b/modules/desktop-environment/home/eww/configDir/bottomBar/bottomBar.yuck @@ -29,7 +29,7 @@ (box :halign "end" ; (label :text "${iceData.speed}km/h") - (iceTacho) + (mullvadThing) ) ) ) @@ -47,14 +47,26 @@ ) ) +(deflisten mullvad + :initial "{\"state\":\"init\"}" + `mullvad status -j listen` +) + +(defwidget mullvadThing [] + (box + :class "container" + (button + :height 16 + :width 16 + :class "mullvad-state-${mullvad.state}" + ) + ) +) + (defwidget iceTacho [] (box :class "iceTacho" :tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})" - (circular-progress - :value { iceTachoData.frac * 60 + 20 } - :thickness 3 - ) (label :text "${iceTachoData.speed} km/h") ) ) diff --git a/modules/desktop-environment/home/eww/configDir/eww.css b/modules/desktop-environment/home/eww/configDir/eww.css index 81a6604..2d36825 100644 --- a/modules/desktop-environment/home/eww/configDir/eww.css +++ b/modules/desktop-environment/home/eww/configDir/eww.css @@ -33,4 +33,20 @@ label { .traveldingsWindow { border-radius: 15px; +} + +.mullvad-state-connected { + background-color: #98971a +} + +.mullvad-state-connecting { + background-color: #d79921 +} + +.mullvad-state-disconnected { + background-color: #cc241d +} + +.mullvad-state-init { + background-color: #458588 } \ No newline at end of file