Allow to disable modem related features
Usefull on desktop, and e-reader devices. Disable some daemons, status bar icons, and error messages.
This commit is contained in:
@@ -6,10 +6,12 @@
|
|||||||
# shellcheck source=scripts/core/sxmo_common.sh
|
# shellcheck source=scripts/core/sxmo_common.sh
|
||||||
. sxmo_common.sh
|
. sxmo_common.sh
|
||||||
|
|
||||||
MMCLI="$(mmcli -m any -J 2>/dev/null)"
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
if [ -z "$MMCLI" ]; then
|
MMCLI="$(mmcli -m any -J 2>/dev/null)"
|
||||||
sxmo_notify_user.sh "Modem crashed! 30s recovery."
|
if [ -z "$MMCLI" ]; then
|
||||||
sxmo_wakelock.sh lock sxmo_modem_crashed 30s
|
sxmo_notify_user.sh "Modem crashed! 30s recovery."
|
||||||
|
sxmo_wakelock.sh lock sxmo_modem_crashed 30s
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add here whatever you want to do
|
# Add here whatever you want to do
|
||||||
|
@@ -82,7 +82,7 @@ if [ ! -e "$XDG_CACHE_HOME"/sxmo/sxmo.nogesture ]; then
|
|||||||
superctl start sxmo_hook_lisgd
|
superctl start sxmo_hook_lisgd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(command -v ModemManager)" ]; then
|
if [ -z "$SXMO_NO_MODEM" ] && command -v ModemManager > /dev/null; then
|
||||||
# Turn on the dbus-monitors for modem-related tasks
|
# Turn on the dbus-monitors for modem-related tasks
|
||||||
superctl start sxmo_modemmonitor
|
superctl start sxmo_modemmonitor
|
||||||
|
|
||||||
@@ -110,12 +110,14 @@ superctl start sxmo_soundmonitor
|
|||||||
#mpv --quiet --no-video ~/welcome.ogg &
|
#mpv --quiet --no-video ~/welcome.ogg &
|
||||||
|
|
||||||
# mmsd and vvmd
|
# mmsd and vvmd
|
||||||
if [ -f "${SXMO_MMS_BASE_DIR:-"$HOME"/.mms/modemmanager}/mms" ]; then
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
superctl start mmsd-tng
|
if [ -f "${SXMO_MMS_BASE_DIR:-"$HOME"/.mms/modemmanager}/mms" ]; then
|
||||||
fi
|
superctl start mmsd-tng
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "${SXMO_VVM_BASE_DIR:-"$HOME"/.vvm/modemmanager}/vvm" ]; then
|
if [ -f "${SXMO_VVM_BASE_DIR:-"$HOME"/.vvm/modemmanager}/vvm" ]; then
|
||||||
superctl start vvmd
|
superctl start vvmd
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add some warnings if things are not setup correctly
|
# add some warnings if things are not setup correctly
|
||||||
|
@@ -433,14 +433,18 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
periodics|state_change) # 55 s loop and screenlock triggers
|
periodics|state_change) # 55 s loop and screenlock triggers
|
||||||
set_time
|
set_time
|
||||||
set_modem
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
|
set_modem
|
||||||
|
fi
|
||||||
set_state
|
set_state
|
||||||
set_network wifi wlan0
|
set_network wifi wlan0
|
||||||
;;
|
;;
|
||||||
all)
|
all)
|
||||||
sxmobar -r
|
sxmobar -r
|
||||||
set_time
|
set_time
|
||||||
set_modem
|
if [ -z "$SXMO_NO_MODEM" ]; then
|
||||||
|
set_modem
|
||||||
|
fi
|
||||||
set_volume
|
set_volume
|
||||||
set_state
|
set_state
|
||||||
set_notifications
|
set_notifications
|
||||||
|
@@ -41,6 +41,8 @@ Supported variables used by sxmo are:
|
|||||||
|
|
||||||
export SXMO_MODEM_GPIO_KEY_RI | If the modem driver handle a gpio, sxmo have to know it to disable the events from this input source.
|
export SXMO_MODEM_GPIO_KEY_RI | If the modem driver handle a gpio, sxmo have to know it to disable the events from this input source.
|
||||||
|
|
||||||
|
export SXMO_NO_MODEM | Disable modem related features
|
||||||
|
|
||||||
### Screen-related
|
### Screen-related
|
||||||
SXMO_ROTATION_POLL_TIME | Polling time for rotate in seconds (decimals allowed e.g. .1) [default: 1]
|
SXMO_ROTATION_POLL_TIME | Polling time for rotate in seconds (decimals allowed e.g. .1) [default: 1]
|
||||||
|
|
||||||
|
@@ -3,3 +3,4 @@ export SXMO_STATUS_DATE_FORMAT="%Y-%m-%d %H:%M"
|
|||||||
export SXMO_DISABLE_KEYBINDS=1
|
export SXMO_DISABLE_KEYBINDS=1
|
||||||
export SXMO_STATES="unlock locker"
|
export SXMO_STATES="unlock locker"
|
||||||
export SXMO_UNLOCK_IDLE_TIME=300
|
export SXMO_UNLOCK_IDLE_TIME=300
|
||||||
|
export SXMO_NO_MODEM=1
|
||||||
|
@@ -11,3 +11,4 @@ export SXMO_SUSPENDABLE_STATES="unlock 120"
|
|||||||
export SXMO_ROTATE_DIRECTION="left"
|
export SXMO_ROTATE_DIRECTION="left"
|
||||||
export SXMO_ROTATE_START=1
|
export SXMO_ROTATE_START=1
|
||||||
export SXMO_MIN_BRIGHTNESS=0 # to disable all backlight
|
export SXMO_MIN_BRIGHTNESS=0 # to disable all backlight
|
||||||
|
export SXMO_NO_MODEM=1
|
||||||
|
@@ -21,3 +21,4 @@ export SXMO_SPEAKER="Master"
|
|||||||
export SXMO_SWAY_SCALE="2"
|
export SXMO_SWAY_SCALE="2"
|
||||||
export SXMO_STATES="unlock"
|
export SXMO_STATES="unlock"
|
||||||
export SXMO_SUSPENDABLE_STATES="unlock 120"
|
export SXMO_SUSPENDABLE_STATES="unlock 120"
|
||||||
|
export SXMO_NO_MODEM=1
|
||||||
|
Reference in New Issue
Block a user