On sdm845 devices, I would get the same text multiple times. Even
though, the person sending the text only sent it once.
I ran the sxmo modemmonitor daemon manually and got the following
log:
```
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13225" (uid=10000 pid=24991 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13227" (uid=10000 pid=24994 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13226" (uid=10000 pid=24999 comm="dbus-monitor --system interface='org.freedesktop.D") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
Failed to open connection to session bus: Failed to connect to socket /tmp/dbus-QIILCAmZIu: No such file or directory
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13228" (uid=10000 pid=25007 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
error: couldn't delete SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't delete 1 parts from this SMS'
/home/user/.config/sxmo/hooks/sxmo_hook_sms.sh: line 20: go-sendxmpp: not found
successfully deleted SMS from modem
/home/user/.config/sxmo/hooks/sxmo_hook_sms.sh: line 20: go-sendxmpp: not found
```
The important line is:
```
error: couldn't delete SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't delete 1 parts from this SMS'
```
After applying this patch, I only recieve texts once. I dont know why deleting
text command fails the first time. Moreover, this patch fixes the double
text issue on sdm845 devices.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
* Make icon_prn a nerd-font icons. It was using a font awesome code
point, which we don't install with sxmo.
* Fix phone locked and laptop icons that weren't automatically updated
* Fix brightness icon in legacy nerd-fonts range and move it to
sxmo_hook_icons from sxmo_brightness
* Use standard Unicode arrows instead of nerd-fonts ones
* Use icon variables for arrows in sxmo_wmmenu.sh
* Add variable for audio icon & use in sxmo_audio.sh
* Remove no stray break space from sxmo_contactmenu
* Remove up arrow character from reddit script
* use only icon variables in modemtext
* Update icons breakpoints
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Gnu printf interprets these to be arguments instead of a format string
which breaks sending mms.
Also ATTACHMENTS_ARG was being overwritten make_attachments_arg causing
messages to not have the description included, only the attachment.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
The lsof / grep call is broken and causes the script to crash when
adding or removing a recipient.
Lsof also doesn't have a stable output format, and the format is
different between the busybox and gnu versions, so we shouldn't be
trying to parse the output of it.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This implements simple hooks when we enable / disable callaudio. The
"hack" in our current code is pretty specific to pinephone, and I think
that users might also want to, e.g., bump volume when receiving phone
call, or otherwise tweak some sound settings.
Depends on the Massive MMS Rewrite patch. This cleans up sending an mms
dramatically --- we weren't doing proper checks if failure, for
instance.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
The problem this MMS rewrite was supposed to address is the fact that
MMS writes the *contact names* and not the *phone numbers* to the log
files, whereas SMS writes the *phone numbers* and uses sed on
tailtextlog to conver these after the fact. SMS was doing things "the
right way" and MMS was doing things "the wrong way", so I wanted to
bring the two into harmony.
Note that this fix will *should* be fully backwards compatible too.
Along the way, I realized that we could split some things out. In
particular, I now have:
sxmo_hook_smslog.sh, which allows a user to change the look-and-feel of
how things get logged. (This might be not used very much.)
I also streamlined MMS code to make it more readable (since I couldn't
read bits of it after a year or so having written it).
I also implemented sxmo_contacts.sh --name-or-number (print the contact
name, and if there is no contact name print the number back at us, as
opposed to '???'). This cleaned up some code in other places.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This implements sxmo_hook_smslog.sh which allows the user to establish
how logging looks.
We were also inconsistent on this: mms would set the contact names in
the logfile whereas sms ony gave the numbers and used a sed to convert
them.
I tought about setting this in sxmo_hook_tailtextlog.sh, but:
(1) processing on a tail is a PITA
(2) one can get the "raw" data for sms.txt from modelog.tsv.
I implemented a basic and a fancy option, but it is really up to the
user.
I also implemented sxmo_contacts.sh --name-or-number and so was able to
clear out the '???' code all over the place.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This is a new approach to cleanup and fix issues we have with the
proximity lock. Discussed between Peter and me over irc.
We set "proximity[un]lock" in SXMO_STATE. This allow the input handler
to ignore power buttons while in this state. We then can't manually
change states anymore. It become possible to configure dedicated
hardware buttons trigger, or gesture trigger, to manage the current
call while in this state, by example.
The proximitylock also setup exclusive flock over the state lock
file (as other state switcher does). It prevent other state scripts to
trigger and to break the state consistency.
We stop the idle_locker to prevent 120s, and 8s timers to move the sxmo
state deeper.
When proximitylock stop, it execute back the initial state script,
to return to initial state.
I'm not sure if a user would ever want to just turn on proximity
lock, and it does kind of make the code ugly and complicated.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
These were added a long time ago to remove the ear icon, but this is now
all done via sxmo_modemaudio.sh calls.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Turning on debug, I noticed that every 8s or so, it'd try to free
everything in sxmo_hook_check_mutexes.sh, which would call
sxmo_mutex.sh:free() which would call flock, grep, cut, xargs, sed, etc.
Importantly, this would also call sxmo_hook_statusbar.sh lockedby, which
sucks up a lot of CPU.
I decided to move the statusbar update out of mutex, and hvae only one
update for all of check mutexes.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
I wanted to have no text at all when I start a text message, but setting
SXMO_DEFAULT_DRAFT="" resulted in the code thinking it was not set and
reverting back to the "Enter new text message here." This change fixes
that.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Superd handles cleaning up any child processes we start, that logic can
be removed from this script. Using superd should also make this more
reliable, and provide better logging facilities.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This brings sendsms into comformity with sms hook. This information is
useful in sendsms hook, e.g., if I want to copy out my sent sms/mms to
a logfile or another application (as I do with my received sms), via the
hook.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This moves the dbus calls to cleaner functions and adds some
error checking/warnings on failures.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This is handled by dbus automatically. And the way it's done here causes
the script to hang if callaudiod hasn't been started yet.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Opening a terminal window to read dtmf tones makes it possible to use a
physical keyboard to enter them. Not needing to read keys from
{wvkbd,svkbd} -o should make things generally more robust too.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
If we attempt to make an outgoing call whilst on an outgoing call, the
modem crashes, and we can't make any new calls until we
rm -rf $XDG_RUNTIME_DIR/sxmo_calls/*
Signed-off-by: Anjandev Momi <anjan@momi.ca>
This patch is *just* an implementation of the pulse audio menu.
(The bugfix for call mode is now a separate patch, so too the
additions to statusbar.)
1. Implements the sxmo_audio.sh menu for pulse completely using ONLY
pactl (so we don't need pamixer).
2. Cleans up the InCall menu.
A further patch will remove extra alsa functions.