-
-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config option to always open window in full screen/maximized #284
Comments
This would be nice. Just replaced my terminal with wezterm and this is the only thing i missed at this time. |
These params |
While a config option might be OK for some situations, I want |
Just as a note, I can start Wezterm maximized by simply setting @wez, maybe this behavior should be documented? I can send a PR if you wish. |
This issue serves as documentation for workaround(s) for now: I'd rather have a PR that focused on making the requested feature work :) |
That doesn't work for me on windows. The window will actually take those dimensions. |
It actually extends to my second monitor. It's better for me to not set any values there. |
Implemented on macOS only for the moment. refs: #284
Doesn't do anything yet, but I always forget to add this until after I've implemented one or the other and then wonder why nothing happens. refs: #284
Current local wezterm = require 'wezterm'
local mux = wezterm.mux
wezterm.on("gui-startup", function()
local tab, pane, window = mux.spawn_window{}
window:gui_window():maximize()
end)
return {} Windows and Wayland nightly builds with this feature are currently building, but X11 and macOS builds already have it available. |
It doesn't seem to work on windows. It does start in the topleft corner now, but not maximized. It has the same size as before. |
Since applying the maximized state is async, we hadn't fully applied it before we got to the startup logic that resizes the window to fit the initial terminal size. This adds a final check to see if we are resizable before we try to apply that size, and skips it. refs: #284
@chtenb: should be fixed now in |
I just tested and it works as expected. I removed my lines/cols "hack" settings to try and the result was correct. Thank-you! |
Yes it works now @wez ! |
Works great on Mac thanks @wez, but for anyone that this isn't working for, having this setting will not allow it to work:
To get rid of the title bar and still allow this to work you can do:
|
Thank you. It is working great. 🎉 Is it possible to disable the resize animation when calling the maximize method? |
assuming you mean macOS: as far as I can tell, no, there isn't a way for an application to use the standard NSWIndow::zoom method without it animating. Instead of |
|
This worked wonderfully on Windows but I seemed to have lost the ability to use |
This allows the hook to choose how to handle eg: `wezterm start -- top`. Previously, if you had implemented this event you would essentially lose the ability to specify a command that you wanted to launch. refs: #284
@tgharib ah, good catch. Yeah, that's a pain. I've pushed a commit that now encodes the local wezterm = require 'wezterm'
local mux = wezterm.mux
wezterm.on("gui-startup", function(cmd)
local tab, pane, window = mux.spawn_window(cmd or {})
window:gui_window():maximize()
end)
return {} |
That should show up in a nightly build for windows within about an hour from now. |
I don't think the solutions above apply to windows spawned by |
This is done by adjusting how `wezterm ssh` works; we now set up the default domain and call into the main `wezterm start` logic. refs: #284
Thanks for this feature. I tested your code @wez, but the terminal always flickers on startup. It starts out as a small window, as configured (or not) via Is there a way to avoid this flickering? |
@wez @stevenxxiu have the same issue, but also messes up
|
@jfaz1 check out the docs at https://wezfurlong.org/wezterm/config/lua/gui-events/gui-startup.html and you'll see that the local wezterm = require 'wezterm'
local mux = wezterm.mux
wezterm.on('gui-startup', function(cmd)
local tab, pane, window = mux.spawn_window(cmd or {})
window:gui_window():maximize()
end)
return {} |
@wez Thanks for the reply! I tried that snippet earlier and it didn't work, but I moved up in the config and for some reason it worked this time. It's almost there, only thing missing besides what @stevenxxiu brought up is that the left side starts cut-off: |
Please open a separate issue for that! |
If you're on MacOS and want wezterm to natively maximize the window you can:
Also, animation to fullscreen might mess up sizes if you're immediately spawning stuff. |
I can't tell why this was closed? AFAICT there's still no config option to do this -- enabling fullscreen interactively at runtime or with some kind of sleep seems hacky. I'd like to use wezterm for one-off fullscreen terminal dialogs that I currently still use |
It's closed because this issue asked for a configuration option and there is a more powerful configuration option for this documented in:
a command line flag is a different thing; please file a separate issue for that if that is something you'd like to have considered as a future enhancement. I'm going to lock this issue because tracking and responding effectively to comments on a closed issue is difficult. |
Is your feature request related to a problem? Please describe.
When using
wezterm
on laptop, the window size is too small and I have to maximize the window everytime.Describe the solution you'd like
It would be really nice, if it there is a configuration option to always open the window in full screen/maximized.
Describe alternatives you've considered
Similar behaviour can be obtained by setting
initial_rows
andinitial_cols
, but needs to be configured per machine/monitor.Additional context
#256 #177
The text was updated successfully, but these errors were encountered: