From 68029c245778f066aff0aad1977b23f6d6f6c561 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Fri, 10 Apr 2026 12:13:51 +0200 Subject: Add schrottkatze rice: Eww status bars Top bar (CPU, RAM, battery, systray, time, trans flag), bottom bar (workspaces, traveldings transit, Mullvad VPN, lesbian flag). Gruvbox CSS styling, Nushell scripts for battery and ICE train speed. --- .../schrottkatze/eww/configDir/scripts/iceTacho.nu | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 home/rices/schrottkatze/eww/configDir/scripts/iceTacho.nu (limited to 'home/rices/schrottkatze/eww/configDir/scripts/iceTacho.nu') diff --git a/home/rices/schrottkatze/eww/configDir/scripts/iceTacho.nu b/home/rices/schrottkatze/eww/configDir/scripts/iceTacho.nu new file mode 100755 index 0000000..5225dc2 --- /dev/null +++ b/home/rices/schrottkatze/eww/configDir/scripts/iceTacho.nu @@ -0,0 +1,38 @@ +#!/usr/bin/env nu + +const TABLE = { + 401: 280 + 402: 280 + 403: 330 + 406: 330 + 407: 320 + 408: 320 + 411: 230 + 415: 230 + 412: 265 + 605: 200 +}; + +def main [ ] { + loop { + if ((iw dev wlp4s0 link | lines | filter {|it| $it =~ "WIFIonICE" } | length) == 1) { + let iceData = http get https://iceportal.de/api1/rs/status; + let tzn = $iceData.tzn; + let br = $iceData.series; + let speed = $iceData.speed; + let speedfrac = $speed / ($TABLE | get $br); + + print ({ + tzn: $tzn, + br: $br, + speed: $speed, + frac: $speedfrac + } | to json -r); + + sleep 2sec; + } else { + print "null"; + sleep 5sec; + } + } +} -- cgit v1.2.3