Commit graph

97 commits

Author SHA1 Message Date
Maarten van Gompel
7669fa341e adding icons to menus 2021-02-01 18:32:32 +01:00
Maarten van Gompel
24905884ee Removed explicit font from most dmenu calls, dmenu font is read from Xresources now and kept as uniform as possible 2021-02-01 18:32:32 +01:00
Maarten van Gompel
c58fa6a1e9 Added an option (extra notification) to discard an incoming call #157 2021-01-30 21:41:08 +01:00
Maarten van Gompel
24f8ed8478 wait for modem for a bit when it is not immediately available yet (e.g. after crust wakeup) 2021-01-30 21:41:08 +01:00
Maarten van Gompel
1608ab1ae4 increased verbosity in various scripts, and do not run xargs kill when argument is empty (cleaner and clearer stderr messages) 2021-01-30 21:41:08 +01:00
Maarten van Gompel
a42f160ed2 make modemmonitor's dbus hooks more robust and prevent being triggered multiple times 2020-12-09 15:46:21 +01:00
Maarten van Gompel
9a4df9fd28 reworking handling finished/missed calls #134 2020-12-09 15:46:21 +01:00
Maarten van Gompel
2a07cab638 implemented lookupcontactname() in call/text handler, removes non posix-compliant substitutions 2020-12-09 15:46:21 +01:00
Maarten van Gompel
4b4bfc851f explicitly delete calls after hangup/termination #134 2020-12-09 15:46:21 +01:00
Maarten van Gompel
06b25c3bc9 Restore audio to original state after finishing a call #133 2020-12-09 15:46:21 +01:00
Maarten van Gompel
4a90d86f56 Sane message when terminating call with unknown number and more verbose output to stderr from modem scripts 2020-12-09 15:46:21 +01:00
Anjandev Momi
e067fd9ad6 Revert "simplify code to get phone number for incoming calls"
This reverts commit b0bb9ac9fc.

This fixes the issue with modemlog having filled with extra mmcli
output
2020-12-05 23:16:59 -05:00
Anjandev Momi
abd931d9ce shellcheck fix: use -n instead of ! -z 2020-12-04 23:20:54 -05:00
Maarten van Gompel
031bb9de21 no need for number validation when cancelling dialer 2020-12-04 22:15:58 +01:00
Anjandev Momi
236ab9a343 Do not display text only numbers as options when dialing or composing new texts
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-12-04 22:07:27 +01:00
Anjandev Momi
741defe781 Fix short phone numbers or phone numbers with text do not appear in scripts
Fixes #106

Signed-off-by: Anjandev Momi <anjan@momi.ca>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-12-04 22:00:29 +01:00
Anjandev Momi
b0bb9ac9fc simplify code to get phone number for incoming calls
This code uses fewer programs and the code now matches the code for
getting phone number of incoming text.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-12-04 22:00:29 +01:00
Maarten van Gompel
17e3b623bf modemmonitortoggle may take an argument "on" or "off" to force toggling to a desired state
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-12-01 22:47:00 -05:00
Maarten van Gompel
c915de82d8 Force new process group using setgid -f when starting anything that may possibly kill an entire progress group (kill -9 0) #117
This fixes https://todo.sr.ht/~mil/sxmo-tickets/117 and the crashes when
toggling the modem monitor.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-12-01 22:47:00 -05:00
Anjandev Momi
8b87386006 Fixed user log out when selecting "Close Menu" in dialer
See issue:

https://todo.sr.ht/~mil/sxmo-tickets/117
2020-11-29 02:56:17 -05:00
Maarten van Gompel
a90f565c12 minor quote fix to satisfy shellcheck 2020-11-20 18:17:57 +01:00
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