~ubuntu-branches/debian/wheezy/byobu/wheezy

« back to all changes in this revision

Viewing changes to usr/lib/byobu/notify_osd

  • Committer: Package Import Robot
  • Author(s): Alexander Chernyakhovsky
  • Date: 2011-10-02 19:04:37 UTC
  • mfrom: (0.5.2 upstream) (0.1.145 oneiric)
  • Revision ID: package-import@ubuntu.com-20111002190437-apn9z04063rh052s
Tags: 4.37-1
* Syncing from Ubuntu.
* Switch to dh short syntax
* Change maintainer (adopting this package)
* Added a substvar ${perl:Depends} dependency into debian/control
* Bump standards version to 3.9.2, no changes 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
#
 
3
#    notify_osd: print notify-osd messages in the notification buffer
 
4
#
 
5
#    Copyright (C) 2010 Canonical Ltd.
 
6
#    Copyright (C) 2011 Dustin Kirkland
 
7
#
 
8
#    Authors: Dustin Kirkland <kirkland@ubuntu.com>
 
9
#             with help from Mathias Gug <mathias.gug@canonical.com>
 
10
#
 
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.
 
14
#
 
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.
 
19
#
 
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/>.
 
22
 
 
23
NOTIFY_OSD_LOG="$HOME"/.cache/notify-osd.log
 
24
 
 
25
__notify_osd_detail() {
 
26
        cat "$NOTIFY_OSD_LOG" || true
 
27
}
 
28
 
 
29
__notify_osd() {
 
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" &
 
35
}
 
36
 
 
37
# vi: syntax=sh ts=4 noexpandtab