Component DateTimeWidg for panel date and time

This commit is contained in:
Candifloss 2026-09-03 14:02:24 +05:30
parent bbe036d390
commit 9e6a9880e5
5 changed files with 25 additions and 17 deletions

View 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
}
}

View File

@ -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"
}
}
}

View File

@ -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"

View File

@ -6,6 +6,6 @@ Poll "time_hhmm" {
Poll "date_ddM" {
initial = "01 Jan"
interval = "450ms"
interval = "5s"
cmd = "date +'%d %b'"
}

View File

@ -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";
}
}