Gentoo Linux @ Floating Log 22.6.2005

2005-06-22

# ibm-acpi / radeontool

一段落ついたので、お遊び。 Fn+F4 (sleep ボタン)で液晶のバックライトをトグルする。

まずは acpi のイベントを拾う /etc/acpi/event/sleep

event=button/sleep
action=/etc/acpi/actions/lcd_ctrl.sh %e

そしてトグルを目印のファイルの有無で判断する /etc/acpi/actions/lcd_ctrl.sh

#!/bin/sh

if [ -e /etc/acpi/.off ]; then
    radeontool light on
    unlink /etc/acpi/.off
else
    touch /etc/acpi/.off
    radeontool light off
fi

本当にスリープさせたければこの辺を真似ればいいはず。

posted at 00:19:28    #
6月 2005
    1 2 3 4
5 6 7 8 91011
12131415161718
19202122232425
2627282930  
4月
2005
 7月
2005

自宅 PC に入れている Linux ディストリビューション。(GentooTMGentoo Technologies, Inc. の商標です。)

Feed Icon Letterimage

Python
Desktop
Server

© 2005-2007, Matsui Fe2+ Tetsushi