summaryrefslogtreecommitdiffstats
path: root/etc/devd/apple.conf
blob: 8518890a5d6d16962a71d8639e3770caa280132b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# $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";
};


OpenPOWER on IntegriCloud