mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-23 06:36:17 -07:00
usr/lib/byobu/.notify_osd, usr/lib/byobu/notify_osd,
usr/share/byobu/profiles/common: separate the perl into a script of its own
This commit is contained in:
parent
8a0d231c39
commit
90a7b74f9f
4 changed files with 40 additions and 7 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -7,6 +7,9 @@ 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,
|
||||||
|
usr/share/byobu/profiles/common: separate the perl into a script of
|
||||||
|
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
|
||||||
|
|
||||||
|
|
31
usr/lib/byobu/.notify_osd
Executable file
31
usr/lib/byobu/.notify_osd
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# .notify_osd: perform some string manipulation on notify-osd messages
|
||||||
|
# and then send to the screen message window
|
||||||
|
# Copyright (C) 2010 Canonical Ltd.
|
||||||
|
#
|
||||||
|
# Authors: Dustin Kirkland <kirkland@canonical.com>
|
||||||
|
# with help from Mathias Gug <mathias.gug@canonical.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
$/ = "\n\n";
|
||||||
|
while (<STDIN>) {
|
||||||
|
$msg = $_;
|
||||||
|
$msg =~ s/\[[^,]*, //;
|
||||||
|
$msg =~ s/ \] /: /;
|
||||||
|
$msg =~ s/\s+/ /g;
|
||||||
|
$msg =~ s/\s+$//g;
|
||||||
|
$msg =~ s/^\s+//g;
|
||||||
|
system("/usr/bin/screen", "-X", "at", "0", "echo", "[$msg]");
|
||||||
|
}
|
|
@ -27,9 +27,8 @@ fi
|
||||||
|
|
||||||
# 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
|
||||||
tail -n 0 -F "$LOG" | perl -e '
|
if ! ps -ef | grep -qs "^$USER .*tail -n 0 -F \"$LOG\"$"; then
|
||||||
$/ = "\n\n";
|
tail -n 0 -F "$LOG" | /usr/lib/byobu/.notify_osd
|
||||||
while (<STDIN>) {
|
else
|
||||||
$_ =~ s/^.*\]//;
|
exit 0
|
||||||
system("/usr/bin/screen -X at 0 echo \"$_\"");
|
fi
|
||||||
}'
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# Now, let's override with our customizations
|
# Now, let's override with our customizations
|
||||||
startup_message off
|
startup_message off
|
||||||
vbell off
|
vbell off
|
||||||
msgwait 1
|
msgwait 5
|
||||||
defutf8 on
|
defutf8 on
|
||||||
|
|
||||||
# Define status commands
|
# Define status commands
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue