diff --git a/de/home/.config/eww/modules/home/mcstatus.yuck b/de/home/.config/eww/modules/home/mcstatus.yuck index 0f39eb4..226c629 100644 --- a/de/home/.config/eww/modules/home/mcstatus.yuck +++ b/de/home/.config/eww/modules/home/mcstatus.yuck @@ -19,7 +19,7 @@ (for server in json (box :class 'mc_server' - :style 'background-image: url("${server.status.icon}");' + :style 'background-image: url("/home/${USER}/.cache/mcstatus/${server.status.name}.png");' :orientation 'v' (label :text "${server.address}" diff --git a/de/home/.config/eww/scripts/home/mcstatus b/de/home/.config/eww/scripts/home/mcstatus index 81d6c8d..e69de29 100755 --- a/de/home/.config/eww/scripts/home/mcstatus +++ b/de/home/.config/eww/scripts/home/mcstatus @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -cache_path="${HOME}/.cache/mcstatus" -mcstatus_cache="${cache_path}/mcstatus.json" -mkdir -p "${cache_path}" -server_list=("mc.pogmom.me" "mc.pogmom.me") - -update_cache_json(){ - - for s in "${server_list[@]}";do - mcstatus "${s}" json | jq '. += {"address":"'"${s}"'"}' - done | jq -n '[inputs]' | tee "${mcstatus_cache}" >/dev/null - jq -rc '.[] | "\(.address) \(.status.icon)"' ~/.cache/mcstatus.json | while read name icon;do - base64 --decode "${icon/*base64,/}" | tee "${cache_path}/${name}.png" - done -} - -if [[ ! $(find "${mcstatus_cache}" -cmin -60 -print 2>/dev/null) ]]; then - update_cache_json -fi - -#cat "${mcstatus_cache}"