3
# notify_osd: print notify-osd messages in the notification buffer
5
# Copyright (C) 2010 Canonical Ltd.
6
# Copyright (C) 2011 Dustin Kirkland
8
# Authors: Dustin Kirkland <kirkland@ubuntu.com>
9
# with help from Mathias Gug <mathias.gug@canonical.com>
11
# This program is free software: you can redistribute it and/or modify
12
# it under the terms of the GNU General Public License as published by
13
# the Free Software Foundation, version 3 of the License.
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
# GNU General Public License for more details.
20
# You should have received a copy of the GNU General Public License
21
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23
NOTIFY_OSD_LOG="$HOME"/.cache/notify-osd.log
25
__notify_osd_detail() {
26
cat "$NOTIFY_OSD_LOG" || true
30
# This line operates basically as a daemon, watching the notify-osd log file,
31
# processing new messages and sending them to the session
32
CMD="tail --pid $PPID -n 0 -F $NOTIFY_OSD_LOG"
33
pkill -f "$CMD" || true
34
$CMD | $BYOBU_PREFIX/lib/byobu/.notify_osd "$PPID" &
37
# vi: syntax=sh ts=4 noexpandtab