summaryrefslogtreecommitdiff
path: root/xbacklight.c
diff options
context:
space:
mode:
Diffstat (limited to 'xbacklight.c')
-rw-r--r--xbacklight.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xbacklight.c b/xbacklight.c
index 4f384cc..21cca72 100644
--- a/xbacklight.c
+++ b/xbacklight.c
@@ -19,6 +19,11 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
@@ -44,6 +49,7 @@ usage (int exitcode)
" where options are:\n"
" -display <display> or -d <display>\n"
" -help\n"
+ " -version\n"
" -set <percentage> or = <percentage>\n"
" -inc <percentage> or + <percentage>\n"
" -dec <percentage> or - <percentage>\n"
@@ -200,6 +206,11 @@ main (int argc, char **argv)
{
usage (0);
}
+ if (!strcmp (argv[i], "-version"))
+ {
+ puts (PACKAGE_STRING);
+ exit (0);
+ }
fprintf(stderr, "%s: unrecognized argument '%s'\n",
program_name, argv[i]);
usage (1);