nut/scripts/misc/osd-notify

36 lines
1 KiB
Text
Raw Normal View History

2010-03-25 23:20:59 +00:00
#!/bin/sh
# **********************************************************#
# osd-notify: script to make On Screen Display notification #
# **********************************************************#
# Copyright 2003 - Arnaud Quette #
# Distributed under the GNU GPL v2 #
# See attached file (osd-notify.txt) for usage information #
# **********************************************************#
# select your font with xfontsel
# ******************************
FONT="-adobe-courier-bold-*-*-*-34-*-100-*-*-*-*-*"
# Position
# ********
POSITION="-p middle -A center"
# Delay in seconds
# ****************
DELAY="10"
# Color
# *****
COLOR="red"
# You can use a combination of valid message values:
# $* => for full text
# $UPSNAME => for ups name
# $NOTIFYTYPE => depending on event (ONLINE, ONBATT, ...)
# *********************************************************************
MESSAGE="$*"
# Processing part
# ***************
echo $MESSAGE | osd_cat - -c $COLOR -f $FONT -d $DELAY $POSITION