1# $FreeBSD$ 2# 3# PowerPC Apple specific devd events 4 5# Keyboard power key 6notify 0 { 7 match "system" "PMU"; 8 match "subsystem" "Button"; 9 action "shutdown -p now"; 10}; 11 12 13# PowerBook and iBook lid close. 14notify 0 { 15 match "system" "PMU"; 16 match "subsystem" "lid"; 17 match "type" "close"; 18 action "shutdown -p now"; 19}; 20 21 22# The next blocks enable brightness hotkeys that can be found on Apple laptops 23notify 0 { 24 match "system" "PMU"; 25 match "subsystem" "keys"; 26 match "type" "brightness"; 27 match "notify" "down"; 28 action "sysctl dev.backlight.0.level=\ 29 $(expr `sysctl -n dev.backlight.0.level` - 10)"; 30}; 31 32notify 0 { 33 match "system" "PMU"; 34 match "subsystem" "keys"; 35 match "type" "brightness"; 36 match "notify" "up"; 37 action "sysctl dev.backlight.0.level=\ 38 $(expr `sysctl -n dev.backlight.0.level` + 10)"; 39}; 40 41 42# The next blocks enable volume hotkeys that can be found on Apple laptops 43notify 0 { 44 match "system" "PMU"; 45 match "subsystem" "keys"; 46 match "type" "mute"; 47 action "mixer vol.mute=^"; 48}; 49 50notify 0 { 51 match "system" "PMU"; 52 match "subsystem" "keys"; 53 match "type" "volume"; 54 match "notify" "down"; 55 action "mixer vol.volume=-10"; 56}; 57 58notify 0 { 59 match "system" "PMU"; 60 match "subsystem" "keys"; 61 match "type" "volume"; 62 match "notify" "up"; 63 action "mixer vol.volume=+10"; 64}; 65 66# Eject key 67notify 0 { 68 match "system" "PMU"; 69 match "subsystem" "keys"; 70 match "type" "eject"; 71 action "camcontrol eject cd0"; 72}; 73 74# Equivalent to the ACPI/ACAD notify 75notify 10 { 76 match "system" "PMU"; 77 match "subsystem" "POWER"; 78 match "type" "ACLINE"; 79 action "service power_profile $notify"; 80}; 81