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

I have created a Raycast Extension #215

Closed
limonkufu opened this issue May 7, 2024 · 7 comments
Closed

I have created a Raycast Extension #215

limonkufu opened this issue May 7, 2024 · 7 comments

Comments

@limonkufu
Copy link

limonkufu commented May 7, 2024

Hi @nikitabobko ,

Thank you very much for the awesome window support that your app brings. I myself struggle a lot remembering shortcuts so I went ahead and created a small raycast application and menubar extension to help myself to search for things easily until it becomes muscle memory.

I don't know whether you'd like to mention in anywhere in the docs or so that I can contribute it the docs myself.

You can check it out here: https://www.raycast.com/limonkufu/aerospace

Let me know what you think and again thanks for the awesome app.

nikitabobko added a commit that referenced this issue May 15, 2024
@nikitabobko
Copy link
Owner

Very cool, thank you! I'm glad to see such contributions

I don't know whether you'd like to mention in anywhere in the docs or so that I can contribute it the docs myself.

I'm 100% for mentioning all the cool stuff around AeroSpace. There is a special page for it https://nikitabobko.github.io/AeroSpace/goodness

I've mentioned the extension in the docs 22c958f

Feel free to submit a PR if you prefer a different wording/advertisement

It will appear on the site when I rebuild the site


Note 1. I've left a few questions in the Raycast PR raycast/extensions#12122

Note 2. I notice that you parse the ~/.aerospace.toml file by yourself in the extension (and users also need to manually pick the location of the file).

Would the extension benefit from CLI commands that allow querying AeroSpace config state? I can introduce "plumbing" commands like aerospace list-bindings --mode <mode>, aerospace list-modes. The commands can be made to output the data in JSON format with --json flag for easier consumption by the extension

Note 3. I notice that you try to run command by triggering the bindings with AppleScript. It's fragile and it didn't work on my machine:

image

I can introduce the CLI command to run aerospace commands by bindings. Like aerospace trigger-binding alt-1. Will it be possible for the extension to use those commands? WDYT?


Again, thank you!

@limonkufu
Copy link
Author

limonkufu commented May 16, 2024

Yes I can make those changes so that I can use aerospace itself properly instead of AppleScript or parsing the config file. That would be great 👍
I was at unease since I wasn't using aerospace itself at all in the extension

May i also ask a cli command to print out the path of the config file ? I probably wouldn't need it if i can use AeroSpace itself but it would be nice still

@limonkufu
Copy link
Author

I am glad you like it 😊 Also, i will reply to your comments on the MR and improve it 👍

nikitabobko added a commit that referenced this issue May 19, 2024
Needed for the next commits

#215
nikitabobko added a commit that referenced this issue May 19, 2024
nikitabobko added a commit that referenced this issue May 19, 2024
nikitabobko added a commit that referenced this issue May 19, 2024
nikitabobko added a commit that referenced this issue May 19, 2024
@nikitabobko
Copy link
Owner

0.11.0-Beta comes with the following:

  • (1) reload-config now also prints errors to stdout. reload-config now returns correct exit code
  • (2) Add [--no-gui] [--dry-run] flags to reload-config.
  • (3) Introduce config command to query AeroSpace config state.
  • (4) Introduce trigger-binding "plumbing" command to trigger AeroSpace binding as if they were pressed by user.

You can use (1) and (2) to validate the config without reloading it raycast/extensions#12122 (comment)

@limonkufu
Copy link
Author

@nikitabobko Great! I think I can push a new version during next week and will ping you in the new MR :)

nikitabobko added a commit that referenced this issue Jun 16, 2024
…instead of using JSON array

Reason: it better fits into a future with built-in shell-like combinators #278

Before:

    $ aerospace config --get mode.service.binding --json
    {
      "alt-shift-k" : [
        "join-with up",
        "mode main"
      ],
      "backspace" : [
        "close-all-windows-but-current",
        "mode main"
      ],
      ...
    }

After:

    $ aerospace config --get mode.service.binding --json
    {
      "alt-shift-h" : "join-with left; mode main",
      "esc" : "mode main; reload-config",
      "alt-shift-k" : "join-with up; mode main",
      "r" : "flatten-workspace-tree; mode main",
      "backspace" : "close-all-windows-but-current; mode main",
      "alt-shift-j" : "join-with down; mode main",
      "f" : "layout floating tiling; mode main",
      "alt-shift-l" : "join-with right; mode main"
    }

Raycast extension doesn't depend on this API yet, so it should be fine
to break it #215
@nikitabobko
Copy link
Owner

@limonkufu please note that 0.12.0-Beta comes with the breaking change for config command. Output format is slightly different

fdc143c

Since Raycast extension doesn't depend on this API yet, I think it's fine to break it

The new output better aligns with future embedded shell-like combinators #278

@limonkufu
Copy link
Author

@limonkufu please note that 0.12.0-Beta comes with the breaking change for config command. Output format is slightly different

fdc143c

Since Raycast extension doesn't depend on this API yet, I think it's fine to break it

The new output better aligns with future embedded shell-like combinators #278

Thanks for letting me know. I had some personal issues but i will update the plugin this week 👍👍

jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
jakenvac pushed a commit to jakenvac/AeroSpace that referenced this issue Aug 16, 2024
…instead of using JSON array

Reason: it better fits into a future with built-in shell-like combinators nikitabobko#278

Before:

    $ aerospace config --get mode.service.binding --json
    {
      "alt-shift-k" : [
        "join-with up",
        "mode main"
      ],
      "backspace" : [
        "close-all-windows-but-current",
        "mode main"
      ],
      ...
    }

After:

    $ aerospace config --get mode.service.binding --json
    {
      "alt-shift-h" : "join-with left; mode main",
      "esc" : "mode main; reload-config",
      "alt-shift-k" : "join-with up; mode main",
      "r" : "flatten-workspace-tree; mode main",
      "backspace" : "close-all-windows-but-current; mode main",
      "alt-shift-j" : "join-with down; mode main",
      "f" : "layout floating tiling; mode main",
      "alt-shift-l" : "join-with right; mode main"
    }

Raycast extension doesn't depend on this API yet, so it should be fine
to break it nikitabobko#215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants