26 lines
545 B
Bash
Executable file
26 lines
545 B
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
# Minimal OS variable loading for performance
|
|
. /etc/profile.d/02-distribution
|
|
|
|
tocon "Configuring Audio..."
|
|
|
|
STATE=$(systemctl isactive pipewire)
|
|
if [ "${STATE}" = "inactive" ]
|
|
then
|
|
systemctl start pipewire
|
|
fi
|
|
|
|
pactl load-module module-udev-detect &>/dev/null
|
|
pactl load-module module-switch-on-connect &>/dev/null
|
|
|
|
VOLUME=$(get_setting audio.volume)
|
|
if [[ -z ${VOLUME} ]]
|
|
then
|
|
VOLUME="60"
|
|
fi
|
|
|
|
/usr/bin/volume ${VOLUME}
|
|
|