asmvik / asmvik/yabai

Yabai WhatsApp rule failing

Open
#2,580 3 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

All the apps respect my rules except WhatsApp. (It does open though on yabai restart)

```bash
# yabairc

yabai -m rule --add app="^Finder$" space=1 manage=on
yabai -m rule --add app="^iTerm2$" space=1 manage=on
yabai -m rule --add app="^Messages$" space=2 manage=on
yabai -m rule --add app="^WhatsApp$" space=2 manage=on
yabai -m rule --add app="^Microsoft Outlook$" space=3 manage=on
yabai -m rule --add app="^Arc$" space=4 manage=on

open -a "iTerm"
open -a "Messages"
open -a "WhatsApp"
open -a "Microsoft Outlook"
open -a "Arc"
open -a "Finder"
```

Some applications have two names like iTerm:
- I've found all the correct names for opening the apps verified by using `open -a`.
- I used this nice little one liner to find the names of the Yabai windows. (This lets you select a bunch of different apps and see their names).
```while true; do yabai -m query --windows --window | jq '.app'; sleep 10; done```

In both cases the name is just "WhatsApp".

Running `yabai yabai -m rule --list | jq` yields:

```json
{
"index": 3,
"label": "",
"app": "^WhatsApp$",
"title": "",
"role": "",
"subrole": "",
"display": 0,
"space": 2,
"follow_space": false,
"opacity": 0.0000,
"manage": true,
"sticky": null,
"mouse_follows_focus": null,
"sub-layer": "",
"native-fullscreen": null,
"grid": "0:0:0:0:0:0",
"scratchpad": "",
"one-shot": false,
"flags": "0x00000001"
}
```

Does anyone know how to wrangle WhatsApp?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the rules in yabairc and reproduce the launch sequence using the listed open commands and yabai -m query --windows --window output. Compare WhatsApp's observed window properties with the rule and determine whether the rule can be made to apply; done means WhatsApp consistently opens on space 2 under management.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.