summaryrefslogtreecommitdiff
path: root/pm/hooks/20video
blob: 748ee262679297a5cd27c635f807358a30e4c47e (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
#!/bin/bash

. /etc/pm/functions

case "$(get_video_type)" in
        ATI)
		. /etc/pm/functions-ati
		;;
	nVidia)
		. /etc/pm/functions-nvidia
		;;
	Intel)
		. /etc/pm/functions-intel
		;;
	*)
		;;
esac

case "$1" in
	suspend)
		suspend_video
		;;
	resume)
		resume_video
		;;
	hibernate)
		if [ "x$HIBERNATE_RESUME_POST_VIDEO" == "xyes" ]; then
			suspend_video
		fi
		;;
	thaw)
		if [ "x$HIBERNATE_RESUME_POST_VIDEO" == "xyes" ]; then
			resume_video
		fi
		;;
	*)
		;;
esac

exit $?