Commit graph

76 commits

Author SHA1 Message Date
Maarten van Gompel
7fb7cd70f3 various indentation fixes (spaces to tabs and stripping trailing whitespace) 2020-11-20 18:10:17 +01:00
Miles Alan
96931ce22c Add back saftey hook for incoming calls to delete notifications if none incoming 2020-11-20 17:30:06 +01:00
Miles Alan
f2fc6a406e Missed call rework: Use dbus to check for missed calls & properly delete pickup
Use dbus to monitor for missed calls. Missed calls used to work but had a
regression due to the work to make text/calls used dbus. This adds the proper
dbus hook for missed calls as well and also changes the incoming call
notification to allow for multiple incoming calls (theoretically).

Tested for a single caller and transitioning the pickup notification
into a missed call notification and all is working good.
2020-11-20 17:27:37 +01:00
Anjandev Momi
e11cf9e523 move sxmo data to XDG_DATA_HOME
Breaking change. Make sure you send an email to the mailing list
telling users to move their
$XDG_CONFIG_HOME/{modem,notifications} files/folders to
$XDG_DATA_HOME

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-11-08 19:45:39 -05:00
Reed Wade
cd7762d92a The ring hook was blocking the notification writing.
The hook must be run asynchronously. This allow ringtones to be played
using mpv by exemple.

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-08 14:33:26 +01:00
Reed Wade
6f94bb8159 Add a new pickup hook that trigger on accept incoming calls
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-08 14:33:26 +01:00
Maarten van Gompel
00846a1608 don't stumble over single quotes when sending SMS texts and replace double quotes with double single quotes to avoid trouble (a bit patchy)
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-06 21:42:40 +01:00
Reed Wade
f539e45459 Prevent stderr that DRAFT_FILE could not be found.
DRAFT_DIR is also used in the main loop so this prevent logging to sterr
ls: cannot access '/home/foobar/.config/sxmo/modem/draft': No such file or directory

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-06 21:27:54 +01:00
Serge E. Hallyn
cbeaecbef5 sxmo_modemdial.sh: quiet the grep
When I try to dial a call from 'more contacts', I get

Attempting to dial: +19362396134
Starting call with CALLID: 0
error: invalid call string specified: 'More contacts
0'

This is because dialmenu() is getting an extra 'More contacts'
prepended to the callid it returns on stdout.  Make the grep
which is causing that quiet using -q.

I'm not sure why this isn't hitting everyone else.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-11-02 22:24:37 -05:00
Anjandev Momi
6199f54b21 sxmo_modemtext: postpone renamed to draft. Open more contacts on ssh 2020-11-01 17:17:18 -05:00
Reed Wade
65d9d60ff1 Add more contacts choice to contact list
The dialer only included recent callers, but there was no way to access
the full contact list (contacts.tsv). I added a "more contacts" options
that calls sxmo_contacts --all, providing an alphabetically sorted list
of all your contacts. It also works for the texting menu.

This is a cleaned up version of an earlier patch by Maarten van Gompel.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 17:58:25 +01:00
Reed Wade
f6e98f2754 Move the send sms logic in a dedicated script
This allow userscripts to send sms using the sxmo way so we now can
create our own sms clients.

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 14:30:20 +01:00
Maarten van Gompel
e11d3aaea3 some minor cleanup of issues detected by shellcheck after applying the patch: 'modemmonitor: use dbus-monitor' 2020-10-31 22:37:21 +01:00
Reed Wade
1e00b72d90 fix a notification bug when sms come from whitespace content number
We quote the sms path on notificationwrite to prevent buggy commands.

mn: This patch fixes texts from numbers like "CREDIT AGRICOLE"

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-10-31 13:35:52 -04:00
Julian P Samaroo
72cc974f20 Added option to postpone and resend text messages
Text messages which fail to send will now automatically postpone

(maintainer note: I incorporated a minor shellcheck fix)

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-10-31 13:35:00 +01:00
Maarten van Gompel
19efcf927e Sep 8: call checkformissedcalls at first run, and then also any time that checkforincomingcalls did not actually find a call (i.e. ... missed it)
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-10-31 13:09:35 +01:00
Serge E. Hallyn
99099a359f modemmonitor: use dbus-monitor
Instead of looping over mmcli commands to check for incoming
calls and texts every 3s, use dbus-monitor to tell us when
something is coming in.  This should save some battery life
as well as reduce the delay in new call/msg notification.

