Commits

Fernando G N Rocha committed db0ee6d

Adicionado fligh_mode

  • Participants
  • Parent commits aa56c29

Comments (0)

Files changed (1)

File outros/flight_bat_mode.sh

+#!/bin/sh
+
+if [ $@ == "start" ]; then
+    kill='killall -9'
+    percent='10'
+    service="stop"
+    sudo iwconfig wlan0 txpower off
+    $kill firefox-bin 
+elif [ $@ == "stop" ]; then
+    kill=''
+    percent='100'
+    service="start"
+    sudo iwconfig wlan0 txpower on
+    firefox &
+else
+    echo "Usage: flight_mode start"
+    echo "       flight_mode stop"
+    exit
+fi
+
+sudo echo -n $percent | sudo tee /proc/acpi/video/VGA/LCD/brightness 
+$kill cairo-compmgr &
+sudo /etc/rc.d/wicd $service
+sudo /etc/rc.d/preload $service
+$kill xscreensaver &