Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Detect macOS yabai(Window manager) #984

Closed
Helloyunho opened this issue May 31, 2024 · 11 comments
Closed

[Question] Detect macOS yabai(Window manager) #984

Helloyunho opened this issue May 31, 2024 · 11 comments
Labels
enhancement New feature or request

Comments

@Helloyunho
Copy link

Be sure to read FAQ before submitting a new issue.

Wanted features:

Currently fastfetch doesn't know I'm using yabai for window manager

Motivation:

neofetch does know I'm using a custom window manager as seen below:
CleanShot 2024-05-31 at 14 16 06@2x
But fastfetch just says Quartz:
CleanShot 2024-05-31 at 14 16 35@2x

@Helloyunho Helloyunho added the enhancement New feature or request label May 31, 2024
@CarterLi
Copy link
Member

neofetch only knows you have a process named yabai running, it doesn't know whether it is the WM yabai or not.

Same as fastfetch --wm-detect-plugin

@Helloyunho
Copy link
Author

neofetch only knows you have a process named yabai running, it doesn't know whether it is the WM yabai or not.

Same as fastfetch --wm-detect-plugin

Oh I didn't know it was separated
I tried fastfetch -c all but it still didn't detect yabai so I thought it was missing
Anyway thanks for the help!

@Helloyunho Helloyunho changed the title [FEAT] Detect macOS yabai(Window manager) [Question] Detect macOS yabai(Window manager) May 31, 2024
@CarterLi
Copy link
Member

I want to clarify it again that the wm detection is very loose. Try this

$ ln -s $(which vim) fakechunkwmfake && ./fakechunkwmfake &
$ neofetch

@Helloyunho
Copy link
Author

I want to clarify it again that the wm detection is very loose. Try this

$ ln -s $(which vim) fakechunkwmfake && ./fakechunkwmfake &
$ neofetch

CleanShot 2024-05-31 at 14 44 16@2x
WOah what?! It's based on program name 🤣

@CarterLi
Copy link
Member

Is yabai an ancestor process of the iterm2 process? What does pstree print?

@Helloyunho
Copy link
Author

Is yabai an ancestor process of the iterm2 process? What does pstree print?

pstree is not installed on my Mac but I can say that it's not running on iTerm, rather it's a daemon(launched by launchd)

@CarterLi
Copy link
Member

CarterLi commented May 31, 2024

ps -ef should be ok

@Helloyunho
Copy link
Author

ps -ef should be ok

I don't really know how to read the output but it sure has yabai in it

501 10797 1 0 3:48PM ?? 1:08.68 /opt/homebrew/bin/yabai

@CarterLi
Copy link
Member

CarterLi commented May 31, 2024

Just paste the output here

ps -ef | pbcopy

@CarterLi
Copy link
Member

Good. So that yabai is a daemon process. We can reduce some mis-detection by testing its ppid is 1

You can remove the process list

@MatthiasPortzel
Copy link

MatthiasPortzel commented Jun 11, 2024

Rectangle output from ps -ef:

501 97721     1   0 Wed09AM ??         0:42.18 /Applications/Rectangle.app/Contents/MacOS/Rectangle

and pstree (also trimmed)

-+= 00001 root /sbin/launchd
...
 |--= 97721 matthias /Applications/Rectangle.app/Contents/MacOS/Rectangle
...

Any thing else I can do to help debug?
It still wasn't working on the lastest build for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants