Difference between revisions of "User:B42"
m |
m |
||
| Line 1: | Line 1: | ||
My machine is ThinkPad R60 (9456-6FG), running Slackware 11. | My machine is ThinkPad R60 (9456-6FG), running Slackware 11. | ||
| − | If you have any problem with R60 and/or Slackware, feel free to | + | If you have any problem with R60 and/or Slackware, feel free to ask me;) |
jabber: b42 |atsign| njs |dot| netlab |dot| cz | jabber: b42 |atsign| njs |dot| netlab |dot| cz | ||
| Line 13: | Line 13: | ||
* FingerPrint Reader (i don't use pam, so it'll probably be difficult to setup) | * FingerPrint Reader (i don't use pam, so it'll probably be difficult to setup) | ||
* AHCI for SATA (using kernel 2.6.18, i had to turn it off in bios in order for sleep/wakeup to work) | * AHCI for SATA (using kernel 2.6.18, i had to turn it off in bios in order for sleep/wakeup to work) | ||
| + | |||
| + | |||
| + | |||
| + | my worthless script for showing battery status: (i use it with -s parameter in ion3 statusbar) | ||
| + | |||
| + | #!/bin/bash | ||
| + | |||
| + | SMAPI=/sys/devices/platform/smapi/BAT0 | ||
| + | ACPI=/proc/acpi/battery/BAT0 | ||
| + | |||
| + | if [ "$1" = "-s" ]; then | ||
| + | SHORT=1 | ||
| + | else | ||
| + | SHORT=0 | ||
| + | fi | ||
| + | |||
| + | STATE=`cat $SMAPI/state` | ||
| + | PERCENT=`cat $SMAPI/remaining_percent` | ||
| + | |||
| + | case "$STATE" in | ||
| + | "charging") | ||
| + | TIME=`cat $SMAPI/remaining_charging_time` | ||
| + | if [ "$TIME" = "not_charging" ]; then TIME="N/A"; fi | ||
| + | if [ $SHORT -eq 1 ]; then | ||
| + | echo "C:${PERCENT}%|${TIME}m" | ||
| + | else | ||
| + | echo "Charging: ${PERCENT}% (${TIME}m remaining)" | ||
| + | fi | ||
| + | ;; | ||
| + | "discharging") | ||
| + | TIME=`cat $SMAPI/remaining_running_time` | ||
| + | CAP=`cat $SMAPI/remaining_capacity` | ||
| + | RATE=`grep "present rate" $ACPI/state | egrep -o "[0-9]+"` | ||
| + | if [ "$TIME" = "not_discharging" ]; then TIME="N/A"; fi | ||
| + | if [ $SHORT -eq 1 ]; then | ||
| + | echo "D:${PERCENT}%|${TIME}m" | ||
| + | else | ||
| + | echo "Discharging: ${PERCENT}% (${TIME}m remaining, ${CAP}mWh/${FULL}mWh @ ${RATE}mW)" | ||
| + | fi | ||
| + | ;; | ||
| + | "idle") | ||
| + | if [ $SHORT -eq 1 ]; then | ||
| + | echo "I:${PERCENT}%" | ||
| + | else | ||
| + | echo "Idle: ${PERCENT}%" | ||
| + | fi | ||
| + | ;; | ||
| + | *) | ||
| + | if [ $SHORT -eq 1]; then | ||
| + | echo "BAT:?" | ||
| + | else | ||
| + | echo "Unknown state: $STATE" | ||
| + | fi | ||
| + | ;; | ||
| + | esac | ||
Revision as of 22:29, 2 November 2006
My machine is ThinkPad R60 (9456-6FG), running Slackware 11.
If you have any problem with R60 and/or Slackware, feel free to ask me;)
jabber: b42 |atsign| njs |dot| netlab |dot| cz
Things that don't work or i didn't try on my machine:
- FireWire (probably works, don't have any 1394 device)
- BlueTooth (ditto)
- PCMCIA/ExCard (ditto)
- Modem (umm, who needs a modem nowadays?)
- S-Video (will try ... sometime)
- FingerPrint Reader (i don't use pam, so it'll probably be difficult to setup)
- AHCI for SATA (using kernel 2.6.18, i had to turn it off in bios in order for sleep/wakeup to work)
my worthless script for showing battery status: (i use it with -s parameter in ion3 statusbar)
#!/bin/bash
SMAPI=/sys/devices/platform/smapi/BAT0
ACPI=/proc/acpi/battery/BAT0
if [ "$1" = "-s" ]; then
SHORT=1
else
SHORT=0
fi
STATE=`cat $SMAPI/state`
PERCENT=`cat $SMAPI/remaining_percent`
case "$STATE" in
"charging")
TIME=`cat $SMAPI/remaining_charging_time`
if [ "$TIME" = "not_charging" ]; then TIME="N/A"; fi
if [ $SHORT -eq 1 ]; then
echo "C:${PERCENT}%|${TIME}m"
else
echo "Charging: ${PERCENT}% (${TIME}m remaining)"
fi
;;
"discharging")
TIME=`cat $SMAPI/remaining_running_time`
CAP=`cat $SMAPI/remaining_capacity`
RATE=`grep "present rate" $ACPI/state | egrep -o "[0-9]+"`
if [ "$TIME" = "not_discharging" ]; then TIME="N/A"; fi
if [ $SHORT -eq 1 ]; then
echo "D:${PERCENT}%|${TIME}m"
else
echo "Discharging: ${PERCENT}% (${TIME}m remaining, ${CAP}mWh/${FULL}mWh @ ${RATE}mW)"
fi
;;
"idle")
if [ $SHORT -eq 1 ]; then
echo "I:${PERCENT}%"
else
echo "Idle: ${PERCENT}%"
fi
;;
*)
if [ $SHORT -eq 1]; then
echo "BAT:?"
else
echo "Unknown state: $STATE"
fi
;;
esac