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