aboutsummaryrefslogtreecommitdiffstats
path: root/Adjbacklight.java
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-01-20 19:24:27 +0100
committerMattias Andrée <maandree@operamail.com>2013-01-20 19:24:27 +0100
commit480cca16eda4a174240ac6c3bf9722f762791f03 (patch)
tree317d6b1ac1caf2496545fd2e3f6b2b5b19220bdd /Adjbacklight.java
parentbug fix (diff)
downloadadjbacklight-480cca16eda4a174240ac6c3bf9722f762791f03.tar.gz
adjbacklight-480cca16eda4a174240ac6c3bf9722f762791f03.tar.bz2
adjbacklight-480cca16eda4a174240ac6c3bf9722f762791f03.tar.xz
final touches
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Adjbacklight.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/Adjbacklight.java b/Adjbacklight.java
index 7580208..597b575 100644
--- a/Adjbacklight.java
+++ b/Adjbacklight.java
@@ -1,7 +1,7 @@
/**
* adjbacklight – Convient method for adjusting the backlight on your portable computer
*
- * Copyright © 2012 Mattias Andrée (maandree@kth.se)
+ * Copyright © 2012, 2013 Mattias Andrée (maandree@member.fsf.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,10 +21,18 @@ import java.util.*;
/**
- * @author Mattias Andrée, <a href="mailto:maandree@kth.se">maandree@kth.se</a>
+ * Interactive backlight adjustment
+ *
+ * @author Mattias Andrée, <a href="mailto:maandree@member.fsf.org">maandree@member.fsf.org</a>
*/
public class Adjbacklight
{
+ /**
+ * The is the main entry point of the program
+ *
+ * @param args Expects the three values: terminal height, terminal width, backlight device
+ * @throws IOException On error
+ */
public static void main(final String... args) throws IOException
{
String dir = "/sys/class/backlight/" + args[2] + "/";
@@ -95,6 +103,15 @@ public class Adjbacklight
}
}
+ /**
+ * Print the status
+ *
+ * @param min The minimum possible brightness
+ * @param max The maximum possible brightness
+ * @param init The brightness used when the program started
+ * @param cur The current brightness
+ * @param width The width of the terminal
+ */
private static void print(int min, int max, int init, int cur, int width)
{
String line = "──────────────────────────────────";