New backup 2025-07-05 16:30:01

This commit is contained in:
Penelope Gwen 2025-07-05 16:30:01 -07:00
parent 91a1daaf00
commit 012daa4ba0
6 changed files with 73 additions and 0 deletions

View file

@ -8,10 +8,12 @@
(weather :json weather_status)
(shortcuts)
(notes :json {jq(notes_list,'.notes')})
(softwareupdates :json {software_list})
(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/softwareupdates.yuck")
(include "modules/home/reminders.yuck")

View file

@ -2,6 +2,7 @@
'scripts/home/notes')
(defwidget notes [json]
(box
:visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 9}
:class "notes"
:orientation "v"
:halign "baseline"

View file

@ -0,0 +1,25 @@
(defpoll software_list :interval "43200s"
'software-release-monitor')
(defwidget softwareupdates [json]
(box
:visible {(jq(workspacesArray, '.[]\|select(.focused==true).num') <= 19) && (jq(workspacesArray, '.[]\|select(.focused==true).num') >= 10)}
: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")}"))))
))

View file

@ -0,0 +1,10 @@
[
{
"packageName":"eww",
"upstreamURL":"https://github.com/elkowar/eww"
},
{
"packageName":"swayfx",
"upstreamURL":"https://github.com/WillPower3309/swayfx"
}
]

View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
source ${HOME}/.secrets
function get_package_info(){
packages_array=()
while read i; do
echo "${i}"
package_name=$(jq -r '.packageName' <<<"${i}")
upstream_url=$(jq -r '.upstreamURL' <<<"${i}")
package_version=$(dpkg-query -W -f='${Version}' "${package_name}")
upstream_version=$(lastversion "${upstream_url}")
if [[ "${package_version}" == *"${upstream_version}"* ]]; then
up_to_date='true'
else
up_to_date='false'
fi
package_json=$( jq -n --arg name "${package_name}" --arg pkgver "${package_version}" --arg upstreamver "${upstream_version}" --arg uptodate "${up_to_date}" '{package_name: $name, package_version: $pkgver, upstream_version: $upstreamver, up_to_date: $uptodate}' )
packages_array+=("${package_json}")
done < <(jq -c '.[]' "${HOME}/.config/software-release-monitor/config.json")
packages_json=$(printf '%s\n' "${packages_array[@]}" | jq -s .)
echo "${packages_json}"
#echo "${package_array_item}"
#echo "${package_array[@]}"
}
get_package_info
#printf '%s\n' "${package_array[@]}" | jq -s .
#dpkg-query -W -f='${Version}' swayfx

View file

@ -45,3 +45,5 @@
.config/katerc
.local/share/applications/SuperColliderIDE.desktop
.local/bin/noise
.local/bin/software-release-monitor
.config/software-release-monitor/config.json