Opened 8 weeks ago

Last modified 8 weeks ago

#18839 new bug

Terminal does not remember last window position

Reported by: bitigchi Owned by: jackburton
Priority: normal Milestone: Unscheduled
Component: Applications/Terminal Version: R1/beta4
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev57609

Steps:

  • Open Terminal
  • Move it somewhere else
  • Close Terminal
  • Restart

Expected:

  • Terminal starts at the last closed position

Actual:

  • Terminal starts at the top-left corner

Attachments (1)

Tabs all at top (116.0 KB ) - added by bruno 8 weeks ago.

Download all attachments as: .zip

Change History (26)

comment:1 by bruno, 8 weeks ago

see other enhancements for window remember position, like #17288 for example! All windows should remember its positions by default!?

Or #17446

Last edited 8 weeks ago by bruno (previous) (diff)

comment:2 by augiedoggie, 8 weeks ago

This is intentional. You need to use the "Save as defaults" menu item to save the window geometry. There is some discussion about this in #5030. I personally would find it extremely annoying if Terminal automatically saved position/size each time.

comment:3 by bitigchi, 8 weeks ago

It is extremely hostile for the user to be have to use "Save as default" to save the geometry each time. It is expected that the window should be left at the last place it was closed. If this is intentional, it is a great misjudgement.

comment:4 by augiedoggie, 8 weeks ago

I disagree. If I resize a Terminal window because I want to run something like htop or tail or something, then I don't want that size or location to be used the next time I start Terminal.

comment:5 by humdinger, 8 weeks ago

I agree with augiedoggie. I was about to say the same (running a log in one and top in another), when his comment popped up. :)

in reply to:  4 comment:6 by bitigchi, 8 weeks ago

Replying to augiedoggie:

I disagree. If I resize a Terminal window because I want to run something like htop or tail or something, then I don't want that size or location to be used the next time I start Terminal.

This could be argued for every application and every situation.

comment:7 by augiedoggie, 8 weeks ago

There are a number of apps that allow you to turn off the automatic save. Although I think saving the state is good for 90%+ of applications it's not something I want in Terminal.

I think the difference is that Terminal isn't just one application, it has thousands of text mode applications running inside of it and when I start it up I want it to be immediately ready for my typical use case, which is running a shell like zsh at my preferred size and location.

comment:8 by waddlesplash, 8 weeks ago

I agree with augiedoggie and humdinger.

comment:9 by bruno, 8 weeks ago

Everything pops up at the top-left corner, even new mounted volumes, screenshots and terminal too… Got the annoyance?

Nothing is really save on the desktop to be hidden by new items, windows, volumes, screenshots there should be a nice Haiku-ish solution. So the desktop is not arrange-able by any means, now!

Better to discuss this in the Haiku forum! Not here!

Last edited 8 weeks ago by bruno (previous) (diff)

comment:10 by nephele, 8 weeks ago

It is extremely hostile for the user to be have to use "Save as default" to save the geometry each time. It is expected that the window should be left at the last place it was closed. If this is intentional, it is a great misjudgement.

It took me way too long to figure out that this option is needed. Terminal kept opening with a too big window half-way offscreen, and not even aligned to the top (since the menu font changed)

Explicitly saving dimensions I can understand. Window position I cannot. If you need explicit window positions for *any* window that should be something a user script does, not something you need to configure each app for.

There should be a middle ground. Insane window positions should not be respected if saved. the Terminal should be clipped to the screen borders atleast.

comment:11 by X512, 8 weeks ago

What position is supposed to be remembered if multiple Terminal windows are open?

in reply to:  11 comment:12 by bitigchi, 8 weeks ago

Replying to X512:

What position is supposed to be remembered if multiple Terminal windows are open?

Each Terminal window to be restored at their last known position.

comment:13 by X512, 8 weeks ago

How newly opened Terminal window will know which old closed window position it should restore?

comment:14 by bitigchi, 8 weeks ago

Each opened window can make use of an UUID that gets recorded in a state file?

comment:15 by X512, 8 weeks ago

