nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
3.42k stars 52 forks source link

Feature: interactive commands #236

Open nikitabobko opened 1 month ago

nikitabobko commented 1 month ago

Proposed synopsis:

aerospace focus [-h|--help] --interactive [--fzf] [--fzf-args <fzf-args>... --end-fzf-args]

Proposed behaviour: If the stdout is not TTY then a new floating (!) terminal window opens (sticky floating window?). The terminal should present the following message:

1. Calendar      | Calendar
2. Google Chrome | New Issue ยท nikitabobko/AeroSpace - Google Chrome
3. IntelliJ IDEA | jvm-sandbox โ€“ JavaBase.java [jvm-sandbox]
4. IntelliJ IDEA | jvm-gradle-sandbox โ€“ Jaba.java [jvm-gradle-sandbox.main]
5. Alacritty     | /Users/Nikita.Bobko ๐Ÿš€ ta
What window do you want to focus (1-5)? 

--fzf flag makes the interactive communication nicer by utilizing the fzf tool

After the interactive workflow is done terminal window should close

If the stdout is TTY then TTY should be used for interactive communication

Consideration. Other commands where analogical --interactive could be added: workspace, layout (interactively choose the layout), focus, macos-native*, close, move-node*?

Consideration. The terminal that is used for interactive communication shouldn't appear in the selection?

Consideration. focus command. --interactive-window-id to interactively choose window-id and --interactive to interactively choose direction (is the interactive direction even useful?)

Consideration. Use NSWindow instead of a terminal?

Consideration. Use fzf when available by default?

Consideration. Introduce a separate command to make it possible to create custom "interactive" workflows?

nikitabobko commented 4 weeks ago

Related: i3-input https://manpages.ubuntu.com/manpages/jammy/man1/i3-input.1.html

nikitabobko commented 4 weeks ago

One more "interactive" command: aerospace tree --live should be a pager style command that displays up-to-date tree state

It closes the use case in #55