summaryrefslogtreecommitdiffstats
path: root/core/modules/alsa/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume
blob: 49b146d7c8f03e0b0fae31c9a054f8b4ec96fbc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/ash
#
# This hook evaluates the SLX_VM_SOUND configuration option
# and mutes the sound via ALSA if appropriate. This will only
# take effect in non-virtual sessions (determined by the
# env variable SESSION_TYPE given by vmchooser).

if [ "$SESSION_TYPE" = "XSESSION" ]; then
	. /opt/openslx/config

	if [ "$SLX_VM_SOUND" = "DEFAULT_MUTED" ] || [ "$SLX_VM_SOUND" = "FORCE_MUTED" ]; then
		amixer set Master mute
	fi
fi
: # fake success to not trigger slxlog