How it can help? You opened new Terminal window. Which UUID of saved window state it should use?

comment:16 by bitigchi, 8 weeks ago

I am not sure if I follow. When the application is completely closed, reopening it would restore all previously closed windows, say with a shutdown. If all the windows were closed manually, it would just use the last closed window to restore an initial Terminal window position. Are there any cases I’m missing?

comment:17 by bitigchi, 8 weeks ago

And opening a new Terminal window would just cascade open using the active Terminal window position.

comment:18 by X512, 8 weeks ago

Currently there are no generic mechanism in Haiku to restore previously opened windows on reboot.

in reply to:  18 comment:19 by bitigchi, 8 weeks ago

Replying to X512:

Currently there are no generic mechanism in Haiku to restore previously opened windows on reboot.

It is not about restoring on reboot. It’s about restoring on application reopening. If the windows were closed by a reboot, reopening Terminal would restore all previously open Terminal windows on their last known position.

comment:20 by X512, 8 weeks ago

It would be very annoying if all Terminal windows will be restored when using Open Terminal Tracker add-on.

comment:21 by bitigchi, 8 weeks ago

That’s a very small price to pay for acting in accordance with the Desktop metaphor and spatial computing.

comment:22 by X512, 8 weeks ago

No. Open Terminal Tracker add-on is my primary Terminal experience.

comment:23 by bitigchi, 8 weeks ago

That’s alright. If you close your Terminal windows regularly, this should not be an issue for you. But a proper application restore is expected if the application is closed via outside factors, that’s regardless.

comment:24 by pulkomandy, 8 weeks ago

That’s a very small price to pay for acting in accordance with the Desktop metaphor and spatial computing.

The "spatial computing" does not apply in this way here.

Terminal is not rendering any specific document or directory or anything like that.

It would make sense to save and restore window positions only if you also saved the current directory, environment variables, and history of that specific Terminal session. Now that would make sense and be useful.

But this is not the case for Terminal. Whenever you open a new Terminal window, you start a new session. It is like starting StyledEdit and getting a new, empty document. There is no reason an empty document in StyledEdit would just reuse the size and position of the last document you opened. In fact, that would be pretty confusing in spatial computing terms, since now the new document has exactly the same size and position as the previous one, and you could confuse them together.

So, there are different use cases here:

  • Opening and closing Terminal multiple times in a day. Here, you are starting a new Terminal session everytime, it is like a new document. It should start with some sane default values. This is the value that you can set and save from the menu. Then, that Terminal session can live its life, be resized and moved, etc.
  • There is no way to know if the new moved size/position is a one-off thing just for that Terminal, or where you want the next Terminal to open. For this reason, the option to make it persistent in this case was made explicit. That being said, if you really want it, maybe it could be an option in Terminal preferences to make this setting "floating", always saved when you close a Terminal window. Maybe you will try it and decide that, in the end, it is quite annoying, as most of us have already concluded. Maybe you will not.
  • But there are other cases such as a shutdown/reboot. Maybe in this case you want all your Terminals to come back to where you left them (like it is for Tracker windows). In that case, yes, saving and restoring positions would make sense. But it should save a lot more.

Saving a Terminal "session" (with open tabs, current directories, etc) is something that would be more useful in general.

by bruno, 8 weeks ago

Attachment: Tabs all at top added

comment:25 by bruno, 8 weeks ago

For using the windows tabs it makes sense! EDIT: I did not arrange the Tab it's position with "shift+left-click drag"!

If you like without or exept the terminal, where experienced user can save their default window size and position by themselfes!

Bit off-topic: By right-click menu creating a new folder will create it on the cursor position, very nice! Would be nice for mounting volumes, too (off-topic)! Screenshoots: They are created at the top of the desktop by default, but experienced user can choose later where to save them, later!

EDIT: Better to discuss this on the forum: https://discuss.haiku-os.org/t/windows-should-remember-its-position-after-restart/14750/2

Last edited 8 weeks ago by bruno (previous) (diff)
Note: See TracTickets for help on using tickets.