Skip to content

restore terminal on restart of Atom #4

Open

Description

@trusktr

Currently it doesn't restore the terminal:

screen shot 2018-11-04 at 11 39 40 pm

(the tab is empty)

It would be sweet for terminals to be restored (at least a new terminal, but showing previous output would only be a bonus).

Activity

  1. PerBothner commented on Nov 5, 2018

    @PerBothner
    Owner

    This is quite doable. I tried manually selecting Detach session in the contect (pop-up menu), then closing atom. Then after re-starting atom, opening manually a domterm window, I could do domterm --right attach :1 and a new window opened with old (still running session).

    Atom is a bit tricky because it does a lot of save and restore automatically (like when moving windows), so figuring out when windows should be saved and when they should be closed was a bit tricky. But if I do it right, it might turn out to be trivial.

  2. PerBothner commented on Nov 6, 2018

    @PerBothner
    Owner

    I checked in a few small fixes - it should work now.

    Note you have to update both domterm and atom-domterm.

    While you're re-building domterm, I'd appreciate if you could check if setting LDFLAGS, CFLAGS, and CPPFLAGS is still needed.

    I'm not sure if the way I'm doing this is quite right - it feels kludgy. One problem is I'm not sure the best way to distinguish when a pane is closed (we want to close the session) vs when we Quit atom (sessions should be detached but not closed).

  3. trusktr commented on Nov 9, 2018

    @trusktr
    Author

    Interesting. I haven't tried it yet, but my thought is that if you were to treat quitting Atom the same as closing a tab and close the session in both cases, that may be the easiest and most consistent way to implement it.

    As for restoring the session, maybe in that case you could do something similar to macOS Terminal where it shows your previous output, then starts outputting the new sess output below that. So the previous content is there and useful for viewing/copying/referencing from the new (old) session.

    Have you used macOS Terminal? Do you know what I mean?

  4. trusktr commented on Nov 9, 2018

    @trusktr
    Author

    If I close Atom I'd also like to think that any child processes were also closed.

    In the case macOS is restarted (etc), the live sessions will be lost, so the restore-old-output idea would be useful there for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions