-
-
Notifications
You must be signed in to change notification settings - Fork 424
Description
The feature proposal is to introduce aerospace create-window primitive
aerospace create-window [--tiling|--floating] [--title <title>] [--fullscreen]
[--macos-native-fullscreen] [--macos-native-minimize]
[--opacity <opacity>%] [--no-window-decoration]
[--body <text>] [--body-size <text-size>] [--workspace <workspace>]
[--corner-radius <radius>] [--no-shadow]
[--background-color <hex-color>] [--on-click <aerospace-command>]
[--on-close <aerospace-command>]
--opacity <opacity>%::
Valid format is a number from 0 to 100.
--fullscreen::
The created window is immediately fullscreened. See `fullscreen` command.
--workspace <workspace>::
Immediately assign the created window to the specified workspace.
Motivation
Purity and general purpose scripting. Window is a basic primitive of a window manager. Similar to how package managers allow creating drafts of packages, window manager should be capable of creating windows.
Given that it's a basic primitive, real world use cases will emerge. Some people may use it to show big text on their screen, other people may use it to intentionally introduce gaps to make half of the wide screen empty (#1884)
Open questions
--body <text>. Is it rich text or plain text? If it's a rich text is it markdown or html?--corner-radiusand--no-window-decorationshould be designed with what is technically possible in mind.- Print window id to stdout?
- Menubar?
- Show anything in Dock? (probably not)
- How to change properties of already created windows?
- Instead of
--fullscreen,--macos-native-fullscreenetc. add single--on-create <aerospace-command>. Delay window layout until the callback in called to avoid flickering. Related: Add a possibility to "await" the moment when new window opens #226 - Somehow make the command accessible without AeroSpace server running?
Special casing for hiding windows
AeroSpace hides windows in monitor corners. For our own windows, we could theoretically close them and open as needed. Though it's up to discussion. Other users might not like it because of mission control. In the first version, I'd prefer to avoid the special casing.
Technical challenges
AFAIK, we can't use the same mechanism that we use to move other windows. Process that tries to apply accessibility requests to itself immediately crashes
Related
#1403 app-menu primitive. Idea: what if create-window primitive was the way to create new windows of particular applications! Replacement for new-window-or-open