extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Update yabai extension

Open webdesus opened this issue 1 year ago โ€ข 4 comments

Description

I have added two new features to the application:

  1. Desktop Switch Indicator:

    • Added an indicator in the menubar that displays the current desktop.
    • Users can switch desktops by selecting the respective menubar element with the mouse.
  2. New command "Windows List by Current Space":

    • Show only the applications of the current space.

Comments

  • I have not found a better way to automatically subscribe to the space_changed event. Therefore, I have written instructions in the Readme file on how users can do it manually.
  • I have not tested this for multiple displays. It might require some fixes for multiple displays.

Screencast

https://github.com/raycast/extensions/assets/3442315/a747ef6a-6f96-432d-9123-e4ca4ae56cc9

Checklist

webdesus avatar Jul 05 '24 12:07 webdesus

Thank you for your first contribution! :tada:

๐Ÿ”” @krzysztoff1 @rubentsirunyan you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

We're currently experiencing high demand and limited capacity. As a result, extension reviews might take longer than usual to get the initial review. Please expect an initial review within 5-10 business days.

raycastbot avatar Jul 05 '24 12:07 raycastbot

Fixed all the bugs and added a description to the pool requester

webdesus avatar Jul 06 '24 10:07 webdesus

HI @mil3na and nice to meet you๐Ÿ™‚

I believe the issue may be due to System Integrity Protection (SIP) being enabled on macOS, which can restrict some functionalities(more information about SIP and yabai). I can include a note about this in the README and improve the error handling to better message for users cases when SIP is active.

But can you confirm that you didnโ€™t turn it off? ๐Ÿ™‚

webdesus avatar Jul 09 '24 13:07 webdesus

No, I didn't turn it off. Will this new feature only work with SIP off? Would love to hear @krzysztoff1 and @rubentsirunyan opinions about this.

mil3na avatar Jul 09 '24 13:07 mil3na

@mil3na I finally found time to check with SIP turned off and found that after my latest fixes no errors occur. ๐Ÿ™‚ This functionality works with SIP disabled as well. The only thing that doesn't work is the space focus. But this command doesn't work in the current version of the extension either. Because for its work it is necessary to turn off SIP ๐Ÿ™‚ Like i mention before, some functions not working for yabai. This is an article from the official documentation of Yabai.

webdesus avatar Jul 13 '24 10:07 webdesus

Hi! Thanks for addressing my comments. I still have a few issues. Focus Space command doesn't work. Does it need to disable SIP? I can see the spaces on my menubar, but I can't switch among them. Also, when switching spaces manually, I always see this window: CleanShot 2024-07-16 at 13 16 09

The error when switching spaces:

Error: Command failed with exit code 1: env USER=milena /opt/homebrew/bin/yabai -m space --create
cannot create space due to an error with the scripting-addition.
    at makeError (/Users/milena/.config/raycast/extensions/yabai/create-space-and-focus.js:6599:13)
    at handlePromise (/Users/milena/.config/raycast/extensions/yabai/create-space-and-focus.js:7510:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async runYabaiCommand (/Users/milena/.config/raycast/extensions/yabai/create-space-and-focus.js:7646:10)
    at async Object.Command (/Users/milena/.config/raycast/extensions/yabai/create-space-and-focus.js:7653:24)

mil3na avatar Jul 16 '24 11:07 mil3na

@mil3na yes, switching spaces is a feature that can only be accessed if SIP is disabled. My patch does not include switching functionalities. I am using a mechanism that was added before my patch๐Ÿ™‚

webdesus avatar Jul 16 '24 20:07 webdesus

Hey, looks great! @webdesus Thanks a lot for your contribution!

krzysztoff1 avatar Jul 17 '24 09:07 krzysztoff1

Published to the Raycast Store: https://raycast.com/krzysztoff1/yabai

github-actions[bot] avatar Jul 17 '24 09:07 github-actions[bot]

:tada: :tada: :tada:

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@webdesus). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

raycastbot avatar Jul 17 '24 09:07 raycastbot