mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -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/lib/byobu/notify_osd, usr/share/byobu/profiles/common,
|
||||||
usr/share/man/man1/byobu.1:
|
usr/share/man/man1/byobu.1:
|
||||||
- add notify_osd support to byobu, LP: #669189
|
- add notify_osd support to byobu, LP: #669189
|
||||||
* usr/lib/byobu/.notify_osd, usr/lib/byobu/notify_osd,
|
- separate the perl into a script of its own
|
||||||
usr/share/byobu/profiles/common: separate the perl into a script of
|
- add per-pid notifier monitors, terminate when screen terminates
|
||||||
its own
|
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 21 Oct 2010 12:09:14 -0500
|
-- 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; # collapse multi-whitespace into one
|
||||||
$msg =~ s/\s+$//g; # strip trailing whitespace
|
$msg =~ s/\s+$//g; # strip trailing whitespace
|
||||||
$msg =~ s/^\s+//g; # strip leading 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
|
LOG="$HOME"/.cache/notify-osd.log
|
||||||
|
|
||||||
if [ "$1" = "--detail" ]; then
|
case "$1" in
|
||||||
|
--detail)
|
||||||
cat "$LOG"
|
cat "$LOG"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# This line operates basically as a daemon, watching the notify-osd log file,
|
# This line operates basically as a daemon, watching the notify-osd log file,
|
||||||
# processing new messages and sending them to screen
|
# processing new messages and sending them to screen
|
||||||
if ! ps -ef | grep -qs "^$USER .*tail -n 0 -F \"$LOG\"$"; then
|
tail --pid $PPID -n 0 -F $LOG | /usr/lib/byobu/.notify_osd "$PPID"
|
||||||
tail -n 0 -F "$LOG" | /usr/lib/byobu/.notify_osd
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue