diff options
| author | Brad Davis <brd@FreeBSD.org> | 2018-08-21 16:51:45 +0000 |
|---|---|---|
| committer | Brad Davis <brd@FreeBSD.org> | 2018-08-21 16:51:45 +0000 |
| commit | 44e1285c7b19e6d1cdb237b0948e89b4891ca5be (patch) | |
| tree | 187d78af89eabf5ee1bf6ff3f9c39a346a310e92 /sbin/devd/apple.conf | |
| parent | 83a90bffd8d7374d27d8d63097c5205af7bfa4f6 (diff) | |
Notes
Diffstat (limited to 'sbin/devd/apple.conf')
| -rw-r--r-- | sbin/devd/apple.conf | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/sbin/devd/apple.conf b/sbin/devd/apple.conf new file mode 100644 index 0000000000000..3084cd459fd45 --- /dev/null +++ b/sbin/devd/apple.conf @@ -0,0 +1,80 @@ +# $FreeBSD$ +# +# PowerPC Apple specific devd events + +# Keyboard power key +notify 0 { + match "system" "PMU"; + match "subsystem" "Button"; + action "shutdown -p now"; +}; + + +# PowerBook and iBook lid close. +notify 0 { + match "system" "PMU"; + match "subsystem" "lid"; + match "type" "close"; + action "shutdown -p now"; +}; + + +# The next blocks enable brightness hotkeys that can be found on Apple laptops +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "brightness"; + match "notify" "down"; + action "sysctl dev.backlight.0.level=\ + $(expr `sysctl -n dev.backlight.0.level` - 10)"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "brightness"; + match "notify" "up"; + action "sysctl dev.backlight.0.level=\ + $(expr `sysctl -n dev.backlight.0.level` + 10)"; +}; + + +# The next blocks enable volume hotkeys that can be found on Apple laptops +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "mute"; + action "mixer 0"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "volume"; + match "notify" "down"; + action "mixer vol -10"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "volume"; + match "notify" "up"; + action "mixer vol +10"; +}; + +# Eject key +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "eject"; + action "camcontrol eject cd0"; +}; + +# Equivalent to the ACPI/ACAD notify +notify 10 { + match "system" "PMU"; + match "subsystem" "POWER"; + match "type" "ACLINE"; + action "service power_profile $notify"; +}; |
