相关疑难解决方法(0)

一个过程完成后如何发出声音?

我通过终端开始了一个漫长的过程。进程完成后是否可以让 Ubuntu 终端发出声音?这样,我不需要继续检查,而是会通过声音收到通知。

notification command-line

144
推荐指数
7
解决办法
10万
查看次数

长时间运行的命令完成时的桌面通知

每当运行超过 15 秒的命令在交互式 shell 中完成时,我都希望收到桌面通知。

换句话说,我希望所有命令都包含在这样的东西中

start=$(date +%s);
ORIGINAL_COMMAND;
[ $(($(date +%s) - start)) -le 15 ] || notify-send "Long running command finished"
Run Code Online (Sandbox Code Playgroud)

在 bash 中完成此任务的最佳方法是什么?

notification bash

65
推荐指数
5
解决办法
2万
查看次数

标签 统计

notification ×2

bash ×1

command-line ×1