Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
About: ------- Battmon is simple battery monitoring program written in python, especially for tiling window managers like xmonad, dwm or awesome. Features: ---------- - very light (for really basic functionality you need have only python installed) - works in background - very configurable - no tray icon - pop-up notifications (need libnotify) - options can be given through the command line (see battmon --help for details) - don't have to be run as root user Prerequisites: --------------- - python for basic functionality (>=3.2 and >=2.7 are supported, if you have another python version, install argparse from https://pypi.python.org/pypi/argparse) * Optional - libnotify: for pop up notifications - sox/pulseaudio: for playing sounds - screen locker application: to lock user session before hibernating/suspending - pm-utils: for hibernate, suspend or shutdown system on critical battery level (if not installed, the scripts in 'bin' directory will be used, see below) Usage: ------- - Just run python ./battmon.py - To see all available options run Battmon with `-h` or `--help` option. Notes: ------- - Currently systemd/upower isn't supported and probably will never be. - If you have pm-utils installed, then please remember that, following commands must been execute as a root user. To do so just edit `/etc/sudoers` file and add something similar like this, replacing 'username' with your own user name: your_username ALL = NOPASSWD: /usr/sbin/pm-hibernate your_username ALL = NOPASSWD: /usr/sbin/pm-suspend your_username ALL = NOPASSWD: /usr/sbin/pm-suspend-hybrid or enable it for a group, remember to replace group and <PATH_TO_BATTMON>: %your_group ALL = NOPASSWD: /usr/sbin/pm-hibernate %your_group ALL = NOPASSWD: /usr/sbin/pm-suspend %your_group ALL = NOPASSWD: /usr/sbin/pm-suspend-hybrid - If you don't have pm-utils installed, scripts in `bin` folder must be executed as a root, to allow regular user suspend, hibernate or shutdown computer. The easiest way to to do this, is to make this scripts accessible to normal user by running sudo without root password. To do so just edit `/etc/sudoers` file and add something like this, replacing username with your own user name and <PATH_TO_BATTMON> with absolute path to your Battmon folder: your_username ALL = NOPASSWD: <PATH_TO_BATTMON>/bin/suspend.sh your_username ALL = NOPASSWD: <PATH_TO_BATTMON>/bin/hibernate.sh your_username ALL = NOPASSWD: <PATH_TO_BATTMON>/bin/shutdown.sh or enable it for a group, remember to replace group and <PATH_TO_BATTMON>: %your_group ALL = NOPASSWD: <PATH_TO_BATTMON>/bin/suspend.sh %your_group ALL = NOPASSWD: <PATH_TO_BATTMON>/bin/hibernate.sh %your_group ALL = NOPASSWD: <PATH_TO_BATTMON>/bin/shutdown.sh - Sound file is search by default in the same path where battmon was started, you can change this by parsing your path to your sound file using `-sp` argument without quotes. - Battmon looks first for pulseaudio, then for sox. - You can specify your favor lock screen command using `-lp` argument in command line, if none given, then as default will be used first one found in `SCREEN_LOCK_COMMANDS` list variable in `config.py` file. You can also change default screenlock command editing `DEFAULT_SCREEN_LOCK_COMMAND` variable in `internal_config.py` file, but this will be overwritten when screen lock command was given in command line using `-lp` argument. Issues: -------- - Tell me ;)