battray man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

battray(1)							    battray(1)

NAME
       Battray -- Display an battery status notification tray icon

SYNOPSIS
       battray [-hv] [-p platform] [-d datadir] [-f configfile] [-i pol_inter‐
       val]

DESCRIPTION
       battray is a tray icon aka status icon to notify you  of	 your  battery
       status and do some action depending on it.

	     -h, --help
	       Display help message and exit.

	     -v, --version
	       Display version and exit.

	     -p, --platform
	       Use this platform file, normally this is autodetected.
	       Will be imported, so make sure it's in sys.path

	     -d, --datadir
	       Datadir to get icons and platform file from.

	     -f, --file
	       Configuration file to use. A configuration file is mandatory.

	     -i, --interval
	       Poll the system every n seconds.

CONFIGURATION
       The  configuration  file	 is  imported in Python, any valid Python code
       goes.  You don't need to specify your own configuration, a  basic  con‐
       servative configuration is included.

   Location
       The configuration file will be searched in the following locations. The
       first match wins:

	      ·	 Specified from commandline

	      ·	 ~/.battray/battrayrc.py

	      ·	 ~/.battrayrc.py

	      ·	 /usr/local/etc/battrayrc.py

	      ·	 /usr/local/etc/battray/battrayrc.py

	      ·	 /etc/battrayrc.py

	      ·	 /etc/battray/battrayrc.py

	      ·	 /usr/local/share/battray/battrayrc.py

	      ·	 /usr/local/share/examples/battray/battrayrc.py

	      ·	 /usr/share/battray/battrayrc.py

	      ·	 battrayrc.py

	      ·	 sys.path + /battray/battrayrc_default.py

   Generic options
       datadir (string)
	       Datadir to get icons and platform file from. Usually not
	       required.

       pollInterval (int)
	       Poll the system every n seconds.

   Available functions
       charging()
	       Return True if notebook is charging the battery

       ac()
	       Return True if notebook is connected to AC power

       percent()
	       Return percentage of battery time remaining

       lifetime()
	       Return remaining battery time in minutes

       switchedto()
	       Return 'battery' if we switched to battery since last poll.
	       'ac' if we  switched to ac since last poll.

       run(cmd)
	       Run cmd (string) in shell. Note: no escaping will be done on
	       the command.

       play(sound)
	       Play a sound. The path if relative to the datadir.

       playonce(sound, id)
	       Play a sound once until reset_playonce() is called for this id.
	       'id' can be any string.

       playonce(id)
	       Reset the playonce flag for the sound id

   Available variables
       icon = 'file.png'
	       Set icon to this file. Can be relative to datadir

       color = 'red|yellow|green'
	       Fill battery icon with  this  color.  Available	are  'yellow',
       'red',
	       and 'green'.

       blink = True|False
	       Set to True to blink the icon (Do not use is presence of
	       weeping angels!)

PLATFORM FILE
       Battray gets its data from using a command-line utility provided by the
       Operating System. Almost every OS a slightly different  utility	and/or
       to  fetch  the  battery	status, this is why we need a platform file to
       imple- ment each platform.

       These files are imported (and reload()-ed  when	needed)	 by  the  main
       script. Any valid Python syntax goes.

       List of mandatory variables, these must be present:

       ac (bool)
	       Connected to AC? None if unknown.

       percent (int)
	       Battery power remaining in percent. 255 if unknown.

       lifetime (int)
	       Battery time remaining in minutes. 255 if unknown.

       charging (bool)
	       Are we charging the battery? None if unknown.

       Optional variables, these will just be ignored if not set:

       tooltip (string)
	       Additional info in the tooltip.

BUGS
	      ·	 Multiple batteries are not supported.

SEE ALSO
       python(1), apm(8), acpidump(8), apm(4), acpi(4)

AUTHORS
	      ·	 Martin Tournoij <martin@arp242.net>

	      ·	 Linux support by Andy Mikhaylenko <andy@neithere.net>

	      ·	 Keith W. Blackwell a.k.a. zimbot from freesound.org

       Feel  free  to  use,  modify,  and redistribute battray as you see fit.
       There are no restrictions.

Martin Tournoij <;martin@arp242.netBattray 1.5			    battray(1)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net