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