Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: src/platform/acpi/action_hotkey.sh

Issue 668272: This reverts commit 97758de2adf4eb8c861b66826e890e5c3479e071. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/platform/audioconfig/pulse/client-cros.conf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # TODO: This is specific to eeepc. Figure out a way to generalize and 7 # TODO: This is specific to eeepc. Figure out a way to generalize and
8 # add support for additional hotkeys. 8 # add support for additional hotkeys.
9 # 9 #
10 # TODO(ajwong): Find a better way to talk to pulseaudio than changing to the 10 # TODO(ajwong): Find a better way to talk to pulseaudio than changing to the
11 # chronos user and talking to pulseaudio via amixer. 11 # chronos user and talking to pulseaudio via amixer.
12 12
13 USER_ID="$(/usr/bin/id -u chronos)" 13 USER_ID="$(/usr/bin/id -u chronos)"
14 MINIJAIL_FLAGS="--use-capabilities" 14 MINIJAIL_FLAGS="--use-capabilities"
15 15
16 export PULSE_RUNTIME_PATH=/var/run/pulse 16 # Needed by amixer to so that the alsa pulseaudio plugin, can locate the
17 # correct ${HOME}/.pulse directory.
18 export HOME=/home/chronos/user
17 19
18 case "$3" in 20 case "$3" in
19 00000013) # Toggle sound 21 00000013) # Toggle sound
20 /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \ 22 /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \
21 /usr/bin/amixer set Master toggle 23 /usr/bin/amixer set Master toggle
22 ;; 24 ;;
23 00000014) # Decrease volume 25 00000014) # Decrease volume
24 /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \ 26 /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \
25 /usr/bin/amixer set Master 5%- 27 /usr/bin/amixer set Master 5%-
26 ;; 28 ;;
27 00000015) # Increase volume 29 00000015) # Increase volume
28 /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \ 30 /sbin/minijail ${MINIJAIL_FLAGS} --uid=${USER_ID} -- \
29 /usr/bin/amixer set Master 5%+ 31 /usr/bin/amixer set Master 5%+
30 ;; 32 ;;
31 esac 33 esac
OLDNEW
« no previous file with comments | « no previous file | src/platform/audioconfig/pulse/client-cros.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698