#exit #applications #graphical #window #ask #tell #apps

app kill-desktop

礼貌等待图形应用程序退出

7 个版本

0.3.4 2020年2月23日
0.3.3 2020年2月22日
0.3.2 2019年10月27日
0.3.1 2019年9月22日
0.1.0 2018年10月8日

#1050GUI

MIT/Apache

26KB
592 代码行

kill-desktop

Build status

kill-desktop 帮助您退出图形应用程序而不会丢失数据。它可以请求应用程序退出,告诉它们退出,并退出它们。

配置

必须有一个配置文件。应用程序首选 xdg 目录,然后是 .

没有配置启动它,它会创建并使用一个

I couldn't find a config file at any of these locations:
 * "/home/faux/.config/kill-desktop/config.toml"
 * "/home/faux/.kill-desktop.toml"
 * "kill-desktop.toml"

So.. I'm going to make you one. I hope you like it:
 * "/home/faux/.config/kill-desktop/config.toml"
Done!

演示

kill-desktop 显示当前系统的状态,并提供一些选项

$ kill-desktop
📫 gedit - Untitled Document 1 - gedit
📫 google-chrome - quad.pe - Google Chrome
📭 slack - Slack
📫 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
📫 sun-awt-X11-XFramePeer - kill-desktop [~/code/kill-desktop] - .../src/main.rs [kill-desktop] - IntelliJ

这里,我们可以看到许多正在运行的应用程序。这个视图会实时更新。

您将要求执行一个操作。让我们要求所有人优雅地关闭

Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit? a
Asking everyone to quit.

应用程序开始关闭

📫 google-chrome - quad.pe - Google Chrome
📭 slack - Slack
📭 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
📫 sun-awt-X11-XFramePeer - kill-desktop [~/code/kill-desktop] - .../src/main.rs [kill-desktop] - IntelliJ
Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit?

gedit 已关闭,slackSpotify 正在考虑。

📭 google-chrome - quad.pe - Google Chrome
📭 slack - Slack
📭 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
📫 sun-awt-X11-XFramePeer - kill-desktop [~/code/kill-desktop] - .../src/main.rs [kill-desktop] - IntelliJ
Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit?

google-chrome 已唤醒并正在考虑。

📭 google-chrome - quad.pe - Google Chrome
📭 slack - Slack
📭 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
📫 sun-awt-X11-XFramePeer - IntelliJ IDEA
Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit?

它们正在关闭!

📭 slack - Slack
📭 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
📫 sun-awt-X11-XFramePeer - IntelliJ IDEA
Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit?
📭 slack - Slack
📭 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
📭 sun-awt-X11-XFramePeer - IntelliJ IDEA
Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit?

... 很慢 ...

📭 slack - Slack
📭 spotify - XYconstant - Do It Well (feat. Tom Aspaul)
Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit?
📭 slack - Slack

啊哈,只剩下 slack,它已经关闭了窗口。但它还没有退出。这正是我们想要的。让我们 告诉 它退出。

Apply to all: [a]sk to exit/[a]lt+f4, [t]ell to exit/[t]erm, [k]ill, or [q]uit? t
Telling everyone to quit.
No applications found, exiting.

最后,它消失了,我们可以放心地重启。

依赖项

~8–11MB
~205K SLoC