From eb7b068960cb27a7d78bc3f4b64591cf157a4254 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Thu, 9 Oct 2025 14:00:02 -0700 Subject: [PATCH] New backup 2025-10-09 14:00:02 --- de/home/.config/eww/modules/home.yuck | 2 +- de/home/.config/eww/modules/home/mcstatus.yuck | 4 ++-- de/home/.config/eww/scripts/home/mcstatus | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/de/home/.config/eww/modules/home.yuck b/de/home/.config/eww/modules/home.yuck index 3508f8f..7a2fef7 100644 --- a/de/home/.config/eww/modules/home.yuck +++ b/de/home/.config/eww/modules/home.yuck @@ -1,4 +1,4 @@ -(defvar homewidgets_reveal false) +(defvar homewidgets_reveal true) (defwidget home [] (revealer diff --git a/de/home/.config/eww/modules/home/mcstatus.yuck b/de/home/.config/eww/modules/home/mcstatus.yuck index 7c52d64..67256c2 100644 --- a/de/home/.config/eww/modules/home/mcstatus.yuck +++ b/de/home/.config/eww/modules/home/mcstatus.yuck @@ -1,4 +1,4 @@ -(defpoll servers_status :initial '{"servers":[{"online": true,"kind":"Java","status":{"players":{"online":0,"max":0,"sample":null},"version":{"name":"version","protocol":0},"motd":"Message of the day","latency":0,"icon":""}}]}' +(defpoll servers_status :initial '{"online": true,"kind":"Java","status":{"players":{"online":0,"max":0,"sample":null},"version":{"name":"version","protocol":0},"motd":"Message of the day","latency":0,"icon":""}}' :interval "21600s" 'scripts/home/mcstatus') @@ -17,7 +17,7 @@ (box (for server in json (label - :text "${server.online}" + :text "${server.address}" ) ) ) diff --git a/de/home/.config/eww/scripts/home/mcstatus b/de/home/.config/eww/scripts/home/mcstatus index ba96bdf..bc8c5aa 100755 --- a/de/home/.config/eww/scripts/home/mcstatus +++ b/de/home/.config/eww/scripts/home/mcstatus @@ -6,11 +6,11 @@ server_list=("mc.pogmom.me" "mc.pogmom.me") update_cache_json(){ for s in "${server_list[@]}";do - mcstatus "${s}" json - done | jq -n '.servers |= [inputs]' | tee "${mcstatus_cache}" >/dev/null + mcstatus "${s}" json | jq '. += {"address":"'"${s}"'"}' + done | jq -n '[inputs]' | tee "${mcstatus_cache}" >/dev/null } -if [[ ! $(find "${mcstatus_cache}" -cmin -5 -print 2>/dev/null) ]]; then +if [[ ! $(find "${mcstatus_cache}" -cmin -60 -print 2>/dev/null) ]]; then update_cache_json fi