dotfiles/de/home/.config/eww/modules/home/notes.yuck
2025-07-05 16:30:01 -07:00

25 lines
719 B
Text

(defpoll notes_list :interval "3600s"
'scripts/home/notes')
(defwidget notes [json]
(box
:visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 9}
:class "notes"
:orientation "v"
:halign "baseline"
:width 300
:height 150
:space-evenly true
(for note in json
(button :onclick "kate -n '${note.filepath}'"
(box
:orientation "v"
(label
:xalign 0
:wrap false
:truncate true
:text "${replace(note.filepath,"${get_env("HOME")}/Documents/Notes/",'')}")
(label
:xalign 0.5
:class "timestamp"
:text "${formattime("${note.date}","%F %R")}"))))
))