summaryrefslogtreecommitdiffstats
path: root/core/modules/pulseaudio/data/opt/openslx/vmchooser/sessionstart.d/default-sound-volume
blob: 990e7af02a5692170db2c1d2e7aecdc86082d823 (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 PulseAudio 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
		pactl set-sink-mute @DEFAULT_SINK@ 1
	fi
fi
: # fake success to not trigger slxlog