fix: service launcher for steam os
This commit is contained in:
parent
135775c3b3
commit
0ef1c24c04
2 changed files with 16 additions and 4 deletions
|
@ -9,6 +9,6 @@ check_and_start() {
|
|||
fi
|
||||
}
|
||||
|
||||
check_and_start "pipewire" "pipewire"
|
||||
check_and_start "pipewire" "/usr/bin/pipewire"
|
||||
check_and_start "pipewire-pulse" "/usr/bin/pipewire-pulse"
|
||||
check_and_start "wireplumber" "/usr/bin/wireplumber"
|
||||
|
|
|
@ -1,7 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
check_and_start() {
|
||||
if ! pgrep -x "$1" >/dev/null; then
|
||||
echo "Starting $1..."
|
||||
sleep 1 && $2 &
|
||||
else
|
||||
echo "$1 is already running."
|
||||
fi
|
||||
}
|
||||
|
||||
run_services() {
|
||||
exec $HOME/.config/scripts/pipewire.sh
|
||||
dbus-update-activation-environment --all && sleep 1
|
||||
check_and_start "pipewire" "/usr/bin/pipewire"
|
||||
check_and_start "pipewire-pulse" "/usr/bin/pipewire-pulse"
|
||||
check_and_start "wireplumber" "/usr/bin/wireplumber"
|
||||
}
|
||||
|
||||
run_steamos() {
|
||||
|
@ -12,6 +24,6 @@ run_steamos() {
|
|||
STEAM_MULTIPLE_XWAYLANDS=1 gamescope -W $WIDTH -H $HEIGHT -r $REFRESH_RATE -e --xwayland-count 2 --adaptive-sync -- steam -gamepadui -steamdeck
|
||||
}
|
||||
|
||||
run_steamos
|
||||
|
||||
run_services
|
||||
|
||||
run_steamos
|
||||
|
|
Loading…
Add table
Reference in a new issue