Commit graph

612 commits

Author SHA1 Message Date
Clayton Craft
fd0eb1dc88 sxmo_audioout: use existing env vars for audio devices
If the env variables in this script are set, use those values. Else it
defaults to using the values set before this patch.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-23 17:22:03 -04:00
Clayton Craft
42b9f482a9 sxmo_xinit: add support for overriding vars with device-specific profiles
This reads base/compatible from the devicetree to get the device name,
and sources a script in /bin with a filename in the format
'sxmo_deviceprofile_NAME.sh'. The purpose of this is to allow
setting/overriding variables in other sxmo scripts with device-specific
values. For example, some audio devices on one phone may have different
names on another.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-23 17:22:03 -04:00
Maarten van Gompel
b5e5387121 minor shellcheck fixes after applying latest patches 2021-04-23 19:23:06 +02:00
Stacy Harper
7ac78f8272 sxmo_dmenu_with_kb should exit the dmenu exit code
Some script could behave differently if the dmenu has been killed with a
swipe up gesture. We have to return the dmenu exit code.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:32 +02:00
Stacy Harper
6426a94e46 Add proximity lock toggle on the config menu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:24 +02:00
Stacy Harper
f4ee396394 Rework the incoming call pickup/discard behavior
* The sxmo_modemmonitor.sh will now run a new sxmo_modemcall.sh
dedicated menu to Pickup, Hangup or Mute the call. It will not write
notifications anymore.

* We now can mute the ring with the new pickup menu. With the default
hook, this will stop the ringtone like the missed_call would do.

* The sxmo_modemcall.sh now use a new sxmo_proximitylock.sh which
will lock the screen when putting the phone in front of the ear. This
script should be smart enough to work smoothly with a crust context.

To achieve this, the proximity_lock will only disable the initial
lock (the one who want to go back in crust after some seconds) if the
phone moved a little bit and is not in your pocket. So forgetting the
phone in a table or not earing the ring in your bag will not empty the
battery. You'll find the phone in crust with notifications.

* The sxmo_modemcall.sh do not monitor finished calls anymore. We leave
it with hangup or being killed by sxmo_modemmonitor.sh. This simplify
the call script and prevent double deleting mmcli calls. I had to use
pids and wait commands to fix and issue and make the script killeable
by the monitor.

Plus, only the monitor will now delete calls. The call script should be
precise on what happen using cached files.

* Discarded and hanged up calls are two different behavior with
different script (by default use the same linked ones)

