diff --git a/ewwii.nbcl b/ewwii.nbcl index c6fc8ee..0007127 100644 --- a/ewwii.nbcl +++ b/ewwii.nbcl @@ -1,3 +1,3 @@ import "nbcl/config/config.nbcl" as config -import "nbcl/vars/vars.nbcl" as vars +import "nbcl/vars/vars.nbcl" as vars { * } import "nbcl/panel/panel_window.nbcl" as ewwii_panel \ No newline at end of file diff --git a/nbcl/panel/panel_component.nbcl b/nbcl/panel/panel_component.nbcl index 710a1c4..aa55189 100644 --- a/nbcl/panel/panel_component.nbcl +++ b/nbcl/panel/panel_component.nbcl @@ -8,7 +8,8 @@ component EwwiiPanel () { class = "ewwii_panel" height = config.panel_height width = config.panel_width - space_evenly = true + space_evenly = false + spacing = 0 panel_section.panel_section("left", "start") panel_section.panel_section("center", "center") diff --git a/nbcl/panel/panel_section_center.nbcl b/nbcl/panel/panel_section_center.nbcl index 0ea0489..c151425 100644 --- a/nbcl/panel/panel_section_center.nbcl +++ b/nbcl/panel/panel_section_center.nbcl @@ -1,12 +1,17 @@ # Middle part of the top bar +import core.json fn panel_center() { Box { space_evenly = false + spacing = 0 halign = "center" Label { - text = "center" + height = config.panel_height + text = global("xdistate").mutate(|val|{ + json.parse(val).window_title + }) } } } \ No newline at end of file diff --git a/nbcl/panel/panel_section_left.nbcl b/nbcl/panel/panel_section_left.nbcl index c71f1c1..c06a9f4 100644 --- a/nbcl/panel/panel_section_left.nbcl +++ b/nbcl/panel/panel_section_left.nbcl @@ -3,10 +3,12 @@ fn panel_left() { Box { space_evenly = false + spacing = 0 halign = "start" + height = config.panel_height Label { - text = "left" + text = "left_side" } } } \ No newline at end of file diff --git a/nbcl/panel/panel_section_right.nbcl b/nbcl/panel/panel_section_right.nbcl index 451c690..36e6bcf 100644 --- a/nbcl/panel/panel_section_right.nbcl +++ b/nbcl/panel/panel_section_right.nbcl @@ -3,6 +3,7 @@ fn panel_right() { Box { space_evenly = false + spacing = 0 halign = "end" # Display current date diff --git a/nbcl/vars/vars.nbcl b/nbcl/vars/vars.nbcl index 8e95b11..d73fc03 100644 --- a/nbcl/vars/vars.nbcl +++ b/nbcl/vars/vars.nbcl @@ -1,3 +1,5 @@ +import "nbcl/vars/xdi.nbcl" as xdi + Poll "time_hhmm" { initial = "00:00" interval = "450ms" diff --git a/nbcl/vars/xdi.nbcl b/nbcl/vars/xdi.nbcl new file mode 100644 index 0000000..91dc2e2 --- /dev/null +++ b/nbcl/vars/xdi.nbcl @@ -0,0 +1,10 @@ +import core.json + + +Listen "xdistate" { + initial = "{}" + cmd = "leftwm-state" +} + + +#let wmstate = \ No newline at end of file