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>
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.
On arch the dialer was crashing because systemd put a directory in
XDG_RUNTIME_DIR that wasn't readable by the user, and find was searching
XDG_RUNTIME_DIR recursively for call state files to delete.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
317bf34f2e introduced a small typo in the
comment. Also the 'hangup' hook should *not* call the missed call hook,
since these are in principle distinct. (On my machine, for instance, I
have missed calls e-mailed to me; but I don't want hangup calls e-mailed
to me.) (See also sxmo_hook_discard.sh)
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Was easy to produce : Disable wifi with the Config menu then
go to the Networks menu.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This "Reset call audio" entry re-trigger a sxmo_modemaudio.sh
setup_audio. It can be usefull when connecting/disconnecting earphones
and if pipewire automatically toggle the current mode.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
We need the recent -S (status) command to probe the real state of
callaudiod.
- Lot of cleanup and refactorisation
Most of the code has been moved to a better place. The call audio
setups, the pickup action and the incall menu now are three different
things we can call individually.
- Handle failures individually
Every important task as the mmcli command or volume settings should warn
a urgent message to the user if they failed.
If we failed to setup audio, or to pickup the call then we dont even try
to open the incall menu.
- Made the incall_menu closeable and re-opennable
You can close the incoming call menu and the incall menu and re-open
them from any menu.
To make this possible I moved some of the responsibilities to the
modem monitor that trigger action after modem manager signals. We then
check at this point if it was the last call and do some cleanup if so.
- Initial work for concurrent calls
Added some code to the hooks and the modem checkfinished and
checkincoming calls to handle those cased. If you are in a call and someone
else try to call you, we refresh the incall menu and new entries will allow
you to switch calls.
- The incall menu isnt sticked to one call
This menu itself doesnt need a CALLID argument. It allow us to
manage every active call. We should be able to hold and hangup and
switch calls as we want.
- Simplify the menus code
We use new patterns to make it simple to read the code
- Use callaudiod
This script isnt pulseaudio/pipewire perfectly compatible. It doesnt
create nodes that are natives and managed by those audio daemons. But it
connect to thoses to know the audio setup and offer a simple cli to
manage basic commands as speaker toggle by example. It also handle ootb
the connected jack audio devices which make our life way simpler.
This solution isnt perfect but it is better than the megi script we use
atm that is pinephone specific.
- Move sxmo icons in sxmo_icons.sh
This script should be loaded when icons are needed
- Move init env variable setups in a /etc/profile.d/sxmo_init.sh
This script is loaded by tinydm and for ssh/tty logins.
The logged in user can re-trigger check_sxmo_wm if they toggle wm.
- sxmo_commons.sh now only load aliases. It can be loaded by scripts to
ensure busybox compatibility
- moved some parts of ~/.config/sxmo/xinit to ~/.config/sxmo/profile
This file also is loaded just before starting sway. It goal is to setup
env variables dedicated to sxmo
~/.config/sxmo/xinit only goal is now to trigger some dwm dedicated
things (as ~/.config/sxmo/sway can start exec commands to)
To recap, loads orders are :
tinydm:
/etc/profile.d/* # do not set SXMO_WM
~/.profile
sxmo_winit.sh:
~/.config/sxmo/profile
sxmo_xinit.sh:
~/.config/sxmo/profile
~/.config/sxmo/xinit # to start sxmo_hooks.sh
ssh/tty:
/etc/profile.d/* # will set SXMO_WM
~/.profile
- unify sxmo_winit.sh and sxmo_init.sh
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Add a sxmo_daemons to manage all sxmo daemons
$ sxmo_daemons.sh start mmsd mmsdtng
$ sxmo_daemons.sh start network_monitor sxmo_networkmonitor.sh
$ sxmo_daemons.sh start sleepy sleep 2
$ sxmo_daemons.sh start network_monitor sxmo_networkmonitor.sh
-> This will stop the old daemon and start a new one
$ sxmo_daemons.sh running network_monitor
network_monitor is still running
$ echo $?
0
$ sxmo_daemons.sh running unknown
unknown is not running
$ echo $?
1
$ sxmo_daemons.sh running sleepy
sleepy is not running anymore
$ echo $?
2
$ sxmo_daemons.sh running network_monitor -q && echo "tada !"
tada !
$ sxmo_daemons.sh stop network_monitor
$ sxmo_daemons.sh stop all # to stop every managed daemons
We can now start, stop and check daemons status with ease. When
dwm/sway shutdown, we stop all daemons. Restarting or toggleing window
manager cannot leave any dangling daemons anymore.
As you can see, all daemons now start from the start hook. We gave the
full power on the user to disable or add daemons.
This patch is painfull cause I had to make sure every daemons behave
correctly and shutdown gracefully when killed (which was definitely not
the case !).
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
The current sxmo status bar cause a high cpu usage periodically. It was
working by triggering a script that build the whole line.
This is a proposition to improve this implementation:
The design is very simple. We got a root dir that contains files. We
will cat those file contents sorted by the file names.
This way we can update a specific part and the rewriting will then be
very light.
Some abstraction to make it simple:
$ sxmo_status.sh show
To display the current content
$ sxmo_status.sh debug
To help fuzzy developpers like me
$ sxmo_status.sh watch
To watch updates of the component files. Will stdout the new line on
change.
$ sxmo_status.sh add 99-time "11:35" # or
$ printf "11:35" | sxmo_status.sh add 99-time
To add or re-write the component 99-time with the content "11:35"
$ sxmo_status.sh del 99-time
To drop a component
Then, to wrap some of the sxmo status bar component we will still use
the statusbar hook. It make it easy for the user to override or drop
some components.
$ sxmo_hooks.sh statusbar time
To set the time based on the current time. Here other existing
components:
$ sxmo_hooks.sh statusbar call_duration
$ sxmo_hooks.sh statusbar modem
$ sxmo_hooks.sh statusbar modem_monitor
$ sxmo_hooks.sh statusbar wifi
$ sxmo_hooks.sh statusbar vpn
$ sxmo_hooks.sh statusbar battery
$ sxmo_hooks.sh statusbar volume
Or to rewrite everything:
$ sxmo_hooks.sh statusbar all
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Any sane linux system will have a posix compliant shell at /bin/sh
This change will allow us to better detect running scripts using pgrep.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This makes Incming Call behave like other cases. If the # is not in
contacts, then print the # rather than "???"
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Noticed that a missed call notification still came in on muted calls.
After this fix, modemmonitor checkforfinishedcalls identifies cachefile
correctly.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This is a huge patch for Swmo, Sxmo over Sway.
It is Dwm backward compatible so dwm users should not expect regressions.
If you install all dependencies, you then can toggle between Sway and Dwm using a new config entry. It will reboot the phone.
This commit also contains:
* Make the modemmonitor bullet proof
* various other smaller fixes
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>