I was running on the latest released scripts, so have not
strictly tested this with git master.  Note that I dropped
the call to checkmissedcalls.  Perhaps we should still run
that at firststart?

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-10-31 13:06:28 +01:00
Anjandev Momi
c94e58f6d2 modemmonitor: fixed no contact name displayed in notifications and new folders without + 2020-09-15 19:27:56 -05:00
Miles Alan
4c24155a62 Don't delete leading + from incoming calls in sxmo_modemmonitor.sh 2020-09-13 09:14:08 -05:00
Julian P Samaroo
bbdf195090 Show one line in previewing text message to edit 2020-08-31 22:14:21 -05:00
Sam Bowlby
93de0d4d84 correct variable name for incoming text number used in sms hook 2020-08-31 22:13:51 -05:00
Maarten van Gompel
565eae8835 Updated handling of '+' in phone numbers, it is now never stripped but expected: all numbers should be full international phone numbers (including in contacts.tsv).
Ensure contacts from modem and contacts lists are all fully qualified phone numbers (starting with + and carrying a country prefix). This effectively filters out older/incompatible entries.
2020-08-26 23:24:27 -05:00
Miles Alan
747da7863c Fix shellcheck 2020-08-22 16:45:49 -05:00
Miles Alan
45c571727c Cleanup logic for notification LED setting; increase default call volume 2020-08-22 16:16:26 -05:00
Miles Alan
8e1c40e832 Delete calls from modem on terminating the in call script 2020-08-22 14:53:17 -05:00
Miles Alan
17fb103ee3 Create a new notification when there is a missed call 2020-08-22 13:44:05 -05:00
Miles Alan
5f8aad0386 Fix bugs with incall functionality around statusbar showing call duration 2020-08-22 12:21:51 -05:00
Miles Alan
c5b665ca4f Look for ATTRIB events for notifications updates; remove "Pickup" menu
Picking up call can be done from both dunst notification & notifications menu;
so for more consistency / less bugs the Pickup menu entry has been removed.
2020-08-22 12:21:51 -05:00
Maarten van Gompel
7ec9ca2db1 pass incoming phone number to the ring hook (allows distinctive rings/actions based on caller) and added a similar sms hook 2020-08-18 20:59:22 -05:00
Miles Alan
faf9bfc48d Refactor notifications work to use 1 interface for writing notifs & use dates
Summary of changes:
1. Always use the sxmo_notificationwrite.sh script to write notifications
   rather then sometimes using echo to the DIR
2. Reorder args for notiffile spec to be action as 1st line, watchfile 2nd, and
   rest as msg; this way msg can be multiple lines without propogating bugs
3. Write calls as a standard notification via sxmo_notificationwrite.sh
4. Use datestamps from notification files instead of filename, this way (3)
   works without extra logic
5. Various style fixes
2020-08-05 23:32:39 -05:00
iressa
e6635ba7ef Notification patch v4 2020-08-05 23:32:39 -05:00
Miles Alan
4362eacde2 sxmo_modemtext.sh - use variable name $CONTACT rather then $TDIR 2020-07-30 19:39:20 -05:00
Anjandev Momi
a8910cb2c6 text: show logfiles in order of last contacted (use sxmo_contacts.sh) 2020-07-30 19:33:00 -05:00
Miles Alan
3e23624651 Fix typo in sxmo_modemtext.sh 2020-07-23 16:45:15 -05:00
Anjandev Momi
92c368c01f allow texting over ssh terminal
Signed-off-by: Miles Alan <m@milesalan.com>
2020-07-23 16:44:09 -05:00
Miles Alan
36520d487e Change ring hook location to ~/.config/sxmo/hooks/ring 2020-07-18 10:38:28 -05:00
Dmytro
9378530a1b Ringing sound configurable
Signed-off-by: Miles Alan <m@milesalan.com>
2020-07-18 10:38:28 -05:00
Miles Alan
5c4c6c15e2 Refactor xinit to be more structured and set $EDITOR if unset to vis 2020-07-18 10:14:58 -05:00
Miles Alan
0801bb1adb Restructure configs into seperate folder 2020-07-12 19:29:46 -05:00
Miles Alan
d713b19199 Use sxmo_statusbarupdate.sh script instead of direct calls duplicated logic 2020-07-12 11:38:31 -05:00
Miles Alan
87c99ec024 Use USR1 signal instead of update file for updating statusbar 2020-07-12 11:32:02 -05:00
Anjandev Momi
07119a7085 make dmenus with contact names case insensitive
Signed-off-by: Miles Alan <m@milesalan.com>
2020-07-07 23:31:28 -05:00
Miles Alan
18745b05bb Use setsid to update /tmp/sxmo_bar after call to refresh bar after process dead 2020-06-29 20:12:39 -05:00
Miles Alan
f058e17369 SIGKILL on close menu in dialer 2020-06-29 19:54:15 -05:00
Miles Alan
ad39251c5d Show incoming contact name on ring; show texts in reverse chronological order 2020-06-29 18:22:02 -05:00
Miles Alan
844ce9ddef Plus prefix strip numbers before storing into modem log 2020-06-29 15:24:34 -05:00
Miles Alan
e3f50e9d1b Only show entries to text for directories that exist; fix number bugs 2020-06-29 15:24:30 -05:00
Miles Alan
a032e4923e Remove +1 stripping from numbers in modem scripts
Note prefix stripping was unreliable because any +1XX number would break things.
The advice should be to always dial with +1 / international prefixes and store
contacts in your contacts.tsv with international codes; this way we avoid any
duplicate errors since we can be assured things in mmcli always come back w/
international prefixing automatically.
2020-06-29 11:43:22 -05:00
Anjandev Momi
f95cb51984 add contacts.tsv integration to call and text apps
Signed-off-by: Miles Alan <m@milesalan.com>
2020-06-29 10:30:54 -05:00
Miles Alan
c119ab0145 Pull dialing functionality into seperate script; allows in-call check to be valid 2020-06-27 21:28:46 -05:00