Commit graph

334 commits

Author SHA1 Message Date
Daniele Rogora
bcf4f5c249 Workaround for reliable incoming calls waking up from CRUST
Replaced system() call with writefile()

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-12-05 11:58:31 +01:00
Anjandev Momi
0f9a86dece sxmo_appmenu: fixed only one userscript appearing in Scripts menu
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-12-04 23:49:02 -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
f149b7e250 updated sxmo_contacts comment with acceptable numbers
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
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
Miles Alan
9aa5c7bf16 Standardize install path for mimeapps.list to use $PREFIX 2020-12-01 17:21:43 -06:00
Reed Wade
fadbe72039 Use mono differencial as default Line Out mode
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-29 12:34:45 +01: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
Anjandev Momi
f2a3ad47cf Added default sxmo applications mimeapps.list 2020-11-28 03:10:51 -05:00
Reed Wade
08b95c6182 sxmo_files now respect user desktop configurations
We use our own implementation of xdg-open that replace the hardcoded
script used in sxmo_files.

We add and will maintain some desktop entries to offer a suckless
experience by default.

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-11-28 02:39:25 -05:00
Maarten van Gompel
a90f565c12 minor quote fix to satisfy shellcheck 2020-11-20 18:17:57 +01:00
Maarten van Gompel
10f813b1eb editorcheck update: restrict to shell scripts and C programs for now, and removing the maximum line length check for now. 2020-11-20 18:13:31 +01:00
Maarten van Gompel
7fb7cd70f3 various indentation fixes (spaces to tabs and stripping trailing whitespace) 2020-11-20 18:10:17 +01:00
ivoulis
24380603a4 Do not start lisgd if it is not running (e.g. lockscreen) 2020-11-20 17:35:43 +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
Miles Alan
8abe870012 Make suspendtimeout for screenlock cutomizable via SXMO_SUSPENDTIMEOUTS
This way if someone wants a longer or shorter timeout that possible
by setting the env var SXMO_SUSPENDTIMEOUTS.

Also change the default to be 35s. This is roughly the duration of
ringing for an incoming phone call.
2020-11-20 17:27:37 +01:00
Serge E. Hallyn
16d77bcd86 sxmo_weather: add wind direction
It's important for me to see wind direction in addition to speed.  I
understand most people probably don't care, so we should probably show
this only if xinit sets WEATHER_WIND_DIR=1?  But we can bikeshed that
later, for now here's what I'm using on my phone right now.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2020-11-20 17:23:21 +01:00
Anjandev Momi
7d4b729b85 fix builds button to only show sxmo-utils tests 2020-11-08 22:08:43 -05:00
Anjandev Momi
0a90d03154 changed line length to 80 2020-11-08 21:57:07 -05: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
Anjandev Momi
65f18565f1 add editorconfig and editorconfig check 2020-11-08 19:20:53 -05:00
Anjandev Momi
ab3bb9bcdd kill the keyboard on rotation 2020-11-08 19:20:53 -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
Reed Wade
7066b54897 Give notification file to the notification hook
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-08 12:21:56 +01:00
Maarten van Gompel
be05c10163 quote fix as suggested by shellcheck 2020-11-08 12:17:14 +01:00
Anjandev Momi
b56cd2b6cb sxmo_youtube: move history file to XDG_CACHE_HOME 2020-11-08 00:22:44 -05:00
Anjandev Momi
a0c6e4c2e2 enable bluetooth and modem drivers during crust suspend
With the megi 5.9 kernel and other suspend-related merge requests in
postmarketos, disabling these drivers is no longer needed. All of this
should result in a more reliable suspending system.

Source: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1651
Signed-off-by: Miles Alan <m@milesalan.com>
2020-11-07 08:28:27 -06:00
Miles Alan
acf21efba8 Fix wakeup from CRUST for incoming call for 5.9 kernel 2020-11-07 08:05:50 -06:00
Maarten van Gompel
ce188e2f26 Use $SHELL, fix after patch: Start terminal with a login shell if run from dmenu
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-07 00:00:43 +01:00
Andre Ramnitz
8fc92c55d5 Start terminal with a login shell if run from dmenu
Fixes sourcing of /etc/profile etc.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-06 23:59:58 +01:00
Andre Ramnitz
a59aa85ee4 Don't touch $TERM
This name already exists and is usually set
by the terminal or a multiplexer.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-06 23:59:29 +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
Reed Wade
0ae9825752 Replace the camera script with the Megapixel app
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-11-02 22:38:44 -05: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
90ddbc3e74 move dwm.log to $XDG_CACHE_HOME 2020-11-02 14:59:54 -05:00
Reed Wade
9b88aeb3d2 reopen file dmenu after handled it
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-11-02 12:29:32 -05:00
Anjandev Momi
6199f54b21 sxmo_modemtext: postpone renamed to draft. Open more contacts on ssh 2020-11-01 17:17:18 -05:00
Maarten van Gompel
178c746d85 shellcheck fix after applying "more contacts" patch 2020-11-01 18:17:33 +01:00
Maarten van Gompel
a537bea76a changed default background colour (to be the same as the one in sxmo-xdm-config)
it's subjective, but the old one was rather ugly imho. Of course people
should customise it in their own custom xinit, but it might be
better if the default is a bit more appealing to the eye as it's the
first thing new users will see.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 18:01:41 +01: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
Maarten van Gompel
0e4406bffa added vlc to app menu
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 17:35:52 +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