38 lines
1.3 KiB
Text
38 lines
1.3 KiB
Text
(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 software in json
|
|
(button :onclick "notify-send '${software.package_name}' 'upstream: ${software.upstream_version}\npackage: ${software.package_version}'"
|
|
(box
|
|
:orientation "h"
|
|
(label
|
|
;; :xalign 0
|
|
:halign "fill"
|
|
:hexpand true
|
|
:wrap false
|
|
:truncate true
|
|
:text "${software.package_name}")
|
|
(box
|
|
:orientation "v"
|
|
:halign "end"
|
|
(label
|
|
:valign "end"
|
|
:class "timestamp"
|
|
:text " ${software.upstream_version}")
|
|
(label
|
|
:valign "start"
|
|
:class "timestamp"
|
|
:text " ${software.package_version}"))
|
|
(label
|
|
:halign "end"
|
|
:style {(software.up_to_date == "true" ) ? "color: green;" : "color: red;"}
|
|
:text {(software.up_to_date == "true" ) ? "" : ""}))))
|
|
))
|