diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-14 11:52:34 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-14 11:52:34 +0200 |
commit | 102a998d1c321870e5892066145900233da2f952 (patch) | |
tree | f7d27939ef5cad5ae5a8bfa8c3e7bbd5c3b1d8a2 /easy_e17.sh | |
parent | 2ebb5dc0ae38f056f8cd2075f2e597b10eb3fe16 (diff) | |
download | bin-102a998d1c321870e5892066145900233da2f952.zip bin-102a998d1c321870e5892066145900233da2f952.tar.gz |
easy_e17.sh: move set_title, set_notification functions
Diffstat (limited to 'easy_e17.sh')
-rw-r--r-- | easy_e17.sh | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/easy_e17.sh b/easy_e17.sh index 709ac07..a0e9ec0 100644 --- a/easy_e17.sh +++ b/easy_e17.sh @@ -56,6 +56,31 @@ online_source="http://omicron.homeip.net/projects/easy_e17/easy_e17.sh" # URL of # VISUAL ############################################################################# + +function set_title () +{ + if [ "$1" ]; then message="- $1"; fi + if [ "$DISPLAY" ]; then + case "$TERM" in + xterm*|rxvt*|Eterm|eterm|Aterm|aterm) + echo -ne "\033]0;Easy_e17.sh $message\007" + ;; + esac + fi +} + +function set_notification () +{ + if [ -z "$DISPLAY" ] || [ "$notification_disabled" ]; then return; fi + notifier="$install_path/bin/e-notify-send" + urgency=$1 + text=$2 + if [ -x "$notifier" ]; then + $notifier -u "$urgency" -t 5000 -i "$install_path/share/enlightenment/data/images/enlightenment.png" \ + -n "easy_e17.sh" "easy_e17.sh" "$text" &>/dev/null + fi +} + function header () { clear @@ -923,32 +948,6 @@ function error () exit 2 } -function set_title () -{ - if [ "$1" ]; then message="- $1"; fi - - if [ "$DISPLAY" ]; then - case "$TERM" in - xterm*|rxvt*|Eterm|eterm|Aterm|aterm) - echo -ne "\033]0;Easy_e17.sh $message\007" - ;; - esac - fi -} - -function set_notification () -{ - if [ -z "$DISPLAY" ] || [ "$notification_disabled" ]; then return; fi - notifier="$install_path/bin/e-notify-send" - urgency=$1 - text=$2 - - if [ -e "$notifier" ]; then - $notifier -u "$urgency" -t 5000 -i "$install_path/share/enlightenment/data/images/enlightenment.png" \ - -n "easy_e17.sh" "easy_e17.sh" "$text" &>/dev/null - fi -} - function logfile_banner () { cmd=$1 |