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/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 import "nbcl/panel/panel_window.nbcl" as ewwii_panel

View File

@ -8,7 +8,8 @@ component EwwiiPanel () {
class = "ewwii_panel" class = "ewwii_panel"
height = config.panel_height height = config.panel_height
width = config.panel_width width = config.panel_width
space_evenly = true space_evenly = false
spacing = 0
panel_section.panel_section("left", "start") panel_section.panel_section("left", "start")
panel_section.panel_section("center", "center") panel_section.panel_section("center", "center")

View File

@ -1,12 +1,17 @@
# Middle part of the top bar # Middle part of the top bar
import core.json
fn panel_center() { fn panel_center() {
Box { Box {
space_evenly = false space_evenly = false
spacing = 0
halign = "center" halign = "center"
Label { 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() { fn panel_left() {
Box { Box {
space_evenly = false space_evenly = false
spacing = 0
halign = "start" halign = "start"
height = config.panel_height
Label { Label {
text = "left" text = "left_side"
} }
} }
} }

View File

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

View File

@ -1,3 +1,5 @@
import "nbcl/vars/xdi.nbcl" as xdi
Poll "time_hhmm" { Poll "time_hhmm" {
initial = "00:00" initial = "00:00"
interval = "450ms" 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 =