Introduce variables for dynamic content

- Date
- Time
- No CSS yet
- No `Listen` variables yet
This commit is contained in:
Candifloss 2026-08-26 07:52:02 +05:30
parent 8fc0a49443
commit daa0e1637c
3 changed files with 22 additions and 2 deletions

View File

@ -1,2 +1,3 @@
import "nbcl/config/config.nbcl" as config
import "nbcl/vars/vars.nbcl" as vars
import "nbcl/panel/panel_window.nbcl" as ewwii_panel

View File

@ -7,8 +7,16 @@ component EwwiiPanel () {
width = config.panel_width
Label {
widget_name = "panel_comp_sample_text"
text = "Plain Panel"
widget_name = "clockwidg"
class = "clockwidg"
text = global("time_hhmm")
halign = "end"
}
Label {
widget_name = "datewidg"
class = "datewidg"
text = global("date_ddM")
halign = "end"
}
}
}

11
nbcl/vars/vars.nbcl Normal file
View File

@ -0,0 +1,11 @@
Poll "time_hhmm" {
initial = "00:00"
interval = "450ms"
cmd = "date +%H:%M"
}
Poll "date_ddM" {
initial = "01 Jan"
interval = "450ms"
cmd = "date +%m:%d"
}