Introduce variables for dynamic content
- Date - Time - No CSS yet - No `Listen` variables yet
This commit is contained in:
parent
8fc0a49443
commit
daa0e1637c
@ -1,2 +1,3 @@
|
|||||||
import "nbcl/config/config.nbcl" as config
|
import "nbcl/config/config.nbcl" as config
|
||||||
|
import "nbcl/vars/vars.nbcl" as vars
|
||||||
import "nbcl/panel/panel_window.nbcl" as ewwii_panel
|
import "nbcl/panel/panel_window.nbcl" as ewwii_panel
|
||||||
@ -7,8 +7,16 @@ component EwwiiPanel () {
|
|||||||
width = config.panel_width
|
width = config.panel_width
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
widget_name = "panel_comp_sample_text"
|
widget_name = "clockwidg"
|
||||||
text = "Plain Panel"
|
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
11
nbcl/vars/vars.nbcl
Normal 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"
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user