Placeholder workspacelist() function

This commit is contained in:
Candifloss 2026-09-09 13:42:55 +05:30
parent 62a705ee41
commit a13881afef
2 changed files with 13 additions and 3 deletions

View File

@ -7,8 +7,6 @@ fn panel_left() {
halign = "start" halign = "start"
height = config.panel_height height = config.panel_height
Label { xdi.workspacelist()
text = "left_side"
}
} }
} }

View File

@ -10,4 +10,16 @@ fn windowname() {
global("xdistate").mutate(|val|{ global("xdistate").mutate(|val|{
json.parse(val).active_window.name json.parse(val).active_window.name
}) })
}
# Usage: xdi.workspacelist()
fn workspacelist() {
Box {
for i in 0..9 {
Button {
onclick = f"leftwm-command \"SendWorkspaceToTag 0 ${i}\""
label = f" ${i} "
}
}
}
} }