dnkl/foot
41
2.0k
Fork
You've already forked foot
243

Feature - kill SIGTERM behavior - Ask user to confirm when an application is running #1473

Closed
opened 2023年08月21日 21:14:14 +02:00 by dbruneau · 8 comments

It would be nice if foot can prompt the user before closing (either via pressing "x" or through a "kill -s SIGTERM") when a program is running through it.

Here's an example of the behavior for KDE's Konsole:
image

Apologies if this is already possible. I have read through the man page for foot and foot.ini and didn't find anything close to this kind of feature.

Thanks in advance!

It would be nice if foot can prompt the user before closing (either via pressing "x" or through a "kill -s SIGTERM") **when a program is running through it.** Here's an example of the behavior for KDE's Konsole: ![image](/attachments/26e138d9-61e8-414d-8419-50ee3961a7c3) Apologies if this is already possible. I have read through the man page for foot and foot.ini and didn't find anything close to this kind of feature. Thanks in advance!
Collaborator
Copy link

The implementation of that konsole feature is rather hacky and still has open bugs from 2006.

The implementation of that konsole feature is rather [hacky] and still has open [bugs] from 2006. [hacky]: https://invent.kde.org/utilities/konsole/-/blob/aa63486de8318d29ca2fe7eb1841253689188f4f/src/session/Session.cpp#L1847-1857 [bugs]: https://bugs.kde.org/show_bug.cgi?id=134581
Owner
Copy link

I have to say I'm not really interested in playing the guessing game of trying to figure out whether there are still running applications or not (hint: there's always something running).

Especially when you start considering cases like foot nvim etc.

I have to say I'm not really interested in playing the guessing game of trying to figure out whether there are still running applications or not (hint: there's always something running). Especially when you start considering cases like `foot nvim` etc.

I totally understand. Thanks for the feedback.

Would an option to just always prompt before closing regardless of a process running or not make any sense? (I think that would get annoying pretty quickly...). Enabled via the config file.

If not then do close this issue/feature request!

Thanks again for your time.

I totally understand. Thanks for the feedback. Would an option to just always prompt before closing regardless of a process running or not make any sense? (I think that would get annoying pretty quickly...). Enabled via the config file. If not then do close this issue/feature request! Thanks again for your time.
Owner
Copy link

Given that we don't use any toolkit, I'd like to keep user facing GUI elements like this to a minimum.

I also don't think always warning is very useful. It'll only get annoying, and users are likely to either just disable it, or automatically dismiss it, regardless of whether something is running or not.

Given that we don't use any toolkit, I'd like to keep user facing GUI elements like this to a minimum. I also don't think always warning is very useful. It'll only get annoying, and users are likely to either just disable it, or automatically dismiss it, regardless of whether something is running or not.
dnkl 2023年08月31日 06:36:38 +02:00
  • closed this issue
  • added the
    wontfix
    label

Any way to run a script before closing? This could solve this problem, if the script could decide whether to close the window or not.

Any way to run a script before closing? This could solve this problem, if the script could decide whether to close the window or not.
Collaborator
Copy link

Any way to run a script before closing?

You'd need more than just a script that runs before closing to replicate that Konsole feature. It'd also need some way to communicate to foot "ignore this close operation".

... if the script could decide whether to close the window or not.

Only foot itself can "decide" that. Having the decision influenced by a different process would require some kind of IPC.

> Any way to run a script before closing? You'd need more than just a script that runs before closing to replicate that Konsole feature. It'd also need some way to communicate to foot "ignore this close operation". > ... if the script could decide whether to close the window or not. Only foot itself can "decide" that. Having the decision influenced by a different process would require some kind of IPC.

Yes, that was the idea, asking foot to abort closing the window. Is there currently any way to do this?

Yes, that was the idea, asking foot to abort closing the window. Is there currently any way to do this?
Collaborator
Copy link

Is there currently any way to do this?

No.

> Is there currently any way to do this? No.
Sign in to join this conversation.
No Branch/Tag specified
master
osc-5522
sixel-heap-buffer-overflow
releases/1.27
releases/1.26
releases/1.25
releases/1.24
multi-cursor
releases/1.23
pixman-16f-2
releases/1.22
releases/1.21
releases/1.20
releases/1.19
releases/1.18
releases/1.17
releases/1.16
releases/1.15
releases/1.14
releases/1.13
releases/1.12
releases/1.11
releases/1.10
releases/1.9
releases/1.8
releases/1.7
releases/1.6
releases/1.5
releases/1.4
releases/1.3
releases/1.2
releases/1.1
releases/1.0
1.27.0
1.26.1
1.26.0
1.25.0
1.24.0
1.23.1
1.23.0
1.22.3
1.22.2
1.22.1
1.22.0
1.21.0
1.20.2
1.20.1
1.20.0
1.19.0
1.18.1
1.18.0
1.17.2
1.17.1
1.17.0
1.16.2
1.16.1
1.16.0
1.15.3
1.15.2
1.15.1
1.15.0
1.14.0
1.13.1
1.13.0
1.12.1
1.12.0
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.9.2
1.9.1
1.9.0
1.8.2
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
0.9.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/foot#1473
Reference in a new issue
dnkl/foot
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?