busybox less cannot display colors. As we use the -F arg to stop less if
the page fit in one screen, we can just use more without arguments.
Both behave the same but more god color capabilities.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Changes from v1: This triggers the hook (without the 5 second sleep!) also when the unsuspendreason is modem or rtc,
so the user can always override the behaviour and do what he/she wants.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This is usefull for cron jobs that would manage sxmo like screenlock by
example.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This makes sure that environment variables are set for the demons and
for example st started form the app menu (if launched through lisgd).
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This make input handling matching more consistent.
Take this example :
You want to bind one finger left gesture to something with all the
distance (short, medium and long) so you now can match *"oneleft" to
match "longoneleft", "mediumoneleft", "oneleft".
Without the "one" you would use *"left" which also match "twoleft" and
this override the "move to another workspace gesture.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This can happen if an call come while a menu already is open of if the
user kill the dmenu with a top side gesture.
We dont want the notification to be purged to allow the user to manually
open it with the notification appmenu so we have to stop the code here.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Atm, only the button wake up reason was trigerring postwake. This make
the usb charger to uncrust the phone and leave it in lock or off mode.
Now postwake take an argument which is the wake up reason.
The modem reason should not manage so phone state so we make it explicit
in the default hook.
"usb power" and "button" now make the phone to blink 5 seconds and put
the phone back to crust.
If you unlock the phone in rtcwake, then the next rtcwake will put the
phone back to crust cause last wake up reason still is rtc.
To prevent this, we also check the last state and expect it to be crust.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
rtcwake can't take the default value of mnc when there is no cron job
cause it is too big.
We limit this value to 8 years, a working value.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Requires the `set_term_title` in cmus to be set to false, otherwise cmus
will set the WM_TITLE to the currently playing song / album, which makes
it hard to determine that the current app is cmus.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
If the apk cache is outdated (first installation) and you try to upgrade
with this "-a" argument without configuring a network, then apk will
just strip every packages that are not available.
It then leave the phone in a very broken state.
The -a was used to handle mainlining software from pmaport to aport
(where pmaport uses 9999 version numbers). As we do not rely that much
on those softwares (that are now mainlined), we strip this unsafe
argument.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
This add a script to use either the user hook or the default one.
Sometime we checked the user hook or a default code. We move this
default code in a defaut hook.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
mnc goal is to display when will occurs the next cron job.
We drop the "sxmo_screenlock.sh rtc" command and the
SXMO_RTCWAKEINTERVAL variable. We will now only use
"sxmo_screenlock.sh crust" which mean suspend until next cron job
(-2 seconds).
To replicate the old behavior of the blinking phone then returning to
suspension (if needed) we now use a new script.
By example:
*/15 * * * * DISPLAY=:0 sxmo_rtcwake.sh sleep 10
This will trigger a 10s sleep task every 15 minutes (the old default
rtcwake hook).
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
If a menu already is open while receiving a call, the dedicated menu
could not open itself. It prevent completly the user to pickup the call.
We add a notification to open this menu manually.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This fixes a bug where I was getting "binary file
~/.local/modem/modemlog.tsv matches" instead of getting a list of recent
contacts in sxmo_modemtext.sh. Turns out, having gnu grep breaks the behaviour
of showing a list of contacts. This patch ensures we are always using busybox
grep.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>