asmvik / asmvik/yabai

Space-specific padding lost after sleeping

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

Description

Been battling this a while thinking it was misconfiguration or not utilizing events/etc to solve. When specifying space padding, such as `yabai -m space 7 --label mySpaceLabel --padding rel:0:0:195:0`, I lose the padding when I return to my desk the next morning.

I've tried the above command with --padding as well as left_padding with `yabai -m config --space mySpaceLabel left_padding 195`.

Important context:
- Space 7 is the last space I have defined, although I have a total of 8 spaces in mission control
- I have tried absolute padding and relative padding
- I have tried overriding default config padding as well as omitting any default padding
- I have tried with and without signal events hooking to: `system_woke`, `display_removed`, `display_added`, `space_changed`, `window_moved`, `window_destroyed`, and `window_created`
- I'm on Sonoma 14.4, however this has been occurring since before upgrading to Sonoma
- Currently on yabai version 7.1.0

Reproducible yabairc:
```
# ~/.config/yabai/yabairc

# event hook for enabling the dock injection for spaces management
# must be before --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

# left_padding 10 \
yabai -m config \
window_placement second_child \
window_gap 10 \
top_padding 10 \
bottom_padding 10 \
right_padding 10 \
layout bsp \
mouse_follows_focus on \
mouse_modifier alt \
mouse_action1 move \
mouse_action2 resize \
mouse_drop_action swap

yabai -m space 1 --label l1 --padding rel:0:0:10:0
yabai -m space 2 --label l2 --padding rel:0:0:10:0
yabai -m space 3 --label l3 --padding rel:0:0:10:0
yabai -m space 4 --label l4 --padding rel:0:0:10:0
yabai -m space 5 --label l5 --padding rel:0:0:10:0
yabai -m space 6 --label l6 --padding rel:0:0:10:0
yabai -m space 7 --label l7 --padding rel:0:0:195:0

# left padding to show desktop widgets on the left of screen
# yabai -m signal --add event=window_created action="yabai -m space l7 --padding rel:0:0:195:0"
# yabai -m signal --add event=window_destroyed action="yabai -m space l7 --padding rel:0:0:195:0"
# yabai -m signal --add event=window_moved action="yabai -m space l7 --padding rel:0:0:195:0"
# yabai -m signal --add event=space_changed action="yabai -m space l7 --padding rel:0:0:195:0"
# yabai -m signal --add event=display_added action="yabai -m space l7 --padding rel:0:0:195:0"
# yabai -m signal --add event=display_removed action="yabai -m space l7 --padding rel:0:0:195:0"
# yabai -m signal --add event=system_woke action="yabai -m space l7 --padding rel:0:0:195:0"
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the loss with the provided ~/.config/yabai/yabairc and the space padding commands on macOS Sonoma. Trace how padding set by `yabai -m space` persists across the `system_woke`, `display_added`, and `display_removed` events; done means space 7 retains its configured padding after sleep and returning to the desk.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.