From 14747a8fec420f938991e6db3a7126becd4df13b Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Sat, 26 Apr 2025 23:00:02 -0700 Subject: [PATCH] New backup 2025-04-26 23:00:02 --- de/home/.config/eww/modules/home.yuck | 3 ++- de/home/.config/eww/modules/home/notes.yuck | 21 +++++++++++++-------- de/home/.config/eww/scripts/home/notes | 3 +++ 3 files changed, 18 insertions(+), 9 deletions(-) create mode 100755 de/home/.config/eww/scripts/home/notes diff --git a/de/home/.config/eww/modules/home.yuck b/de/home/.config/eww/modules/home.yuck index b7d6561..98117f0 100644 --- a/de/home/.config/eww/modules/home.yuck +++ b/de/home/.config/eww/modules/home.yuck @@ -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") diff --git a/de/home/.config/eww/modules/home/notes.yuck b/de/home/.config/eww/modules/home/notes.yuck index c2a06b7..4b2616f 100644 --- a/de/home/.config/eww/modules/home/notes.yuck +++ b/de/home/.config/eww/modules/home/notes.yuck @@ -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}")) )) + )) diff --git a/de/home/.config/eww/scripts/home/notes b/de/home/.config/eww/scripts/home/notes new file mode 100755 index 0000000..1a5bf95 --- /dev/null +++ b/de/home/.config/eww/scripts/home/notes @@ -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