mpalourdio / xps13

:neckbeard: DELL xps13 2015 (9343) Linux Support
324 stars 24 forks source link

ideas to improve this? #81

Open ikuria opened 8 years ago

ikuria commented 8 years ago
export DISPLAY=:0
export XAUTHORITY=/home/ikuria/.Xauthority

case "${1}" in
    true) #battery_mode
        echo 1 > /sys/class/backlight/intel_backlight/brightness &
        echo 10s > /sys/class/leds/dell::kbd_backlight/stop_timeout &
        echo 0 > /sys/class/leds/dell::kbd_backlight/brightness &
        su -p -c 'notify-send --hint=int:transient:1 -i "battery-full-symbolic" "Laptop läuft jetzt über Akku" $
;;
    false) #ac_mode
        echo 937 > /sys/class/backlight/intel_backlight/brightness &
        echo 2 > /sys/class/leds/dell::kbd_backlight/brightness &
        echo 120m > /sys/class/leds/dell::kbd_backlight/stop_timeout &
        su -p -c 'notify-send --hint=int:transient:1 -i "goa-panel-symbolic" "Laptop mit Netzteil verbunden" "S$
esac

:D

doreato commented 8 years ago

What is this exactly? Configs depending on the state of the computer? I would love to have this if you could elaborate on what it does more specifically and how to install.

ikuria commented 8 years ago

ac cable not plugged: set screenbacklight to lowest set keyboard light to off + 10seconds for enable by fn key notify all the stuff

ac cable plugged set screenbacklight to highest set keyboard light to highest and remove the timeout to "always on" notify all the stuff

ikuria commented 8 years ago

i'm on linux mint 18 now and there is system.d now working, is there any way to detect pluggin ac event to get the script to work?