Repository navigation
Support for layouts via AppleScript? #12218
Replies: 1 comment
|
Yes — you can create windows, tabs, and splits with AppleScript, but there doesn’t currently appear to be a built-in API for setting split sizes as percentages, such as 20/80. You can simplify the repeated resize workaround by using a single larger resize action: tell application "Ghostty"
set w to new window
set leftPane to terminal 1 of selected tab of w
set rightPane to split leftPane direction right
delay 0.5 -- give the split time to lay out
perform action "resize_split:left,300" on leftPane
end tellThe I tested this on Ghostty 1.3.1 with a fresh two-pane window, and: produced the same terminal widths as running: 30 times. The main limitation is that So a single larger Also, the |
Uh oh!
There was an error while loading. Please reload this page.
Hello! In the Twitter post where AppleScript support was announced it was said that with more code we could do different layouts for the terminal windows/tabs/splits. Is this possible with the current version of this feature?
I'm trying to find a way to run a script to set up new tabs but the best I've gotten to work is to have a new tab/window with a vertical split but I would like to have that vertical split be like 20%/80% instead of 50/50. I've hacked it bu running a resize action X number of times but I would like to know if there's some cleaner way to do this with some kind of layout or resize feature.
Thank you for the help
All reactions