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

Update aerospace extension #14886

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions extensions/aerospace/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# aerospace Changelog

## [New Feature] - 2024-10-11

- Adds functionality to switch between apps in current workspace

## [Bug Fixes] - 2024-09-18

* Update `@iarna/toml` to `v3.0.0` which includes support for TOML 1.0.0
- Update `@iarna/toml` to `v3.0.0` which includes support for TOML 1.0.0

## [Bug Fixes] - 2024-05-27

* Fix screenshots in README
- Fix screenshots in README

## [Bug Fixes] - 2024-05-06

* Fixed issue with `aerospace` itself not being present
* Added screenshots
- Fixed issue with `aerospace` itself not being present
- Added screenshots

## [Initial Version] - 2024-05-01

* Initial release of aerospace extension
- Initial release of aerospace extension
15 changes: 15 additions & 0 deletions extensions/aerospace/assets/scripts/list-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# References:
# - https://nikitabobko.github.io/AeroSpace/commands#list-windows
# - https://www.alfredapp.com/help/workflows/inputs/script-filter/json/

result=$(aerospace list-windows --workspace visible --format "%{app-name},%{window-title},%{window-id},%{app-pid},%{workspace},%{app-bundle-id}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have control over this PR, and the final say is after people who support the raycast plugin.

But as a maintainer of AeroSpace, the hacking around unstructured format makes me sad. Sure, you can use it for your own needs, but when you publish it for other people, I think it's better to clean it up. I'd wait for nikitabobko/AeroSpace#577 before merging this PR

I want to take this opportunity to remind that the plugin currently parses aerospace.toml config itself (which is fragile), while the proper API was provided nikitabobko/AeroSpace#215 (comment) (and still waits to be used)

This PR increases the technical debt of the raycast plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List-windows.sh shouldn’t have been added. The command uses array-windows.sh but your comment still applies.
I don’t mind waiting if it will improve the code and technical debt. I started the PR before seeing the —json improvement.

echo "$result"


if [ -n "$DEBUG" ]; then
echo "" 
echo "--- END: $(date) ---"
echo ""
fi
Loading
Loading