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
Prompt before closing the app when a process is running #684
Comments
Hi there! I would like to take a stab at this feature if possible. I've already managed to hook up to the window Sorry if it's a silly question, this is my first time contributing to hyperterm. Thank you for the project, having a blast using it! :) |
Perhaps take a look at how gnome-terminal does it? |
I was just going to open an issue for this and ran across this one. 😄 Particularly since I'm not used to Ctrl-W closing the tab (except in web browser), I've already been bit by this a number of times and ⚡ lost all of the processes I had running in a window that I accidentally closed. Would love to see this one implemented. 👍 I was going to suggest the exact same thing as @NicholasWalton: Perhaps take a look at how gnome-terminal does it... Their prompt looks like this: |
Still open? |
Hi, Is this Feature still available to work on? |
Would interest me aswell |
@kevin-bebel and @jpolack, you could look to my PR and add some fixes! |
Looks like the PR is stale. I'm going to give this a shot myself. |
So any updates on this? I need this feature as a temporary solution for #623. Did the corresponding PR for this get merged? If yes, how to enable it in hyper? Thanks |
Nowhere near finished still trying to fix a bug that has been nagging me for a few hours anybody knows of anywhere to look? https://github.com/Nevnet99/hyper/tree/bugfix/ISSUE-684 will be picking this up again a little later :) also still trying to look for the function that fires on close of the terminal. TODO:
|
Struggled with this the entire day didnt get any further ;( |
I'm willing to do this for Hacktoberfest. Is this still available? |
@Project-Magenta Took a crack at it ages ago and didn't really get anywhere. Go ahead! |
Are we willing to introduce a new dependency of |
oh, btw Picoseconds is also me |
@lucleray can you add hacktoberfest tag so I can get a tshirt? |
Is this feature still requested and not solved? I'm not particularly great at Typescript & Javascript, but I might have some ideas on how I could go about solving this on Linux at least, given a little time. |
Alright, so I got it working, I will push a commit to my fork, there's another issue though, I don't have enough insight into the code base, but I will require to know these things;
I've tested this solution on Ubuntu, but it should work for most Linux dists, but I am not 100% certain of that right now. I've pushed it to my fork to the branch on request_close_on_live_children. Should I ask for a pull request now and amend as we go, or what? If anyone can answer my questions, I'll add the features above as well if that's desired by maintainers. I've also I believe figured out how to do this on Windows, but again, I need answers with respect to where events like "close tab/close pane" is handled. Is all that passed off to Electron? |
The action that gets dispatched to onCloseTab - how do I intervene before this/during this, so that I can run code on the "app" side so to speak? React is pretty convoluted and the functionality is spread across a vast array of files, so it's kind of hard for someone who has little knowledge of React/Redux to inject the behavior I want. For instance, in closeTab we can do rpc.emit('some-custom-function') but what I actually want, is to emit something to the app (or however it's supposed to be done) and wait for more user input (such as clicking Yes/No) before dispatching to userExitTermGroup - how do I do this? The problem I'm facing is, I can react to session exits etc, but that won't prevent React from removing the tab and thus making it impossible to stop the tab from disappearing, if it has a child process running, i.e. the message box opens after the tab is already gone since I'm reacting to an "exit" event. I've read about the middleware, but that isn't exactly making me any smarter on what to do. I'll send a pull request for the feature only involving when closing the entire window, unless someone can chime in here. |
I'm sending the pull request, later tonight, for the specific issue here - I won't add the functionality for when closing down tabs as there doesn't seem to be any reasonable way to implement this functionality that I am aware of. Could you be so kind to tag the pull request as hacktoberfest-accepted when I do? |
Related to #623. Would it be possible to have a prompt before quitting the app when a process is running? It could help to prevent quitting the app with an ongoing process that we won't be able to kill without manually killing the PID.
The text was updated successfully, but these errors were encountered: