mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
- separate the perl into a script of its own
- add per-pid notifier monitors, terminate when screen terminates
This commit is contained in:
parent
3120890148
commit
f08b1e6ccc
3 changed files with 10 additions and 13 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -7,9 +7,8 @@ byobu (3.7) unreleased; urgency=low
|
|||
usr/lib/byobu/notify_osd, usr/share/byobu/profiles/common,
|
||||
usr/share/man/man1/byobu.1:
|
||||
- add notify_osd support to byobu, LP: #669189
|
||||
* usr/lib/byobu/.notify_osd, usr/lib/byobu/notify_osd,
|
||||
usr/share/byobu/profiles/common: separate the perl into a script of
|
||||
its own
|
||||
- separate the perl into a script of its own
|
||||
- add per-pid notifier monitors, terminate when screen terminates
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 21 Oct 2010 12:09:14 -0500
|
||||
|
||||
|
|
|
@ -27,5 +27,5 @@ while (<STDIN>) {
|
|||
$msg =~ s/\s+/ /g; # collapse multi-whitespace into one
|
||||
$msg =~ s/\s+$//g; # strip trailing whitespace
|
||||
$msg =~ s/^\s+//g; # strip leading whitespace
|
||||
system("/usr/bin/screen", "-X", "at", "0", "echo", "[$msg]");
|
||||
system("/usr/bin/screen", "-X", "-S", "$ARGV[0]", "at", "*", "echo", "[$msg]");
|
||||
}
|
||||
|
|
|
@ -20,15 +20,13 @@
|
|||
|
||||
LOG="$HOME"/.cache/notify-osd.log
|
||||
|
||||
if [ "$1" = "--detail" ]; then
|
||||
cat "$LOG"
|
||||
exit 0
|
||||
fi
|
||||
case "$1" in
|
||||
--detail)
|
||||
cat "$LOG"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# This line operates basically as a daemon, watching the notify-osd log file,
|
||||
# processing new messages and sending them to screen
|
||||
if ! ps -ef | grep -qs "^$USER .*tail -n 0 -F \"$LOG\"$"; then
|
||||
tail -n 0 -F "$LOG" | /usr/lib/byobu/.notify_osd
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
tail --pid $PPID -n 0 -F $LOG | /usr/lib/byobu/.notify_osd "$PPID"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue