Use xdi for X11 WM info

- Switch from `leftwm-state` to `xdi`
- More generic, no more specific to `leftwm`
This commit is contained in:
Candifloss 2026-09-08 15:10:38 +05:30
parent c386eacde9
commit bc3a9611fa
3 changed files with 2 additions and 14 deletions

View File

@ -10,15 +10,3 @@ component DateTimeWidg (widgname, widgtextvar) {
height = config.panel_height height = config.panel_height
} }
} }
#-
# Example usage
DateTimeWidg "paneldatewidg" {
widgname = "paneldatewidg"
widgtextvar = "date_ddM"
}
DateTimeWidg "paneltimewidg" {
widgname = "paneltimewidg"
widgtextvar = "time_hhmm"
}
-#

View File

@ -18,7 +18,7 @@ fn panel_center() {
truncate_left = false truncate_left = false
limit_width = config.panel_windowtitle_maxchars limit_width = config.panel_windowtitle_maxchars
text = global("xdistate").mutate(|val|{ text = global("xdistate").mutate(|val|{
json.parse(val).window_title json.parse(val).active_window.name
}) })
} }
} }

View File

@ -2,7 +2,7 @@ import core.json
Listen "xdistate" { Listen "xdistate" {
initial = "{}" initial = "{}"
cmd = "leftwm-state" cmd = "xdi -f"
} }