autodetect SXMO_DISABLE_LEDS
The new sxmo_status_led program can tell us if it finds a suitable led on the system. We can use this to set the SXMO_DISABLE_LEDS env variable. Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This commit is contained in:

committed by
Willow Barraco

parent
ec78d3b95b
commit
86dbca1502
@@ -25,6 +25,12 @@ finish() {
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shared_envvars() {
|
||||||
|
if ! sxmo_status_led check; then
|
||||||
|
export SXMO_DISABLE_LEDS="1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
. /etc/profile.d/sxmo_init.sh
|
. /etc/profile.d/sxmo_init.sh
|
||||||
@@ -32,6 +38,7 @@ init() {
|
|||||||
_sxmo_load_environments
|
_sxmo_load_environments
|
||||||
_sxmo_prepare_dirs
|
_sxmo_prepare_dirs
|
||||||
envvars
|
envvars
|
||||||
|
shared_envvars
|
||||||
sxmo_migrate.sh sync
|
sxmo_migrate.sh sync
|
||||||
|
|
||||||
defaults
|
defaults
|
||||||
|
@@ -52,8 +52,6 @@ SXMO_ROTATION_THRESHOLD | Threshold for detecting rotation [default: 60]
|
|||||||
|
|
||||||
SXMO_MIN_BRIGHTNESS | Minimum brightness level [default: 5]
|
SXMO_MIN_BRIGHTNESS | Minimum brightness level [default: 5]
|
||||||
|
|
||||||
SXMO_DISABLE_LEDS | Disable leds (1 or 0) [default: 0]
|
|
||||||
|
|
||||||
SXMO_SWAY_SCALE | Screen scale for hidpi screens. Can be fractional [SWAY-ONLY].
|
SXMO_SWAY_SCALE | Screen scale for hidpi screens. Can be fractional [SWAY-ONLY].
|
||||||
|
|
||||||
SXMO_ROTATE_DIRECTION | The direction to rotate when using the gesture [default: right]
|
SXMO_ROTATE_DIRECTION | The direction to rotate when using the gesture [default: right]
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
export SXMO_DISABLE_LEDS=1
|
|
||||||
export SXMO_STATUS_DATE_FORMAT="%Y-%m-%d %H:%M"
|
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"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export WLR_RENDERER=pixman
|
export WLR_RENDERER=pixman
|
||||||
export SXMO_DISABLE_LEDS=1
|
|
||||||
export SXMO_SWAY_SCALE="2.5"
|
export SXMO_SWAY_SCALE="2.5"
|
||||||
export SXMO_POWER_BUTTON="1:1:gpio-keys"
|
export SXMO_POWER_BUTTON="1:1:gpio-keys"
|
||||||
export SXMO_STATES="unlock"
|
export SXMO_STATES="unlock"
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# LG Nexus 5
|
# LG Nexus 5
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1" # Not supported by kernel (as of 5.16).
|
|
||||||
export SXMO_MIN_BRIGHTNESS="4" # Screen turns off below 4.
|
export SXMO_MIN_BRIGHTNESS="4" # Screen turns off below 4.
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:gpio-keys"
|
export SXMO_VOLUME_BUTTON="1:1:gpio-keys"
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
# Bragging rights Paavo Ylönen
|
# Bragging rights Paavo Ylönen
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="0"
|
|
||||||
export SXMO_MONITOR="DSI-1"
|
export SXMO_MONITOR="DSI-1"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:gpio-keys 0:0:pm8941_resin"
|
export SXMO_VOLUME_BUTTON="1:1:gpio-keys 0:0:pm8941_resin"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export WLR_RENDERER=pixman
|
export WLR_RENDERER=pixman
|
||||||
export SXMO_LYSTI_LEDS=1
|
|
||||||
export SXMO_POWER_BUTTON="0:0:twl_pwrbutton"
|
export SXMO_POWER_BUTTON="0:0:twl_pwrbutton"
|
||||||
export SXMO_TOUCHSCREEN_ID="TSC2005 touchscreen"
|
export SXMO_TOUCHSCREEN_ID="TSC2005 touchscreen"
|
||||||
export SXMO_SWAY_SCALE="1.5"
|
export SXMO_SWAY_SCALE="1.5"
|
||||||
|
@@ -5,6 +5,5 @@
|
|||||||
# OnePlus 5
|
# OnePlus 5
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:Volume_buttons"
|
export SXMO_VOLUME_BUTTON="1:1:Volume_buttons"
|
||||||
export SXMO_DISABLE_LEDS="1" # until support for Light Pulse Generator (LPG) is implemented in sxmo_led.sh
|
|
||||||
#export SXMO_TOUCHSCREEN_ID="" # TODO for dwm/xorg support.
|
#export SXMO_TOUCHSCREEN_ID="" # TODO for dwm/xorg support.
|
||||||
export SXMO_SWAY_SCALE="2"
|
export SXMO_SWAY_SCALE="2"
|
||||||
|
@@ -5,6 +5,5 @@
|
|||||||
# OnePlus 5T
|
# OnePlus 5T
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:Volume_buttons"
|
export SXMO_VOLUME_BUTTON="1:1:Volume_buttons"
|
||||||
export SXMO_DISABLE_LEDS="1" # until support for Light Pulse Generator (LPG) is implemented in sxmo_led.sh
|
|
||||||
#export SXMO_TOUCHSCREEN_ID="" # TODO for dwm/xorg support.
|
#export SXMO_TOUCHSCREEN_ID="" # TODO for dwm/xorg support.
|
||||||
export SXMO_SWAY_SCALE="2"
|
export SXMO_SWAY_SCALE="2"
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
export SXMO_VOLUME_BUTTON="1:1:Volume_keys"
|
export SXMO_VOLUME_BUTTON="1:1:Volume_keys"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_MONITOR="DSI-1"
|
export SXMO_MONITOR="DSI-1"
|
||||||
|
@@ -10,7 +10,6 @@ export LIBGL_ALWAYS_SOFTWARE=true
|
|||||||
|
|
||||||
export SXMO_TOUCHSCREEN_ID="10"
|
export SXMO_TOUCHSCREEN_ID="10"
|
||||||
export SXMO_STYLUS_ID="12"
|
export SXMO_STYLUS_ID="12"
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
export SXMO_MIN_BRIGHTNESS="0" # we can set brightness all the way down
|
export SXMO_MIN_BRIGHTNESS="0" # we can set brightness all the way down
|
||||||
export SXMO_BMENU_LANDSCAPE_LINES="15"
|
export SXMO_BMENU_LANDSCAPE_LINES="15"
|
||||||
export SXMO_MONITOR="Unknown-1"
|
export SXMO_MONITOR="Unknown-1"
|
||||||
|
@@ -2,8 +2,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS=1
|
|
||||||
|
|
||||||
# 0:0:MELFAS_MMS345_Touchscreen
|
# 0:0:MELFAS_MMS345_Touchscreen
|
||||||
# BTN_TOUCH
|
# BTN_TOUCH
|
||||||
# ABC_X
|
# ABC_X
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# author: xengineering <me@xengineering.eu>
|
# author: xengineering <me@xengineering.eu>
|
||||||
|
|
||||||
# Samsung Galaxy Tab A 9.7 2015 (tested on LTE variant, Code SM-T555)
|
# Samsung Galaxy Tab A 9.7 2015 (tested on LTE variant, Code SM-T555)
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:GPIO_Buttons 0:0:pm8941_resin"
|
export SXMO_VOLUME_BUTTON="1:1:GPIO_Buttons 0:0:pm8941_resin"
|
||||||
export SXMO_SWAY_SCALE="1.5"
|
export SXMO_SWAY_SCALE="1.5"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
# TODO: change to output display
|
# TODO: change to output display
|
||||||
export SXMO_MONITOR="0:0:generic_ft5x06_(8d)"
|
export SXMO_MONITOR="0:0:generic_ft5x06_(8d)"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
# TODO: change to output display
|
# TODO: change to output display
|
||||||
export SXMO_MONITOR="0:0:Novatek_NT36XXX_Touchscreen"
|
export SXMO_MONITOR="0:0:Novatek_NT36XXX_Touchscreen"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
export SXMO_MONITOR="DSI-1"
|
export SXMO_MONITOR="DSI-1"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:gpio-keys 0:0:pm8941_resin"
|
export SXMO_VOLUME_BUTTON="1:1:gpio-keys 0:0:pm8941_resin"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
export SXMO_MONITOR="DSI-1"
|
export SXMO_MONITOR="DSI-1"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
export SXMO_VOLUME_BUTTON="1:1:gpio-keys 0:0:pm8941_resin"
|
export SXMO_VOLUME_BUTTON="1:1:gpio-keys 0:0:pm8941_resin"
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
# Copyright 2022 Sxmo Contributors
|
# Copyright 2022 Sxmo Contributors
|
||||||
|
|
||||||
export SXMO_DISABLE_LEDS="1"
|
|
||||||
# TODO: change to output display
|
# TODO: change to output display
|
||||||
export SXMO_MONITOR="1739:0:Synaptics_S3330"
|
export SXMO_MONITOR="1739:0:Synaptics_S3330"
|
||||||
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey"
|
||||||
|
Reference in New Issue
Block a user