diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-11-16 20:09:23 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-11-16 20:09:23 +0100 |
commit | 5f7571b1f5ff1beccee4ce6a61f5641b42010a04 (patch) | |
tree | 0544cff9a5bca944fe717d92b2e2ffac0cdb5827 | |
parent | copying and license (diff) | |
download | adjbacklight-2.tar.gz adjbacklight-2.tar.bz2 adjbacklight-2.tar.xz |
misc + probe all backlights2
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r--[-rwxr-xr-x] | Adjbacklight.java | 2 | ||||
-rwxr-xr-x | adjbacklight | 5 |
3 files changed, 14 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b94d634 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/_/ + +*.class + +*~ +\#.\# +.\#* +*.swp +*.bak diff --git a/Adjbacklight.java b/Adjbacklight.java index 888beb6..7580208 100755..100644 --- a/Adjbacklight.java +++ b/Adjbacklight.java @@ -27,7 +27,7 @@ public class Adjbacklight { public static void main(final String... args) throws IOException { - String dir = "/sys/class/backlight/intel_backlight/"; + String dir = "/sys/class/backlight/" + args[2] + "/"; int width = Integer.parseInt(args[1]); int max = 0, min = 0, cur = 0; diff --git a/adjbacklight b/adjbacklight index ccbea3e..fa35b09 100755 --- a/adjbacklight +++ b/adjbacklight @@ -35,7 +35,10 @@ on the terminal, the following commands should reset it: stty -icanon -echo if [[ $? = 0 ]]; then echo -en '\033[?25l' - sudo java -cp ${BASH_SOURCE%/*} Adjbacklight `stty size` + ls -1 --color=no "/sys/class/backlight/" | + while read dir; do + sudo java -cp ${BASH_SOURCE%/*} Adjbacklight `stty size` "$dir" + done echo -en '\033[?25h' stty icanon echo else |