New backup 2025-04-26 23:00:02

This commit is contained in:
Penelope Gwen 2025-04-26 23:00:02 -07:00
parent 1c9f8f9b2a
commit 14747a8fec
3 changed files with 18 additions and 9 deletions

View file

@ -6,7 +6,8 @@
:space-evenly false
(rat)
(weather :json weather_status)
(shortcuts)))
(shortcuts)
(notes :json {jq(notes_list,'.notes')})))
(include "modules/home/rat.yuck")
(include "modules/home/weather.yuck")

View file

@ -1,14 +1,19 @@
(defpoll weather_status :initial "{'condition':'loading...','current_temp':'--','feels_temp':'--','min_temp':'--','max_temp':'--','humidity':'--','icon':' ','updated':'loading...'}"
:interval "3600s"
'scripts/home/hass_weather')
(defwidget weather [json]
(defpoll notes_list :interval "60s"
'scripts/home/notes')
(defwidget notes [json] user
(box
:class "weather"
:orientation "v"
:width 300
:height 125
:space-evenly true
"${json.condition} ${json.icon}"
"${json.current_temp}°F  / ${json.humidity}% "
" ${json.max_temp}°F  ${json.min_temp}°F"
" ${json.updated}"))
; "${json.condition} ${json.icon}"
; "${json.current_temp}°F  / ${json.humidity}% "
; " ${json.max_temp}°F  ${json.min_temp}°F"
; " ${json.updated}"))
(for note in json
"${replace(note.filepath,'test','')}")
; (button :onclick {(device.connected == "yes") ? 'bluetoothctl disconnect "${device.address}"' : 'bluetoothctl connect "${device.address}"'}
; :class {(device.connected == "yes") ? "active" : ""}
; "${device.icon}")) ))
))

View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
find ~/Documents/Notes/ -type f -exec stat --printf '%y\t%n\n' {} + | sort -rk 1 | head -n 5 | column -ts $'\t' -n 'Notes' -N date,filepath -J