Commit graph

318 commits

Author SHA1 Message Date
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
Maarten van Gompel
f0d40f28fc Fix for shellcheck problem and whitespace issue as suggested by Reed Wade (also stripping trailing spaces)
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 14:14:57 +01:00
Maarten van Gompel
0f685fa3a4 minor cleanup for "unmute" patch so it passes shellcheck 2020-11-01 13:59:16 +01:00
Reed Wade
56efe6e166 Autocomplete WPA networks with scanned ones
Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 13:12:03 +01:00
Dmytro
6aaca4b161 Unmute fix
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 13:04:36 +01:00
Maarten van Gompel
86469c9b60 applied the same logic to the system menu: fix crash on open menu if already open 2020-11-01 13:01:21 +01:00
Sam Bowlby
c1aa407414 fix crash on open menu if already open
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-11-01 12:59:36 +01:00
Anjandev Momi
bfba94b93f handle missing and uncreatable notifdirs more gracefully
Original patch by ~kgp445

https://todo.sr.ht/~mil/sxmo-tickets/94
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2020-10-31 18:30:25 -04:00
Maarten van Gompel
8dc0b9ca45 Implemented suggested fix for Notifications menu fails with special characters (#78) 2020-10-31 23:01:23 +01:00
Reed Wade
1edb932f44 fix a bug on picked notification file determination
If a notification body include a double whitespace, the PICKEDNOTIFFILE
computation fail to match cause we striped them when building the dmenu
choices.

To give an example, try to write this notification as

$ sxmo_notificationwrite.sh "random" \
"st -e tail -n9999 -f \"$HOME/.config/sxmo/xinit\"" \
"$HOME/.config/sxmo/xinit" \
"this body  is broken"

This patch fix this bug.

(Maintainer note: I changed the awk invocation to use tr, as suggested
by anjan)

Signed-off-by: Reed Wade <reedwade@misterbanal.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-10-31 22:55:50 +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
Maarten van Gompel
e8e4c77a51 swapped the two move-window-to-next-desktop gestures, the direction of the swipe is now the direction of movement (makes more sense imho)
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-10-31 13:54:49 +01:00
Maarten van Gompel
6448587eb8 complete revision of gestures, using new edge system
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2020-10-31 13:53:46 +01: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