feat: customization options for AGS

This commit is contained in:
Zhongheng Liu 2024-08-27 18:32:37 +08:00
commit 5558d0d761
No known key found for this signature in database
2 changed files with 7 additions and 5 deletions

View file

@ -17,7 +17,7 @@ const focusedTitle = Widget.Label({
visible: hyprland.active.client.bind('address')
.as(addr => addr !== "0x"),
})
const wsSymbols = ["壹", "貳", "叁", "肆", "伍", "陸", "柒", "捌", "玖", "拾"]
const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`);
const Workspaces = () => Widget.EventBox({
@ -26,7 +26,7 @@ const Workspaces = () => Widget.EventBox({
child: Widget.Box({
children: Array.from({ length: 10 }, (_, i) => i + 1).map(i => Widget.Button({
attribute: i,
label: `${i}`,
label: `${wsSymbols[i - 1]}`,
onClicked: () => dispatch(i),
class_name: i === hyprland.active.workspace.id ? "focused" : ""