aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Sources/bar/bar.docc/examples/example-workspaces.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/Sources/bar/bar.docc/examples/example-workspaces.md b/Sources/bar/bar.docc/examples/example-workspaces.md
index 4f9a444..3937fc8 100644
--- a/Sources/bar/bar.docc/examples/example-workspaces.md
+++ b/Sources/bar/bar.docc/examples/example-workspaces.md
@@ -7,6 +7,11 @@ A script that prints the active workspaces.
```shell
#!/bin/zsh
+# Focus the clicked workspace
+case $BUTTON in
+ (0) yabai -m space --focus $(echo $CELL | xargs) ;;
+esac
+
# Get all available workspaces
workspaces=()
while IFS= read -r line; do
@@ -46,6 +51,11 @@ yabai -m signal --add event=space_changed action='notifyutil -p bar.touch.spaces
```shell
#!/bin/zsh
+# Focus the clicked workspace
+case $BUTTON in
+ (0) aerospace workspace $(echo $CELL | xargs) ;;
+esac
+
# Get all available workspaces
workspaces=()
while IFS= read -r line; do