Update X desktop info handling
- Update initial value for `xdistate` - Function for current window name
This commit is contained in:
parent
bc3a9611fa
commit
62a705ee41
@ -17,9 +17,7 @@ fn panel_center() {
|
||||
truncate = true
|
||||
truncate_left = false
|
||||
limit_width = config.panel_windowtitle_maxchars
|
||||
text = global("xdistate").mutate(|val|{
|
||||
json.parse(val).active_window.name
|
||||
})
|
||||
text = xdi.windowname()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
import "nbcl/vars/xdi.nbcl" as xdi
|
||||
import "nbcl/vars/xdi.nbcl" as xdi { * }
|
||||
|
||||
Poll "time_hhmm" {
|
||||
initial = "00:00"
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
import core.json
|
||||
|
||||
Listen "xdistate" {
|
||||
initial = "{}"
|
||||
cmd = "xdi -f"
|
||||
initial = "{\"active_window\":{\"id\":0,\"name\":\"\",\"class\":\"\"},\"workspaces\":[{\"id\":0,\"current\":true,\"windows\":[]}]}"
|
||||
cmd = "/usr/local/bin/xdi -f"
|
||||
}
|
||||
|
||||
|
||||
#let wmstate =
|
||||
# Usage: xdi.windowname()
|
||||
fn windowname() {
|
||||
global("xdistate").mutate(|val|{
|
||||
json.parse(val).active_window.name
|
||||
})
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user