diff --git a/de/home/.config/eww/modules/home/mcstatus.yuck b/de/home/.config/eww/modules/home/mcstatus.yuck index 95f272c..cb43897 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 '[{"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":""},"address":"ip.addre.ss"}]' +(defpoll servers_status :initial '[{"online": true,"kind":"Java","players":{"online":0,"max":0,"list":null},"version":{"name":"version","protocol":0},"motd":"Message of the day","ping":0,"address":"ip.addre.ss"}]' :interval "21600s" 'scripts/home/mcstatus') @@ -45,18 +45,18 @@ ) (label :xalign 0 - :text "${server.status.players.online}/${server.status.players.max} players online" + :text "${server.players.online}/${server.players.max} players online" ) (label :class 'motd' - :text "${replace(server.status.motd,'§.','')}" + :text "${server.motd}" :wrap true :wrap-mode 'word' ; :truncate true ) (label :xalign 0 - :text " ${round(server.status.latency,0)}ms" + :text " ${round(server.ping,0)}ms" ) ) ) diff --git a/de/home/.config/eww/scripts/home/mcstatus b/de/home/.config/eww/scripts/home/mcstatus index d0a458a..cce5f05 100755 --- a/de/home/.config/eww/scripts/home/mcstatus +++ b/de/home/.config/eww/scripts/home/mcstatus @@ -1,25 +1,13 @@ #!/usr/bin/env bash -cache_path="${HOME}/.cache/mcstatus" -mcstatus_cache="${cache_path}/mcstatus.json" +cache_path="${HOME}/.cache/mc-server-info" +mcstatus_cache="${cache_path}/cache.json" mkdir -p "${cache_path}" -#server_list=("mc.pogmom.me" "wedontownit.duckdns.org" "ian.hotn.gay") -server_list=("mc.pogmom.me" "ian.hotn.gay") update_cache_json(){ - - for s in "${server_list[@]}";do - mcstatus "${s}" json | jq '. += {"address":"'"${s}"'","icon_path":"'"${cache_path}/${s}"'.png"}' - done | jq -n '[inputs]' | tee "${mcstatus_cache}" >/dev/null - jq -rc '.[] | "\(.address) \(.status.icon)"' "${mcstatus_cache}" | while read name icon;do -# echo "${name}" -# echo "${icon/*base64,/}" - echo "${icon/*base64,/}" | base64 --decode > "${cache_path}/${name}.png" - done + mc-server-info json | tee "${mcstatus_cache}" >/dev/null } - if [[ ! $(find "${mcstatus_cache}" -cmin -15 -print 2>/dev/null) ]]; then update_cache_json fi - cat "${mcstatus_cache}" diff --git a/de/home/.config/katerc b/de/home/.config/katerc index 807fbc8..1988d0e 100644 --- a/de/home/.config/katerc +++ b/de/home/.config/katerc @@ -174,8 +174,8 @@ SetEditor=false 2 screens: Width=490 2048x1280 screen: Height=1199 2048x1280 screen: Width=1005 -3 screens: Height=999 -3 screens: Width=1896 +3 screens: Height=388 +3 screens: Width=1195 [filetree] editShade=183,220,246 diff --git a/de/home/.librewolf/profiles.ini b/de/home/.librewolf/profiles.ini index 4275bad..0c2c3dc 100644 --- a/de/home/.librewolf/profiles.ini +++ b/de/home/.librewolf/profiles.ini @@ -17,7 +17,7 @@ Name=Penelope IsRelative=1 Path=penelope Default=1 -StoreID=0585997e +StoreID=bf331188 ShowSelector=0 [General] diff --git a/default/home/.gitconfig b/default/home/.gitconfig index df582ce..906291f 100644 --- a/default/home/.gitconfig +++ b/default/home/.gitconfig @@ -6,3 +6,5 @@ [core] editor = /usr/bin/nano +[init] + defaultBranch = main