New backup 2025-03-12 22:30:02
This commit is contained in:
parent
6e1b2ec305
commit
de0a92b7b4
3 changed files with 13 additions and 4 deletions
|
@ -1,6 +1,3 @@
|
|||
;(defpoll inhibit_active :initial false
|
||||
; :interval "60s"
|
||||
; "scripts/bar/inhibit-status")
|
||||
(defvar inhibit_active false)
|
||||
|
||||
(defwidget idleinhibit []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(defpoll weather_status :interval "3600s"
|
||||
'curl wttr.in/Eugene?format=j1')
|
||||
'scripts/widgets/weather')
|
||||
(defwidget weather [json]
|
||||
(box
|
||||
:class "weather"
|
||||
|
|
12
de/home/.config/eww/scripts/widgets/weather
Executable file
12
de/home/.config/eww/scripts/widgets/weather
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
wttr_cache="${HOME}/.cache/wttr.json"
|
||||
|
||||
if [[ ! $(find "${wttr_cache}" -cmin -60 -print 2>/dev/null) ]]; then
|
||||
# echo "File ${wttr_cache} exists and is younger than 60min"
|
||||
#else
|
||||
# echo "File ${wttr_cache} does not exists or is younger than 60min"
|
||||
curl --silent wttr.in/Eugene?format=j1 > "${wttr_cache}"
|
||||
fi
|
||||
|
||||
cat "${wttr_cache}"
|
Loading…
Add table
Reference in a new issue