sxmo-utils/configs/appcfg/xinit_template
Stacy Harper 91fe7fbeab Fix the unreliable modem numbers prefix issues
Sometime, the modem will give 0611924312 as incoming text or
call number instead of +33611924312 (example in france).

This cause two issues cause of format missmatch:

* Notifications sometime come from "Unknown" when we actually know
the contact
* Text/Dial menu entries are duplicated with "Unknown" persons

We try here to fix boths issues with a simple idea. We will fallback
to a default prefix when it is missing (on phone like numbers,
composed of 10 numbers).

This prefix is an environment variable that cause 0 impact if missing.

* sxmo_contacts.sh will fix the recent numbers prefixes with the default
* sxmo_modemmonitor.sh will also fix the prefix with the default one

This should solve missmatch issues as both will use country code format

I only recommend to always store contacts in the prefixed format in the
contacts.tsv file.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:20:19 +02:00

68 lines
2.1 KiB
Bash

#!/usr/bin/env sh
# Please modify this file to your liking
# Important Instructions:
# All processes you launch from this script must
# be non-blocking: launch them in the background (using &)
# or ensure they return quickly. Only after this script
# finishes will the window manager be loaded
# Set a pretty wallpaper
feh --bg-fill /usr/share/sxmo/background.jpg
# Show conky (the clock)
conky -c /usr/share/sxmo/appcfg/conky.conf -d #12 hour clock (am/pm)
#conky -c /usr/share/sxmo/appcfg/conky24h.conf -d #24 hour clock
# Force audio over the main speaker
# and set a sane default volume
sxmo_audioout.sh Speaker
amixer sset 'Line Out Source' 'Mono Differential','Mono Differential'
amixer set "Line Out" 50%
# Play a funky startup tune
#mpv --quiet --no-video ~/welcome.ogg &
# You will sometime get SMS or calls from not
# country code prefixed phone numbers. To ensure
# we match your contacts, we will use this one.
#export DEFAULT_NUMBER_PREFIX=+33
# turn on modemmonitor on login
# Note: if the modemmonitor is not on you can
# not receive texts/calls!
# (there is a bit of a delay to
# give the modem some time to set up)
sleep 15 && sxmo_modemmonitortoggle.sh on &
### Configuration Parameters ###
# Note that this is just a subset of all available
# parameters, see the sxmo documentation for more.
# Use firefox as default browser if installed
command -v firefox && export BROWSER=firefox
# Prepopulate Subreddits menu with custom subreddits
#export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn"
# Temporarily wake every 5 minutes during sleep
#(useful for getting notifications)
#export SXMO_RTCWAKEINTERVAL=300
# Immediately turn the screen off when locking the device
export SXMO_LOCK_SCREEN_OFF=1
# Immediately suspend the phone when locking
#export SXMO_LOCK_SUSPEND=1
# When scrolling past the beginning or end of a menu, wrap it around:
#export DMENU_WRAP_AROUND=1
# Enable audio feedback on keypress
#export KEYBOARD_ARGS="-o | clickclack -f /usr/share/sxmo/keypress.wav"
# Or, enable vibration feedback on keypress
#export KEYBOARD_ARGS="-o | clickclack -V"