* Fixed a bug where sometime ringing was started twice. I think this is
cause by the new checkforincomingcalls in the connected state change. We
now use a file to test if the call already has been managed.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:08 +02:00
Stacy Harper
6423ece891
Add less|mless appmenus
Very usefull when displaying multiple files. It is used by mless, a
basic mblaze command to show emails.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-21 19:39:48 -04:00
Maxim Karasev
fbd0f24c50 Fix neovim executable name
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-11 17:59:03 +02:00
Maarten van Gompel
21379b7914 Renamed sxmo_gesturehandler.sh to sxmo_inputhandler.sh (after Sam Bowly's patches), renamed gesture hook to inputhandler hook. Removed hotcorner script and powerbutton scripts and their hooks (now all handled by inputhandler and its hook). 2021-04-10 13:47:22 +02:00
Sam Bowlby
a7e8b39165 add button actions. Use with my dwm patch
fixed to pass shellcheck

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:34:41 +02:00
Stacy Harper
a3e4dc0fa4 Make all sxmo menu SSH mode compatible
We then simplify the sxmo_modemtext that was already using SSH related
behaviors.

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
Stacy Harper
33e6ce14b3 sxmo_contactmenu.sh now use sxmo_contacts.sh
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
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
Stacy Harper
65270eaea8 Prevent starting multiple modemmonitor on logout/login
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-09 23:22:21 +02:00
Stacy Harper
de0697a83c Fix sxmo rotate left
lisgd doesnt care about negative rotations. Rotating left is 3 rotation
rights.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-09 22:56:20 +02:00
Sam Bowlby
bf212e1b7b add Profanity to app menu; add System Menu to Network menu
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 20:47:27 +02:00
Maarten van Gompel
e220a30e15 added some more apps to the app menu 2021-04-05 17:18:52 +02:00
Maarten van Gompel
2d1180389f fixed whitespace problem after last patch 2021-04-05 16:43:23 +02:00
Sam Bowlby
bcde43d369 add VPN/Wireguard symbol to statusbar
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 16:41:54 +02:00
Sam Bowlby
83d27eec2d add VPN/Wireguard symbol to statusbar
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 16:39:33 +02:00
Stacy Harper
c6764c2a0d Fix an issue when number was composed by multiple words
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 12:39:39 +02:00
Maarten van Gompel
6dc18e22a3 fixed minor shellcheck issues 2021-04-05 12:08:22 +02:00
Stacy Harper
f9b96d2d28 Update modem status state on errors
If modemmonitor crash for some reason, status bar is not updated. The
reason is that statusbar check if modemmonitor is running, which it is
when trying to shutdown itself.

We change the way modemmonitor is detected using a single modem state
file. If the file is not present, then the monitor is considered not
running.

This single file permit to add more state in the future, without adding
any more files.

We also add a sleep 1, look like it is required to have instand status
bar update.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 12:04:34 +02:00
Stacy Harper
262418637f Rework of the sxmo_modemtext with benefit
* Draft files are assigned to each number:

Stored here ".local/share/modem/+33666666666/draft.txt"
We automatically edit this single file, making crash or unexpected
edition issue to leave intact saved draft.

* Simplification of some logics

Having a known draft file instead of using a TEXT var simplify lots
of things

* EDITOR is not run in a subshell

Some editors as kakoune got issues with that. Futhermore, it will be
usefull for some other development as making all menu ssh mode
compatible

* Remove modem check

As we now got draft, why do we care if modem is up or down ?

* Display the contact name instead of it number in the conversation

Or use "Unknown Number (+337798676)"

* Unify display message notif adding possibilities to bypass the
main menu

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-05 12:00:49 +02:00
Stacy Harper
016363dd57 Move no before yes to confirm
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-04 20:56:54 +02:00
Stacy Harper
7c7496c06f Add icons to the contactmenu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-04 20:56:24 +02:00
Stacy Harper
82301e6954 Add shortcut to sms or call a contact from the contactmenu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-04 20:56:13 +02:00
Maarten van Gompel
8959fa50ac fixed top right hotcorner #229 2021-04-02 17:45:52 +02:00
Maarten van Gompel
b37a1fb8b5 Fixed anbox start command #230 2021-04-02 17:38:03 +02:00
Anjandev Momi
47ef03f48c
change dino to scale=1 because of global dpi scaling
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-04-01 15:41:01 -04:00
Maarten van Gompel
da3dba4bfb minor fixes to satisfy shellcheck 2021-03-31 20:14:53 +02:00
Maarten van Gompel
ae3e1edd9c kill existing dmenu prior to asking SIM PIN 2021-03-31 17:05:42 +02:00
Stacy Harper
ceaea60141 Add some gemini apps
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-31 13:39:09 +02:00
Stacy Harper
fac35e8b6c Add some scroll shortcuts to weechat
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-31 13:37:39 +02:00
Maarten van Gompel
81385c228d we expect people to upgrade with apk upgrade -a (quoting ollieparanoid from pmos) 2021-03-31 11:48:32 +02:00
Maarten van Gompel
cdadb27884 implemented simple unlock sim script using dmenu 2021-03-31 11:42:21 +02:00
Maarten van Gompel
c5c8f3d514 Modem monitor now tracks the modem for state changes and shows the state in the status bar 2021-03-31 11:42:21 +02:00
Stacy Harper
dbc3b1ab50 Allow the sendnewtextmenu to be used with a number as arg
This allow the "Reply" appmenu shortcut to open a new compose message
directly.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-30 21:14:30 +02:00
Maarten van Gompel
856ba23cde ensure clickclack and svkbd are killed prior to suspending (may fix a sound stuttering problem) 2021-03-30 21:02:42 +02:00
Maarten van Gompel
bec7106317 Implement default hooks for ringing and incoming texts, playing audio 2021-03-30 21:02:42 +02:00
Maarten van Gompel
2188ed15ea forward parameters to lisgdstart hook (as suggeested by ~dinkocar in #222) 2021-03-30 20:36:02 +02:00
Stacy Harper
18361bd681 Revert "Use less as sms pager to allow scrollback"
This reverts commit 3bb3fb6094.

We cannot use this special less argument as it is not busybox less
compatible.

I add busybox aliases to not reproduce the error in the future.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-30 19:08:17 +02:00
Stacy Harper
4bf92406d0 Try to make bluetooth menu connection more reliable
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-29 20:29:22 +02:00
Maarten van Gompel
086c103eb2 added an edit configuration option to the menu to edit the user's xinit 2021-03-29 14:29:23 +02:00
Maarten van Gompel
5f82699014 Added a more detailed xinit_template and added some default media resources (wallpaper,startup tune,keypress sound) that are preconfigured in the template 2021-03-29 14:00:09 +02:00
Stacy Harper
7bbb56723f Move conky in an auto configured user xinit
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-29 11:41:51 +02:00
Maarten van Gompel
e0cff05b0c compatibility with megapixels 0.16: power button takes a picture instead of toggling the keyboard, only when megapixels is active 2021-03-28 22:15:25 +02:00
Maarten van Gompel
c4caf932ff fixing the powerbutton script 2021-03-28 21:28:42 +02:00
Maarten van Gompel
36535ebfe3 added another layer between the power button press and the keyboard script, with option to override using a hook 2021-03-28 21:25:43 +02:00
Stacy Harper
325fdf76ec Do not run SHELL in login mode
As this mode is used on console and SSH login

(this reverts 8fc92c55d5)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-28 20:53:34 +02:00