Does anyone use hey to script stack and tile? If so, care to share some insight and possibly script examples? Stack and tile is great, but getting it set up each session is time consuming and unproductive.
I donāt think itās possible with just passing a BMessage with hey. Itās definitely a desireable feature for stack & tile and having some sort of session management in general.
Imagine you had some stack&tile arrangement of a few apps/windows. Click and hold with the right mouse button on a tab of that S&T arrangement and some icon appears that you dragānādrop to e.g. the Desktop. This would create a ālauncherā file with a mix of the icons of the apps involved. Double-click it to open all those apps with those documents in that S&T arrangemet (or put into ~/config/settings/boot/launch to autostart).
You could also open a ālauncherā file with a āLauncherEditorā to edit some properties, like what documents an app should load, or what location a Tracker window shows, or on what workspace to open etc.
Maybe I should create an enhancement ticket for the aboveā¦
Thatās a great idea @humdinger , would love to have such a feature in Haiku
Hey can query the screen size, window sizes and make modifications to windows. I would think it could stack and tile windows too, if paired with a more general purpose scripting language to glue all the calculations together. Is stack and tile not done through BMessage()? Of course it could also be implemented in native C++. Iām thinking along the lines of showcasing and perhaps improving hey. This would make Haiku more attractive to Linux refugees coming from the tiling WM ecosystems.
This is definitely worthy of an enhancement ticket. My personal wishes: easy configuration, preferably stored in text files with GUI front end. Plays well with the Shortcuts preferences and Workspaces.
I donāt know. Iād have guessed that itās some S&T magic in the app_serverā¦
In any case, being able to hack things with hey etc. is nice, but the basics should be standard behaviour of the GUI.
That said, key bindings should probably be part of the behavior. Iām wondering if Shortcuts could be overhauled into a central control center for system wide key bindings. Adding bindings to something like this project would take a number of slots. From a UI/UX standpoint, it would make sense to make a more central point of key binding configuration. Or at least have it as something to consider beforehand.
I think we should indeed do what you describe. It might be a bit of a project though. I have wanted to overhaul the Shortcut preferences for a while, and I know nephele has interest too, and has already done some work I think. It needs much improvement in the UX and UI, and there is a fundamental bug in how it works that makes it break when the system is set to use another language (unless someone has fixed that since the last time I looked.)
But with that said, putting all system actions into Shortcuts would require deeper work to change hard-coded keyboard handling for various things to be something based on messages. Of course a side effect would be that then something like stack and tile which is hard-coded into app_server would then indeed be scriptable with hey
. Of course there might be some reasons why switching from keyboard handling to using messages is either hard to do or somehow makes the experience worse. Though we wonāt know until someone gives it a try.
There is never any magic involved in code, otherwise it needs to be rewritten
Stack and Tile is implemented by decorators, but it is accessible from the API with the BWindowStack class (for stacling but not tiling yet, I think?). This is how NetSurf and Coder create stacks of windows.
It should be possible to add some scripting endpoints to BWindow to access that with hey (āhey xxx getsuites of Stack of Window yyyā or something like that).
As promised, hereās a ticket describing the above idea to drag an icon from an S&T-arrangement to the Desktop to save/load that arrangement: ticket #17589: Saving/loading stack&tiled apps/windows between sessions.
Like and subscrbeā¦
Youāve been quite the humdinger of this community for a long time.