Bug#745671: [acpi-support] Please add support for apple brightness

2014-06-18 Thread Michael Meskes
 Please add support for apple brightness
 ...

In the future please send a diff against acpi-support source, not just a binary
file. If you do not know how to, it's easier if you send the files instead of a
diff against an empty file.

This by itself is not a problem, but the patch needs a bit more work, I think.

The smaller piece is, would it be possible for you to remove the bash 
dependency, if there really is one, I didn't check?

The larger problem I see is that the patch contains four scripts but no way to
call on them. There seems to be no events file in the patch, nor are the
scripts used by any other script. So how are they supposed to be used?

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#745671: [acpi-support] Please add support for apple brightness

2014-04-23 Thread Roman V. Nikolaev
Package: acpi-support
Version: 0.141-2
Severity: wishlist
Tags: patch

Please add support for apple brightness


--- System information. ---
Architecture: amd64
Kernel:   Linux 3.12.16unera

Debian Release: 7.4
  990 stable  ftp.de.debian.org
  500 unstableftp.de.debian.org
  500 testing-proposed-updates ftp.de.debian.org
  500 testing ftp.de.debian.org
  500 stable-updates  ftp.de.debian.org
  500 proposed-updates ftp.de.debian.org
  500 oldstable   www.deb-multimedia.org
  500 nowtaxi debian.nowtaxi.ru
  100 wheezy-backports ftp.de.debian.org
1 experimentalftp.de.debian.org

--- Package information. ---
Depends  (Version) | Installed
==-+-=
acpi-support-base (= 0.109-1) | 0.140-5
x11-xserver-utils  | 7.7+2
acpid   (= 1.0.4) | 1:2.0.16-1+deb7u1
lsb-base(= 1.3-9) | 4.1+Debian12
pm-utils   | 1.4.1-9
acpi-fakekey   | 0.141-2


Recommends (Version) | Installed
-+-===
rfkill   |
xscreensaver | 5.26-1
 OR gnome-screensaver|


Suggests(Version) | Installed
=-+-===
radeontool| 1.6.2-1.1
vbetool   | 1.1-2
xinput| 1.6.0-1
diff --new-file -u ./apple-brightness-down.sh /etc/acpi/apple-brightness-down.sh
--- ./apple-brightness-down.sh	1970-01-01 03:00:00.0 +0300
+++ /etc/acpi/apple-brightness-down.sh	2013-05-15 02:20:18.828364559 +0400
@@ -0,0 +1,23 @@
+#!/bin/bash
+# TODO: Change above to /bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+MAX=$(cat /sys/class/backlight/gmux_backlight/max_brightness)
+BRIGHTNESS=$(cat /sys/class/backlight/gmux_backlight/brightness)
+
+STEP=$(( $MAX / 10 ))
+if [ $STEP -le 0 ]; then
+STEP=1
+fi
+
+if [ $BRIGHTNESS -le 0 ]; then
+exit 0
+fi
+
+BRIGHTNESS=$(( $BRIGHTNESS - $STEP ))
+if [ $BRIGHTNESS -le 0 ]; then
+BRIGHTNESS=0
+fi
+
+echo $BRIGHTNESS   /sys/class/backlight/gmux_backlight/brightness
diff --new-file -u ./apple-brightness-up.sh /etc/acpi/apple-brightness-up.sh
--- ./apple-brightness-up.sh	1970-01-01 03:00:00.0 +0300
+++ /etc/acpi/apple-brightness-up.sh	2013-05-15 02:19:03.374180984 +0400
@@ -0,0 +1,23 @@
+#!/bin/bash
+# TODO: Change above to /bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+MAX=$(cat /sys/class/backlight/gmux_backlight/max_brightness)
+BRIGHTNESS=$(cat /sys/class/backlight/gmux_backlight/brightness)
+
+STEP=$(( $MAX / 10 ))
+if [ $STEP -le 0 ]; then
+STEP=1
+fi
+
+if [ $BRIGHTNESS -ge $MAX ]; then
+exit 0
+fi
+
+BRIGHTNESS=$(( $BRIGHTNESS + $STEP ))
+if [ $BRIGHTNESS -gt $MAX ]; then
+BRIGHTNESS=$MAX
+fi
+
+echo $BRIGHTNESS   /sys/class/backlight/gmux_backlight/brightness
diff --new-file -u ./apple-kbd-brightness-down.sh /etc/acpi/apple-kbd-brightness-down.sh
--- ./apple-kbd-brightness-down.sh	1970-01-01 03:00:00.0 +0300
+++ /etc/acpi/apple-kbd-brightness-down.sh	2013-09-04 04:23:52.109288861 +0400
@@ -0,0 +1,23 @@
+#!/bin/bash
+# TODO: Change above to /bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+MAX=$(cat /sys/class/leds/smc::kbd_backlight/max_brightness)
+BRIGHTNESS=$(cat /sys/class/leds/smc::kbd_backlight/brightness)
+
+STEP=$(( $MAX / 10 ))
+if [ $STEP -le 0 ]; then
+STEP=1
+fi
+
+if [ $BRIGHTNESS -le 0 ]; then
+exit 0
+fi
+
+BRIGHTNESS=$(( $BRIGHTNESS - $STEP ))
+if [ $BRIGHTNESS -le 0 ]; then
+BRIGHTNESS=0
+fi
+
+echo $BRIGHTNESS   /sys/class/leds/smc::kbd_backlight/brightness
diff --new-file -u ./apple-kbd-brightness-up.sh /etc/acpi/apple-kbd-brightness-up.sh
--- ./apple-kbd-brightness-up.sh	1970-01-01 03:00:00.0 +0300
+++ /etc/acpi/apple-kbd-brightness-up.sh	2013-09-04 04:24:29.028393391 +0400
@@ -0,0 +1,23 @@
+#!/bin/bash
+# TODO: Change above to /bin/sh
+
+test -f /usr/share/acpi-support/key-constants || exit 0
+
+MAX=$(cat /sys/class/leds/smc::kbd_backlight/max_brightness)
+BRIGHTNESS=$(cat /sys/class/leds/smc::kbd_backlight/brightness)
+
+STEP=$(( $MAX / 10 ))
+if [ $STEP -le 0 ]; then
+STEP=1
+fi
+
+if [ $BRIGHTNESS -ge $MAX ]; then
+exit 0
+fi
+
+BRIGHTNESS=$(( $BRIGHTNESS + $STEP ))
+if [ $BRIGHTNESS -gt $MAX ]; then
+BRIGHTNESS=$MAX
+fi
+
+echo $BRIGHTNESS   /sys/class/leds/smc::kbd_backlight/brightness


signature.asc
Description: OpenPGP digital signature