sxmo-utils: sxmo_hook_start.sh: don't start pulse/pipewire audio daemons at start; don't warn on 'first' use
This commit is contained in:
parent
75e6393680
commit
e9dc22c1f2
|
@ -1,6 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
# Copyright 2022 Sxmo Contributors
|
|
||||||
|
|
||||||
# include common definitions
|
# include common definitions
|
||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
|
@ -16,16 +14,6 @@ while ! superctl status > /dev/null 2>&1; do
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
# Load our sound daemons
|
|
||||||
|
|
||||||
if [ "$(command -v pulseaudio)" ]; then
|
|
||||||
superctl start pulseaudio
|
|
||||||
elif [ "$(command -v pipewire)" ]; then
|
|
||||||
# pipewire-pulse will start pipewire
|
|
||||||
superctl start pipewire-pulse
|
|
||||||
superctl start wireplumber
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Periodically update some status bar components
|
# Periodically update some status bar components
|
||||||
sxmo_hook_statusbar.sh all
|
sxmo_hook_statusbar.sh all
|
||||||
sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
||||||
|
@ -33,33 +21,11 @@ sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \
|
||||||
|
|
||||||
# mako/dunst are required for warnings.
|
# mako/dunst are required for warnings.
|
||||||
# load some other little things here too.
|
# load some other little things here too.
|
||||||
case "$SXMO_WM" in
|
superctl start mako
|
||||||
sway)
|
superctl start sxmo_wob
|
||||||
superctl start mako
|
superctl start sxmo_menumode_toggler
|
||||||
superctl start sxmo_wob
|
superctl start bonsaid
|
||||||
superctl start sxmo_menumode_toggler
|
swaymsg output '*' bg "$SXMO_BG_IMG" fill
|
||||||
superctl start bonsaid
|
|
||||||
swaymsg output '*' bg "$SXMO_BG_IMG" fill
|
|
||||||
;;
|
|
||||||
dwm)
|
|
||||||
superctl start dunst
|
|
||||||
|
|
||||||
# Auto hide cursor with touchscreen, Show it with a mouse
|
|
||||||
if command -v "unclutter-xfixes" > /dev/null; then
|
|
||||||
set -- unclutter-xfixes
|
|
||||||
else
|
|
||||||
set -- unclutter
|
|
||||||
fi
|
|
||||||
superctl start "$1"
|
|
||||||
|
|
||||||
superctl start autocutsel
|
|
||||||
superctl start autocutsel-primary
|
|
||||||
superctl start sxmo-x11-status
|
|
||||||
superctl start bonsaid
|
|
||||||
[ -n "$SXMO_MONITOR" ] && xrandr --output "$SXMO_MONITOR" --primary
|
|
||||||
feh --bg-fill "$SXMO_BG_IMG"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# To setup initial lock state
|
# To setup initial lock state
|
||||||
sxmo_hook_unlock.sh
|
sxmo_hook_unlock.sh
|
||||||
|
@ -72,15 +38,6 @@ fi
|
||||||
# Turn on lisgd
|
# Turn on lisgd
|
||||||
superctl start sxmo_hook_lisgd
|
superctl start sxmo_hook_lisgd
|
||||||
|
|
||||||
if [ "$(command -v ModemManager)" ]; then
|
|
||||||
# Turn on the dbus-monitors for modem-related tasks
|
|
||||||
superctl start sxmo_modemmonitor
|
|
||||||
|
|
||||||
# place a wakelock for 120s to allow the modem to fully warm up (eg25 +
|
|
||||||
# elogind/systemd would do this for us, but we don't use those.)
|
|
||||||
sxmo_wakelock.sh lock modem_warming_up 120s
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start the desktop widget (e.g. clock)
|
# Start the desktop widget (e.g. clock)
|
||||||
superctl start sxmo_conky
|
superctl start sxmo_conky
|
||||||
|
|
||||||
|
@ -95,24 +52,3 @@ superctl start sxmo_notificationmonitor
|
||||||
|
|
||||||
# monitor for headphone for statusbar
|
# monitor for headphone for statusbar
|
||||||
superctl start sxmo_soundmonitor
|
superctl start sxmo_soundmonitor
|
||||||
|
|
||||||
# Play a funky startup tune if you want (disabled by default)
|
|
||||||
#mpv --quiet --no-video ~/welcome.ogg &
|
|
||||||
|
|
||||||
# mmsd and vvmd
|
|
||||||
if [ -f "${SXMO_MMS_BASE_DIR:-"$HOME"/.mms/modemmanager}/mms" ]; then
|
|
||||||
superctl start mmsd-tng
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "${SXMO_VVM_BASE_DIR:-"$HOME"/.vvm/modemmanager}/vvm" ]; then
|
|
||||||
superctl start vvmd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# add some warnings if things are not setup correctly
|
|
||||||
deviceprofile="$(command -v "sxmo_deviceprofile_$SXMO_DEVICE_NAME.sh")"
|
|
||||||
|
|
||||||
[ -f "$deviceprofile" ] || sxmo_notify_user.sh --urgency=critical \
|
|
||||||
"No deviceprofile found $SXMO_DEVICE_NAME. See: https://sxmo.org/deviceprofile"
|
|
||||||
|
|
||||||
sxmo_migrate.sh state || sxmo_notify_user.sh --urgency=critical \
|
|
||||||
"Config needs migration" "$? file(s) in your sxmo configuration are out of date and disabled - using defaults until you migrate (run sxmo_migrate.sh)"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user