Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Battery watcher and observer for Mac and Linux laptop.

NAME

battery-watchd - battery watcher and observer for Mac and Linux laptop

SYNOPSIS

battery-watchd &

OPTIONS

--watch-percents

battery-watchd --watch-percents=5,10,15,20

Specify watch percents separated by comma.

--imkayac-config

battery-watchd --imkayac-config=/path/to/config.yml

Specify your ImKayac config file path.

Default path is "$ENV{HOME}/.imkayac.yml".

This file format is YAML format. See below CONFIG FILE SYNTAX section.

--interval

battery-watchd --interval=600

Specify watching interval seconds.

Default may be 600 seconds. You confirm it by following command.

grep DEFAULT_INTERAVAL `which battery-watched`

CONFIG FILE SYNTAX

You can give a battery state by ImKayac. So you have to tell this program ImKayac setting. This program gives ImKayac setting file of YAML file. It syntax is same as WebService::ImKayac::Simle's format.

Setting file's path is below "--imkayac-config" section.

DEPENDENCIES

AnyEvent, Cocoa::Growl, WebService::ImKayac::Simple, and some Perl5 core modules.

COPYRIGHT AND LICENSE

Copyright (C) 2014 by OGATA Tetsuji

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment