From 795b878b980b1053c5da91705aa76641bbb572de Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Sun, 27 Apr 2025 00:15:02 -0700 Subject: [PATCH] New backup 2025-04-27 00:15:02 --- de/home/.config/eww/eww.scss | 17 +++++++++++------ de/home/.config/eww/modules/home.yuck | 4 +++- de/home/.config/eww/modules/home/notes.yuck | 10 +--------- .../.config/eww/modules/home/reminders.yuck | 19 +++++++++++++++++++ de/home/.config/eww/scripts/home/notes | 2 +- de/home/.config/eww/scripts/home/reminders | 3 +++ de/home/.config/katerc | 4 ++-- 7 files changed, 40 insertions(+), 19 deletions(-) create mode 100644 de/home/.config/eww/modules/home/reminders.yuck create mode 100755 de/home/.config/eww/scripts/home/reminders diff --git a/de/home/.config/eww/eww.scss b/de/home/.config/eww/eww.scss index 33a7591..9670d42 100644 --- a/de/home/.config/eww/eww.scss +++ b/de/home/.config/eww/eww.scss @@ -172,17 +172,22 @@ tooltip{ .notes { background-color: rgba($color0,0.5); padding: 10px; - box { + button { background-color: rgba($color9,0.5); border-radius: 6px; padding: 4px 8px; margin: 4px; - .timestamp { - font-size: 0.8em; - margin-top: 6px; - color: rgba($color7,1) + box { + .timestamp { + font-size: 0.8em; + margin-top: 6px; + color: rgba($color7,1) + } } } + button:hover { + background-color: rgba($color9,0.65); + } } .shortcuts { background-color: rgba($color0,0.5); @@ -194,7 +199,7 @@ tooltip{ font-size: 1.2em; } button:hover { - background-color: rgba($color1,0.5) + background-color: rgba($color9,0.65) } } } diff --git a/de/home/.config/eww/modules/home.yuck b/de/home/.config/eww/modules/home.yuck index 98117f0..8204f4a 100644 --- a/de/home/.config/eww/modules/home.yuck +++ b/de/home/.config/eww/modules/home.yuck @@ -7,9 +7,11 @@ (rat) (weather :json weather_status) (shortcuts) - (notes :json {jq(notes_list,'.notes')}))) + (notes :json {jq(notes_list,'.notes')}) + (reminders :json {jq(reminders_list,'.reminders')}))) (include "modules/home/rat.yuck") (include "modules/home/weather.yuck") (include "modules/home/shortcuts.yuck") (include "modules/home/notes.yuck") +(include "modules/home/reminders.yuck") diff --git a/de/home/.config/eww/modules/home/notes.yuck b/de/home/.config/eww/modules/home/notes.yuck index 47c1a7c..45f4376 100644 --- a/de/home/.config/eww/modules/home/notes.yuck +++ b/de/home/.config/eww/modules/home/notes.yuck @@ -1,4 +1,4 @@ -(defpoll notes_list :interval "60s" +(defpoll notes_list :interval "3600s" 'scripts/home/notes') (defwidget notes [json] (box @@ -8,11 +8,6 @@ :width 300 :height 150 :space-evenly true -; "${json.condition} ${json.icon}" -; "${json.current_temp}°F  / ${json.humidity}% " -; " ${json.max_temp}°F  ${json.min_temp}°F" -; " ${json.updated}")) - "Notes" (for note in json (button :onclick "kate -n '${note.filepath}'" (box @@ -25,7 +20,4 @@ :xalign 0.5 :class "timestamp" :text "${formattime("${note.date}","%F %R")}")))) -; (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/modules/home/reminders.yuck b/de/home/.config/eww/modules/home/reminders.yuck new file mode 100644 index 0000000..952a55b --- /dev/null +++ b/de/home/.config/eww/modules/home/reminders.yuck @@ -0,0 +1,19 @@ +(defpoll reminders_list :interval "3600s" + 'scripts/home/reminders') +(defwidget reminders [json] + (box + :class "notes" + :orientation "v" + :halign "baseline" + :width 300 + :height 150 + :space-evenly true + (for reminder in json + (button :onclick "open '${reminder.url}'" + (box + :orientation "v" + (label + :xalign 0 + :wrap false + :text "${reminder.name}")))) + )) diff --git a/de/home/.config/eww/scripts/home/notes b/de/home/.config/eww/scripts/home/notes index 4bbc440..5b370dd 100755 --- a/de/home/.config/eww/scripts/home/notes +++ b/de/home/.config/eww/scripts/home/notes @@ -1,3 +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 +find ~/Documents/Notes/ -type f -exec stat --printf '%Y\t%n\n' {} + | sort -rk 1 | head -n 3 | column -ts $'\t' -n 'Notes' -N date,filepath -J diff --git a/de/home/.config/eww/scripts/home/reminders b/de/home/.config/eww/scripts/home/reminders new file mode 100755 index 0000000..0e44be0 --- /dev/null +++ b/de/home/.config/eww/scripts/home/reminders @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +jq '.' ~/Documents/Reminders/urls.json diff --git a/de/home/.config/katerc b/de/home/.config/katerc index a5f0b74..6508e1d 100644 --- a/de/home/.config/katerc +++ b/de/home/.config/katerc @@ -172,8 +172,8 @@ SetEditor=false 2 screens: Width=727 2048x1280 screen: Height=589 2048x1280 screen: Width=999 -3 screens: Height=298 -3 screens: Width=604 +3 screens: Height=700 +3 screens: Width=419 [filetree] editShade=183,220,246