diff options
author | Ben Liblit <liblit@cs.wisc.edu> | 2015-05-28 03:10:56 -0500 |
---|---|---|
committer | Ben Liblit <liblit@cs.wisc.edu> | 2015-05-28 03:10:56 -0500 |
commit | 5c4acc8ee1485e40b00ea0578aeff338078cfb8b (patch) | |
tree | 615abee2f94239d9500e561e49ef3656545f2895 /wutil.cpp | |
parent | 92a9ba478babc0e2c0bfbc7dab319f8c946d65fe (diff) |
Notify vte-based terminals when a command completes.
Notification is sent using an OSC 777 escape sequence as described at
http://known.phyks.me/2014/local-notifications-for-weechat-and-urxvt.
The specific notification is crafted to match that emitted by bash
when running under Fedora 22 with the "vte-profile" RPM installed.
See the code for "__vte_prompt_command" starting at
http://pkgs.fedoraproject.org/cgit/vte291.git/tree/vte291-command-notify.patch#n307
to see exactly what bash produces. My approach is, however, a bit
more paranoid about control characters embedded in commands.
Gnome-terminal 3.16 responds to this escape sequence by posting a
desktop notification if the containing terminal window does not have
focus. This lets the user know that a long-running background command
has completed. Job notification is promoted as a Fedora 22 feature
(http://fedoramagazine.org/terminal-job-notifications-in-fedora-22-workstation/),
so it would be good for fish users to be benefit from it.
Conversely, anyone who does not want this feature can use "functions
--erase __notify_vte_command_completed" to turn it off.
Diffstat (limited to 'wutil.cpp')
0 files changed, 0 insertions, 0 deletions