/** * Main.h: contains definitions for battery.c */ #define DEFAULT_LOG_INTERVAL 15 #define DEFAULT_LOG_INTERVAL_STRING "15" #define BAT_PATH "/sys/class/power_supply/BAT1/" #define CHARGE_NOW_PATH "charge_now" #define CHARGE_FULL_PATH "charge_full" #define ENERGY_NOW_PATH "energy_now" #define ENERGY_FULL_PATH "energy_full" #define VERSION "v0.2" #define TITLE "Battery Percentage, by Catluck Kettlemerry" #define PROGNAME "battery" #define USAGE0 "Usage:" #define USAGE1 "[OPTION...]" #define OPTIONS0 "Options:" #define OPTIONS1 "\t-v run verbosely" #define OPTIONS2 "\t-h show help and exit" #define OPTIONS3 "\t-t provide terse output" #define OPTIONS4 "\t-l Continuously log battery level every " DEFAULT_LOG_INTERVAL_STRING " seconds" #define OPTIONS5 "\t-i Set log interval to poll every seconds" #define OPTIONS6 "\t (This argument automatically activates continuous logging)" #define OPTIONS7 "\t-u (If the interval is less than 15 seconds, " PROGNAME " will refuse to run." #define OPTIONS8 "\t Specify -u to run anyway.)" #define OPTIONS9 "\t-w Warn the user if the battery charge drops below percent" #define OPTIONS10 "\t-p Print the effects of the given options for this invocation" #define MESGLEN 25