leftwm-state variable

This commit is contained in:
Candifloss 2026-09-07 16:50:41 +05:30
parent 1cfab06176
commit 79561e43d3
7 changed files with 25 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -3,6 +3,7 @@
fn panel_right() {
Box {
space_evenly = false
spacing = 0
halign = "end"
# Display current date

View File

@ -1,3 +1,5 @@
import "nbcl/vars/xdi.nbcl" as xdi
Poll "time_hhmm" {
initial = "00:00"
interval = "450ms"

10
nbcl/vars/xdi.nbcl Normal file
View File

@ -0,0 +1,10 @@
import core.json
Listen "xdistate" {
initial = "{}"
cmd = "leftwm-state"
}
#let wmstate =