Component DateTimeWidg for panel date and time
This commit is contained in:
parent
bbe036d390
commit
9e6a9880e5
12
nbcl/components/datetime_widg.nbcl
Normal file
12
nbcl/components/datetime_widg.nbcl
Normal file
@ -0,0 +1,12 @@
|
||||
# Date-time widget
|
||||
|
||||
component DateTimeWidg (widgname, widgtextvar) {
|
||||
widget_name = "${widgname}"
|
||||
|
||||
Label {
|
||||
class = "textwidg datetimewidg " + widgname
|
||||
text = global(widgtextvar)
|
||||
halign = "end"
|
||||
height = config.panel_height
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
import "nbcl/components/datetime_widg.nbcl" as datetime_widg { * }
|
||||
|
||||
component EwwiiPanel () {
|
||||
Box {
|
||||
orinetation = "horizontal"
|
||||
@ -6,19 +8,13 @@ component EwwiiPanel () {
|
||||
height = config.panel_height
|
||||
width = config.panel_width
|
||||
|
||||
Label {
|
||||
widget_name = "datewidg"
|
||||
class = "textwidg datewidg"
|
||||
text = global("date_ddM")
|
||||
halign = "end"
|
||||
height = config.panel_height
|
||||
}
|
||||
Label {
|
||||
widget_name = "clockwidg"
|
||||
class = "textwidg clockwidg"
|
||||
text = global("time_hhmm")
|
||||
halign = "end"
|
||||
height = config.panel_height
|
||||
}
|
||||
DateTimeWidg "paneldatewidg" {
|
||||
widgname = "paneldatewidg"
|
||||
widgtextvar = "date_ddM"
|
||||
}
|
||||
DateTimeWidg "paneltimewidg" {
|
||||
widgname = "paneltimewidg"
|
||||
widgtextvar = "time_hhmm"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,7 @@ import "nbcl/panel/panel_component.nbcl" as panel_component { * }
|
||||
Window "ewwii_panel" {
|
||||
monitor = 0
|
||||
windowtype = "dock"
|
||||
wm_ignore = false
|
||||
wm_ignore = true
|
||||
stacking = "fg"
|
||||
geometry = {
|
||||
anchor = "top center"
|
||||
|
||||
@ -6,6 +6,6 @@ Poll "time_hhmm" {
|
||||
|
||||
Poll "date_ddM" {
|
||||
initial = "01 Jan"
|
||||
interval = "450ms"
|
||||
interval = "5s"
|
||||
cmd = "date +'%d %b'"
|
||||
}
|
||||
@ -5,6 +5,6 @@
|
||||
background-color: rgba(72, 150, 98, 0.733);
|
||||
padding: 0 0.2em;
|
||||
font-size: 14px;
|
||||
font-family: "JetBrainsMono Nerd Font,JetBrainsMono NF";
|
||||
font-family: "Fragment Mono";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user