asmvik / asmvik/yabai

Some spaces names are lost after sleep

Open
#2,229 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
29.6k
Forks
750
PR merge metrics
No merged PRs in 30d

Description

This is an issue that I encounter since months and not since the upgrade to v7.

After waking up from sleep, some spaces names are lost and causes rules associated with that space to stop working.

The spaces which the name is lost are generally one the first (default) space of different monitors.

It looks like this is often the same space of a specific monitor that is lost.

I don't know if you can do something and if I can give some more specific details.

The first space is named in my yabairc file using the following commands:

```
export RIGHT_MONITOR=$(yabai -m query --displays | jq '.[] | select(.uuid|test("5C3C4F45-1D73-4F7A-9FD2-30A6B092251")) | .index')
get_first_space_of_monitor() {
yabai -m query --spaces --display $1 | jq '.[0].index'
}
name_first_space() {
local SPACE_ID=$(get_first_space_of_monitor $1)
debug "Name space ($SPACE_ID): $2"
yabai -m space "$SPACE_ID" --label "$2"
}
name_first_space $RIGHT_MONITOR "Side-Projet 1"
```

I run a setup with 1 MBP and 3 external monitors and 2 are exactly the same. This is generally one of the two same monitors which causes the issue.

Example of bug:

```
yabai -m query --spaces | jq '.[].label'
"Projet 1"
"Projet 2"
"Projet 3"
"Projet 4"
"Projet 5"
"dotfiles"
"docker"
"ansible"
"yeoman"
"git"
"Terminal 1"
"Terminal 2"
"Terminal 3"
"Terminal 4"
"Terminal 5"
"Terminal docker"
"Terminal ansible"
"web"
"Todo"
"" <------ BUG HERE
"Side-Projet 2"
"Side-Projet 3"
"Side-Projet 4"
"Side-Projet 5"
"virtualisation"
"Messages
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing a sleep/wake cycle with the reported three-monitor setup, then run `yabai -m query --spaces | jq '.[].label'` before and after waking. Compare the first space on each display, especially the two identical monitors, and verify that labels remain present and associated rules continue working after the fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.