diff --git a/README b/README index f9051b1..cc1f0d9 100644 --- a/README +++ b/README @@ -22,7 +22,7 @@ Application Options: -i, --icon-type Set icon type ('standard', 'notification' or 'symbolic') -l, --low-level Set low battery level (in percent) -r, --critical-level Set critical battery level (in percent) - -e, --command-low-level Command to execute when low battery level is reached + -o, --command-low-level Command to execute when low battery level is reached -c, --command-critical-level Command to execute when critical battery level is reached -x, --command-left-click Command to execute when left clicking on tray icon -n, --hide-notification Hide the notification popups @@ -47,8 +47,7 @@ Examples: cbatticon -t cbatticon -p cbatticon -u 20 -i notification -c "poweroff" -l 15 -r 3 - # if xbacklight is installed - cbatticon -u 20 -i notification -r 3 -c "poweroff" -l 15 -r "xbacklight = 5" + cbatticon -u 20 -i notification -r 3 -c "poweroff" -l 15 -o "xbacklight = 5" Thanks to: diff --git a/cbatticon.1 b/cbatticon.1 index 5a4a1a3..f35507b 100644 --- a/cbatticon.1 +++ b/cbatticon.1 @@ -29,6 +29,8 @@ Specify the low level percentage of the battery. The default is set to 20%. .IP "\fB-n\fP, \fB\-\-hide-notification\fP" 5 Hide the notification popups. +.IP "\fB\-o\fP, \fB\-\-command-low-level\fP \fIcommand\fR" 5 +Specify the command to execute when the low battery level is reached. .IP "\fB-p\fP, \fB\-\-list-power-supplies\fP" 5 List the available power supplies on your system. .IP "\fB\-r\fP, \fB\-\-critical-level\fP \fIpercentage\fR" 5 diff --git a/cbatticon.c b/cbatticon.c index 772dfd7..95afbc6 100644 --- a/cbatticon.c +++ b/cbatticon.c @@ -166,7 +166,7 @@ static gint get_options (int argc, char **argv) { "icon-type" , 'i', 0, G_OPTION_ARG_STRING, &icon_type_string , N_("Set icon type ('standard', 'notification' or 'symbolic')") , NULL }, { "low-level" , 'l', 0, G_OPTION_ARG_INT , &configuration.low_level , N_("Set low battery level (in percent)") , NULL }, { "critical-level" , 'r', 0, G_OPTION_ARG_INT , &configuration.critical_level , N_("Set critical battery level (in percent)") , NULL }, - { "command-low-level" , 'e', 0, G_OPTION_ARG_STRING, &configuration.command_low_level , N_("Command to execute when low battery level is reached") , NULL }, + { "command-low-level" , 'o', 0, G_OPTION_ARG_STRING, &configuration.command_low_level , N_("Command to execute when low battery level is reached") , NULL }, { "command-critical-level", 'c', 0, G_OPTION_ARG_STRING, &configuration.command_critical_level, N_("Command to execute when critical battery level is reached"), NULL }, { "command-left-click" , 'x', 0, G_OPTION_ARG_STRING, &configuration.command_left_click , N_("Command to execute when left clicking on tray icon") , NULL }, #ifdef WITH_NOTIFY