diff options
author | Cecil <knoppmyth@gmail.com> | 2012-05-14 01:38:13 (GMT) |
---|---|---|
committer | Cecil <knoppmyth@gmail.com> | 2012-05-14 01:38:13 (GMT) |
commit | 6fa6efd0975ac9e669ee73fe009c25fe739ac017 (patch) | |
tree | b4e1cdb3e3001a1209fe932b2e26db33b0ed9120 /abs/core/LinHES-system/lh_message.sh | |
parent | e465b073524b59ea2b795d525cf39675857cf2ee (diff) | |
parent | c04f2dfff3a4abbe0e3b4a7247f0001f797b07ac (diff) | |
download | linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.zip linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.tar.gz linhes_pkgbuild-6fa6efd0975ac9e669ee73fe009c25fe739ac017.tar.bz2 |
Merge branch 'testing' of git@linhes.org:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/LinHES-system/lh_message.sh')
-rw-r--r-- | abs/core/LinHES-system/lh_message.sh | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/lh_message.sh b/abs/core/LinHES-system/lh_message.sh new file mode 100644 index 0000000..203d127 --- /dev/null +++ b/abs/core/LinHES-system/lh_message.sh @@ -0,0 +1,65 @@ +#!/bin/bash +MYTH_RUN_STATUS="1" +. /etc/profile +. /etc/systemconfig + + +if [ -e /etc/X11/WINDOWMANAGER ] +then + . /etc/X11/WINDOWMANAGER +fi + + +. /etc/osd_cat.cfg || { + color=yellow + outline=2 + outlinecolour=black + shadow=0 + shadowcolour=black + font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" +} + +function delay_osd(){ + if [ x$STARTUP_STYLE = xmythvantage ] + then + cmd="ps -ef | grep -v grep | grep -q xmsg.py" + else + cmd="ps -ef | grep -v grep | grep -q osd_cat" + fi + + eval $cmd + + rc=$? + while [ $rc = 0 ] + do + eval $cmd + rc=$? + done + + + } + +function msg_osd(){ + DISPLAY=127.0.0.1:0 echo -e "$1" | DISPLAY=127.0.0.1:0 osd_cat --pos=middle --align=center --offset=200 --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font +} + +function msg_pyosd(){ + DISPLAY=127.0.0.1:0 /usr/LH/bin/xmsg.py -m "$1" +} + +function msg(){ + if [ x$STARTUP_STYLE = xmythvantage ] + then + msg_pyosd "$1" + else + msg_osd "$1" + fi + +} + +if [ x"${@}" = x ] +then + print "nothing to display" +else + msg "${@}" +fi |