mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-29 17:25:34 +00:00
Audio startup functions
This commit is contained in:
parent
d672031ad0
commit
782ace88f3
@ -11,7 +11,7 @@ function fixPulse() {
|
|||||||
PULSE="$(alsamixer 2>&1 | killall alsamixer)"
|
PULSE="$(alsamixer 2>&1 | killall alsamixer)"
|
||||||
if [[ $PULSE == *'Connection refused'* ]]; then
|
if [[ $PULSE == *'Connection refused'* ]]; then
|
||||||
echo 'Fixing Pulseaudio'
|
echo 'Fixing Pulseaudio'
|
||||||
pulseaudio -k
|
killPulse
|
||||||
pulseaudio -D
|
pulseaudio -D
|
||||||
fixPulse
|
fixPulse
|
||||||
else
|
else
|
||||||
@ -19,6 +19,15 @@ function fixPulse() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Start up programs that use audio
|
||||||
|
function launchi3() {
|
||||||
|
if [ -z "$skipi3" ]; then
|
||||||
|
echo Opening i3wm sound workspaces
|
||||||
|
sleep .1 && i3-msg 'workspace 10; exec google-play-music-desktop-player'
|
||||||
|
sleep .1 && i3-msg 'workspace 5; exec firefox'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# arg parser
|
# arg parser
|
||||||
for arg in "$@"
|
for arg in "$@"
|
||||||
do
|
do
|
||||||
@ -44,9 +53,4 @@ fixPulse
|
|||||||
sh ~/.config/scripts/start-es-8.sh
|
sh ~/.config/scripts/start-es-8.sh
|
||||||
sh ~/.config/scripts/start-es-9.sh
|
sh ~/.config/scripts/start-es-9.sh
|
||||||
|
|
||||||
# Start up programs that use audio
|
launchi3
|
||||||
if [ -z "$skipi3" ]; then
|
|
||||||
echo Opening i3wm sound workspaces
|
|
||||||
sleep .1 && i3-msg 'workspace 10; exec google-play-music-desktop-player'
|
|
||||||
sleep .1 && i3-msg 'workspace 5; exec firefox'
|
|
||||||
fi
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user