From bc3a9611faea9c154bf128106c76b586878ce008 Mon Sep 17 00:00:00 2001 From: candifloss Date: Tue, 8 Sep 2026 15:10:38 +0530 Subject: [PATCH] Use `xdi` for X11 WM info - Switch from `leftwm-state` to `xdi` - More generic, no more specific to `leftwm` --- nbcl/components/datetime_widg.nbcl | 12 ------------ nbcl/panel/panel_section_center.nbcl | 2 +- nbcl/vars/xdi.nbcl | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/nbcl/components/datetime_widg.nbcl b/nbcl/components/datetime_widg.nbcl index d79d97a..86448ca 100644 --- a/nbcl/components/datetime_widg.nbcl +++ b/nbcl/components/datetime_widg.nbcl @@ -10,15 +10,3 @@ component DateTimeWidg (widgname, widgtextvar) { height = config.panel_height } } - -#- -# Example usage - DateTimeWidg "paneldatewidg" { - widgname = "paneldatewidg" - widgtextvar = "date_ddM" - } - DateTimeWidg "paneltimewidg" { - widgname = "paneltimewidg" - widgtextvar = "time_hhmm" - } --# \ No newline at end of file diff --git a/nbcl/panel/panel_section_center.nbcl b/nbcl/panel/panel_section_center.nbcl index 03ad283..52aa37f 100644 --- a/nbcl/panel/panel_section_center.nbcl +++ b/nbcl/panel/panel_section_center.nbcl @@ -18,7 +18,7 @@ fn panel_center() { truncate_left = false limit_width = config.panel_windowtitle_maxchars text = global("xdistate").mutate(|val|{ - json.parse(val).window_title + json.parse(val).active_window.name }) } } diff --git a/nbcl/vars/xdi.nbcl b/nbcl/vars/xdi.nbcl index 9aac51b..ce515a5 100644 --- a/nbcl/vars/xdi.nbcl +++ b/nbcl/vars/xdi.nbcl @@ -2,7 +2,7 @@ import core.json Listen "xdistate" { initial = "{}" - cmd = "leftwm-state" + cmd = "xdi -f" }