144e1285cSBrad Davis# 244e1285cSBrad Davis# PowerPC Apple specific devd events 344e1285cSBrad Davis 444e1285cSBrad Davis# Keyboard power key 544e1285cSBrad Davisnotify 0 { 644e1285cSBrad Davis match "system" "PMU"; 744e1285cSBrad Davis match "subsystem" "Button"; 844e1285cSBrad Davis action "shutdown -p now"; 944e1285cSBrad Davis}; 1044e1285cSBrad Davis 1144e1285cSBrad Davis 1244e1285cSBrad Davis# PowerBook and iBook lid close. 1344e1285cSBrad Davisnotify 0 { 1444e1285cSBrad Davis match "system" "PMU"; 1544e1285cSBrad Davis match "subsystem" "lid"; 1644e1285cSBrad Davis match "type" "close"; 1744e1285cSBrad Davis action "shutdown -p now"; 1844e1285cSBrad Davis}; 1944e1285cSBrad Davis 2044e1285cSBrad Davis 2144e1285cSBrad Davis# The next blocks enable brightness hotkeys that can be found on Apple laptops 2244e1285cSBrad Davisnotify 0 { 2344e1285cSBrad Davis match "system" "PMU"; 2444e1285cSBrad Davis match "subsystem" "keys"; 2544e1285cSBrad Davis match "type" "brightness"; 2644e1285cSBrad Davis match "notify" "down"; 2744e1285cSBrad Davis action "sysctl dev.backlight.0.level=\ 2844e1285cSBrad Davis $(expr `sysctl -n dev.backlight.0.level` - 10)"; 2944e1285cSBrad Davis}; 3044e1285cSBrad Davis 3144e1285cSBrad Davisnotify 0 { 3244e1285cSBrad Davis match "system" "PMU"; 3344e1285cSBrad Davis match "subsystem" "keys"; 3444e1285cSBrad Davis match "type" "brightness"; 3544e1285cSBrad Davis match "notify" "up"; 3644e1285cSBrad Davis action "sysctl dev.backlight.0.level=\ 3744e1285cSBrad Davis $(expr `sysctl -n dev.backlight.0.level` + 10)"; 3844e1285cSBrad Davis}; 3944e1285cSBrad Davis 4044e1285cSBrad Davis 4144e1285cSBrad Davis# The next blocks enable volume hotkeys that can be found on Apple laptops 4244e1285cSBrad Davisnotify 0 { 4344e1285cSBrad Davis match "system" "PMU"; 4444e1285cSBrad Davis match "subsystem" "keys"; 4544e1285cSBrad Davis match "type" "mute"; 46d5ad1713SHans Petter Selasky action "mixer vol.mute=^"; 4744e1285cSBrad Davis}; 4844e1285cSBrad Davis 4944e1285cSBrad Davisnotify 0 { 5044e1285cSBrad Davis match "system" "PMU"; 5144e1285cSBrad Davis match "subsystem" "keys"; 5244e1285cSBrad Davis match "type" "volume"; 5344e1285cSBrad Davis match "notify" "down"; 54*4014365eSKyle Evans action "mixer vol.volume=-10%"; 5544e1285cSBrad Davis}; 5644e1285cSBrad Davis 5744e1285cSBrad Davisnotify 0 { 5844e1285cSBrad Davis match "system" "PMU"; 5944e1285cSBrad Davis match "subsystem" "keys"; 6044e1285cSBrad Davis match "type" "volume"; 6144e1285cSBrad Davis match "notify" "up"; 62*4014365eSKyle Evans action "mixer vol.volume=+10%"; 6344e1285cSBrad Davis}; 6444e1285cSBrad Davis 6544e1285cSBrad Davis# Eject key 6644e1285cSBrad Davisnotify 0 { 6744e1285cSBrad Davis match "system" "PMU"; 6844e1285cSBrad Davis match "subsystem" "keys"; 6944e1285cSBrad Davis match "type" "eject"; 7044e1285cSBrad Davis action "camcontrol eject cd0"; 7144e1285cSBrad Davis}; 7244e1285cSBrad Davis 7344e1285cSBrad Davis# Equivalent to the ACPI/ACAD notify 7444e1285cSBrad Davisnotify 10 { 7544e1285cSBrad Davis match "system" "PMU"; 7644e1285cSBrad Davis match "subsystem" "POWER"; 7744e1285cSBrad Davis match "type" "ACLINE"; 7844e1285cSBrad Davis action "service power_profile $notify"; 7944e1285cSBrad Davis}; 80