Replies: 7 comments
-
for tab and os window: for kitty window: Is this what you need? |
Beta Was this translation helpful? Give feedback.
-
No, that's not what I need. I need no confirmation of closing, except when there are processes running other than the shell whose prompt I am looking at. The question of whether the window I just accidentally closed is the "last" visible one is irrelevant, as is the question of how many other windows or tabs or OS windows are currently open. |
Beta Was this translation helpful? Give feedback.
-
E.g., open up |
Beta Was this translation helpful? Give feedback.
-
The screenshot you posted is confirming the closure of the window. Why do you say that you don't need to confirm the closing? If you're just idling, it won't even let you confirm the closure. Setting the value to -1 is confirming the closing of every window that is not idle in the shell. You can assume that this is not relevant to the number of windows remaining. EDIT: I see, what I mentioned here are all features in master and related to shell integration. You need to use the nightly version. And the link to the official site is for the current release, there are no instructions for using -1. You need to check the documentation in the repository for this usage. And for the confirmation of closing kitty window: |
Beta Was this translation helpful? Give feedback.
-
I didn't say that. I said I don't need to confirm all closings, only some of them. |
Beta Was this translation helpful? Give feedback.
-
Run from master with shell integration enabled and set confirm_close_os_window to -1
|
Beta Was this translation helpful? Give feedback.
-
Thanks to you both for that pointer; I'll take it for a spin around the block. |
Beta Was this translation helpful? Give feedback.
-
Sorry if this is a dumb question, but I'm new to kitty.
I'm switching to linux from macOS. This means I've long been accustomed to my terminal emulator (be it iTerm2.app or Terminal.app) shouting at me if I accidentally hit "Cmd-w" to close a tab/window while some process other than the original shell (or one of a customizable short list) is still running in that tab/window. By "shouting", I mean that I get a dialog box giving me a chance to cancel the closure.
To my great shock, only some terminal emulators on linux have this (e.g. konsole, gnome-terminal, sakura), and since I don't use those I've lost some important stuff by accident.
Kitty lacks this feature, and I'd guess that's because having such a shouting mechanism would require hooking into some particular GUI toolkit (perhaps GTK or QT) which is no fun. I understand and admire this!
However, I can't keep risking blowing away e.g. an rsync session by accident, with no warning. I'd like to solve this within kitty rather than by trying to add special handling into my WM to intercept keystrokes that normally would close a kitty window, or using some other external workaround.
So my question (finally) is this: is it possible to cook up something using the remote-control/kitten facilities that would play the same role as the shouting dialog box? Perhaps by letting a script present the choice to me via rofi or dmenu, with that choice returned to kitty?
Please don't think I'm asking for someone to take the trouble to cook it up for me; I just want to know, before I dive into the docs and start attempting to cook, whether such an attempt is doomed to failure.
Beta Was this translation helpful? Give feedback.
All reactions