nikitabobko / AeroSpace

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

Feature: shell-like combinators for conditional computation and sending several commands to server in a single batch #278

Open nikitabobko opened 3 weeks ago

nikitabobko commented 3 weeks ago

Currently it's impossible to consume stdout and exit codes of commands in toml config. One has to use exec-and-forget

alt-w = 'exec-and-forget aerospace workspace W || aerospace workspace-back-and-forth'
atl-tab = 'exec-and-forget aerospace list-workspaces --all | aerospace workspace next'

It's slow. Communicating with the server back and forth from CLI client can take additional 100ms which becomes noticeable. Even if we fix the slowness somehow, annoying flickering will still remain an issue

It'd be cool if AeroSpace supported basic shell combinators (||, &&, ;, ( ), !)

alt-w = 'workspace W || workspace-back-and-forth'
atl-tab = 'list-workspaces --all | workspace next'

That's a big feature that lays the foundation for a lot of things (basically the combinators allow programming custom logic):

Other subcommands that AeroSpace has to implement to make the feature complete:

Overall a lot issues can be fixed: #264 #60 #54 #174 (partially) #104 (partially) #107 (kinda) #150

Open question: doesn't it open a pandora box of own script programming language? It kinda does. I hope that people will never ask for loops