diff --git a/configs/hyprland/environments/pipewire.sh b/configs/hyprland/environments/pipewire.sh new file mode 100755 index 0000000..c006a05 --- /dev/null +++ b/configs/hyprland/environments/pipewire.sh @@ -0,0 +1,14 @@ +#!/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 +} + +check_and_start "pipewire" "pipewire" +check_and_start "pipewire-pulse" "/usr/bin/pipewire-pulse" +check_and_start "wireplumber" "/usr/bin/wireplumber" diff --git a/configs/hyprland/hypr/conf/autostart.conf b/configs/hyprland/hypr/conf/autostart.conf index 16c538f..dfbdfe6 100644 --- a/configs/hyprland/hypr/conf/autostart.conf +++ b/configs/hyprland/hypr/conf/autostart.conf @@ -4,10 +4,8 @@ # background services : exec-once = dbus-update-activation-environment --all & +exec-once = ~/.config/environments/pipewire.sh & exec-once = ~/.config/hypr/scripts/keyring-launch.sh & -exec-once = sleep 1 && pipewire & -exec-once = sleep 1 && /usr/bin/pipewire-pulse & -exec-once = sleep 1 && /usr/bin/wireplumber & exec-once = wl-paste --watch cliphist store & exec-once = avizo-service &