smarter configuration of default keyboard if none specified; now compatible with upstream svkbd

Minor patch that correctly detects which virtual keyboard is available
if none was set explicitly, supports both the new upstream svkbd, as
well as the current sxmo-svkbd fork.
master
Maarten van Gompel 4 years ago committed by Miles Alan
parent 15aefe2857
commit dbdb45bd6c
  1. 12
      scripts/core/sxmo_xinit.sh

@ -6,7 +6,7 @@ envvars() {
command -v "$TERM" || export TERM=st command -v "$TERM" || export TERM=st
command -v "$BROWSER" || export BROWSER=surf command -v "$BROWSER" || export BROWSER=surf
command -v "$EDITOR" || export EDITOR=vis command -v "$EDITOR" || export EDITOR=vis
command -v "$KEYBOARD" || export KEYBOARD=svkbd-sxmo command -v "$KEYBOARD" || defaultkeyboard
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1 [ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config [ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config
[ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME=~/.cache [ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME=~/.cache
@ -29,6 +29,16 @@ xdefaults() {
synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25 synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25
} }
defaultkeyboard() {
if command -v svkbd-mobile-intl; then
export KEYBOARD=svkbd-mobile-intl
elif command -v svkbd-mobile-plain; then
export KEYBOARD=svkbd-mobile-plain
else
export KEYBOARD=svkbd-sxmo
fi
}
daemons() { daemons() {
pkill conky pkill conky
if [ -e "$XDG_CONFIG_HOME/sxmo/conky.conf" ]; then if [ -e "$XDG_CONFIG_HOME/sxmo/conky.conf" ]; then

Loading…
Cancel
Save