mirror of
https://github.com/gunchev/home_bin.git
synced 2025-11-20 12:15:46 +00:00
Remove backlight control scripts, not working any more.
The UPower interface got removed it seems.
This commit is contained in:
parent
fe54258919
commit
c59c498fcd
3 changed files with 0 additions and 49 deletions
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cur=$(dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness | sed s/...int32.//g)
|
||||
max=$(dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness | sed s/...int32.//g)
|
||||
|
||||
val=$(($cur - 1))
|
||||
if (($val >= 0)); then
|
||||
dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:$val
|
||||
notify-send -t 500 -i /usr/share/icons/HighContrast/scalable/devices/input-keyboard.svg "Brightness $val/$max"
|
||||
fi
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cur=$(dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness | sed s/...int32.//g)
|
||||
max=$(dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness | sed s/...int32.//g)
|
||||
|
||||
val=$(($cur + 1))
|
||||
if (($val <= $max)); then
|
||||
dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:$val
|
||||
notify-send -t 500 -i /usr/share/icons/HighContrast/scalable/devices/input-keyboard.svg "Brightness $val/$max"
|
||||
fi
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cur=$(dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetBrightness | sed s/...int32.//g)
|
||||
max=$(dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.GetMaxBrightness | sed s/...int32.//g)
|
||||
|
||||
if test -z "$1"; then
|
||||
echo "$0: Keyboard backlight: $cur / $max"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
incr)
|
||||
val=$(($cur + 1))
|
||||
lim=$(($val <= $max))
|
||||
;;
|
||||
decr)
|
||||
val=$(($cur - 1))
|
||||
lim=$(($val >= 0))
|
||||
;;
|
||||
*)
|
||||
val=$1
|
||||
lim=$(($val >= 0))
|
||||
;;
|
||||
esac
|
||||
|
||||
if (( "$lim" > 0 )); then
|
||||
echo "Setting Brightness to $val"
|
||||
dbus-send --print-reply=literal --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:$val
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue