Commit graph

652 commits

Author SHA1 Message Date
Stacy Harper
8a27933c47 SWMO - SXMO over Wayland
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>
2021-08-22 13:23:22 +02:00
Stacy Harper
b1403f983e Allow the inputhandler hook to override locked state inputs actions
The user may want to change completly the buttons actions in normal and
locked mode. This allow this !

Btw, we also provide default inputhandler actions (as example) to help
the user to build their own.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-22 13:22:38 +02:00
Stacy Harper
fe519a80b3 Make sxmo tinydm compatible
Install tinydm:

	sudo apk add tinydm tinydm-openrc

To configure SXMO as the used session use :

	sudo tinydm-set-session -f -s /usr/share/xsessions/sxmo.desktop

Also ensure your user id is used in /etc/conf.d/tinydm

	$ whoami | xargs getent passwd
	stacy10000:10000:Linux User,,,:/mnt/sd/home/stacy:/bin/bash

	/etc/conf.d/tinydm
	AUTOLOGIN_UID=10000

Then configure the services:

	sudo rc-update del xdm
	sudo rc-update add tinydm

Then reboot.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-08-15 15:53:45 -07:00
Nihal Jere
ce3f2ea319
replace setpineled C program with a shell script
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-08-11 22:27:28 +02:00
noneofyourbusiness
5ccfeacfac
Update conky and the status bar on wake ups.
Add USR2 signal to unlock hook, remove useless STOP and CONTINUE
Update the bar in the same time.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-08-04 18:36:31 +02:00
Miles Alan
69fe290dfa xinit_template: Don't set SXMO_LOCK_SCREEN_OFF=1 by default
This should be a better default as users of the previous C screenlock
may expect this funcionality to work ootb / this retains prior defaults.
2021-07-30 23:50:32 -04:00
Maarten van Gompel
369f945dd9 wake only on cronjobs that go through sxmo_rtcwake.sh 2021-07-30 18:13:16 +02:00
Maarten van Gompel
994f4dc1e1 increase retry interval a bit so modem doesn't reset too soon 2021-07-29 23:45:36 +02:00
Miles Alan
9870940de4 sxmo_inputhandler.sh: Switch voldown_two to trigger Super+x (inplacerotate)
Fixes regression where not all clients rotated on doubletapping
voldown key.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-29 22:02:08 +02:00
Maarten van Gompel
b3bbf23e90 kill mpv playback in default presuspend hook
This is an attempt to fix prevent audio stuttering problems when
entering/leaving crust

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-29 21:58:50 +02:00
Stacy Harper
61a138a153 Fix remaining issue with states cause of dangling event files
We also have to remove them on outgoing call. We use find instead of rm
with a wildcard cause wildcard look not expanded here.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-29 21:54:06 +02:00
Stacy Harper
25913ebaf1 Add basic st scroll gesture inputs
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Miles Alan <m@milesalan.com>
2021-07-29 08:13:04 -04:00
Stacy Harper
d4fd25e3e9 Prevent some error states cause of dangling event files
Some event file stay present in some case (ex: .initiated) and this can
lead to issues in futures calls.

We remove dedicated cleanup and now we remove all event file related to
the finish call in once. We do it in incoming call cause sometime
modemnager fail to detect terminated calls.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-25 18:23:49 +02:00
Maarten van Gompel
0d528ff878
fallback to no rtcwake in case of missing mnc rather than having a broken crust
Though we'll ship and install mnc by default, we already someone run
into this, so best make the script a bit more robust.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 18:13:57 +02:00
Maarten van Gompel
09fcfa9894
let sxmo_rtcwake.sh set $DISPLAY if unset so the burden isn't on the user
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 17:54:33 +02:00
Maarten van Gompel
edc48a01d2
ModemMonitor: Periodically check whether the modem is still alive, reset it if not
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 17:28:54 +02:00
Maarten van Gompel
13b29f7139
Added a wifi toggle #290
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 17:03:58 +02:00
Maarten van Gompel
f057593692
write xinit stderr output to xinit.log
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:58:14 +02:00
Maarten van Gompel
2a89aaa4db
make default discard and mute_ring hooks forward to missed_call using sxmo_hooks.sh
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:55:18 +02:00
Maarten van Gompel
47950deece
Makefile cleanup
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:53:13 +02:00
Maarten van Gompel
66174219bf
screenlock: Moved lock / unlock / screenoff hooks after the existing logic and set empty defaults
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:48:12 +02:00
Maarten van Gompel
2b5f2b97e7
if multiple sxmo_rtcwake processes are running, return to crust only when the last one exits
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:48:12 +02:00
Maarten van Gompel
4798717d9d
implemented a --strict mode for sxmo_rtcwake in which it only runs when coming from crust
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:45:21 +02:00
Maarten van Gompel
9a7ca6e369
increased verbosity in postwake and rtcwake + changed blinking from police lights (red+blue) to subtler red+purple
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 16:45:20 +02:00
Stacy Harper
bdccd244c4 Fix sxmo_migrate.sh colorisation
busybox less cannot display colors. As we use the -F arg to stop less if
the page fit in one screen, we can just use more without arguments.

Both behave the same but more god color capabilities.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-25 13:18:52 +02:00
Stacy Harper
6dce18e579 Refactorise a little bit sxmo_migrate.sh
Some code could be deduplicated.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-25 13:18:38 +02:00
Stacy Harper
cfa15765e2
Fix some shellchecks issues 2021-07-25 09:55:46 +02:00
Maarten van Gompel
3ff244a3e5
check custom hooks against defaults in sxmo_migrate.sh and allow user to open editor immediately
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 09:13:54 +02:00
Maarten van Gompel
41e66a0164
Restrict dimensions of gtk3 file chooser on phone screens
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 09:06:49 +02:00
Maarten van Gompel
8658534ace
new default wallpaper for the 1.5.0 release
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 08:58:30 +02:00
Maarten van Gompel
19453bf4b1
Implement a maximum number of rings in the default hook
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 08:50:43 +02:00
Maarten van Gompel
d1f4561e66
do not use sxmo_hooks.sh for the icon hook (the hook variables don't live long enough)
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 08:48:37 +02:00
Maarten van Gompel
044e756600
busybox grep has no --include, removed it
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 08:46:14 +02:00
Maarten van Gompel
e30aefc253
re-adding a postwake wrapper script so the hook can be simplified
Changes from v1: This triggers the hook (without the 5 second sleep!) also when the unsuspendreason is modem or rtc,
so the user can always override the behaviour and do what he/she wants.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-25 08:37:07 +02:00
Maarten van Gompel
b4c1ccef76
adding some comments to screenlock to make it easier to understand
This merely adds some comments to make sure the code is
easier to understand.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-22 06:42:10 +02:00
Maarten van Gompel
8cf2d3d561
unlocksim fix
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-07-20 14:37:38 +02:00
Anjandev Momi
250cb91652 confirm logout, poweroff, and reboot
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-19 19:04:12 +02:00
Stacy Harper
edeb250083 Specify other default values
This is usefull for cron jobs that would manage sxmo like screenlock by
example.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-19 19:03:46 +02:00
Anjandev Momi
ccc6223c1b Revert "add a configurable daemon that warns on low battery"
This reverts commit c7e0e3b656.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-07-15 18:29:35 -04:00
Anjandev Momi
1f563dd873 fix dtmf tones with busybox grep: dont set initial value
busybox grep doesnt have -b flag

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-11 22:08:51 +02:00
Jochen Sprickerhof
e639291e49 Source customxinit before running daemonsneedingdbus
This makes sure that environment variables are set for the demons and
for example st started form the app menu (if launched through lisgd).

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-11 13:06:56 +02:00
Stacy Harper
99d226929b Prefix one finger gesture with "one"
This make input handling matching more consistent.

Take this example :

You want to bind one finger left gesture to something with all the
distance (short, medium and long) so you now can match *"oneleft" to
match "longoneleft", "mediumoneleft", "oneleft".
Without the "one" you would use *"left" which also match "twoleft" and
this override the "move to another workspace gesture.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-10 16:32:43 +02:00
Galen Abell
1d9821c2a4 Don't echo pmos-tweaks path in config menu
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-10 16:14:03 +02:00
noneofyourbusiness
26d946e225 allow shutting the phone off without password
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-07-10 15:25:04 +02:00
Stacy Harper
3d9fc07157 Prevent the incomingcallmenu to go futher if the menu failed
This can happen if an call come while a menu already is open of if the
user kill the dmenu with a top side gesture.

We dont want the notification to be purged to allow the user to manually
open it with the notification appmenu so we have to stop the code here.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-07-07 15:01:54 -04:00
Stacy Harper
dbca3ddd80
Trigger postwake when leaving crust cause of USB-C power
Atm, only the button wake up reason was trigerring postwake. This make
the usb charger to uncrust the phone and leave it in lock or off mode.

Now postwake take an argument which is the wake up reason.

The modem reason should not manage so phone state so we make it explicit
in the default hook.

"usb power" and "button" now make the phone to blink 5 seconds and put
the phone back to crust.
2021-07-07 21:00:42 +02:00
Stacy Harper
44dcd8ced9
Remove close window actions as it causes issues 2021-07-07 20:57:07 +02:00
Stacy Harper
41c15b192e Prevent rtcwake to go to crust when not expected
If you unlock the phone in rtcwake, then the next rtcwake will put the
phone back to crust cause last wake up reason still is rtc.

To prevent this, we also check the last state and expect it to be crust.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-07-07 14:53:24 -04:00
Stacy Harper
4c0b70442c Close the dial when the contact hang up on initiated calls
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-07-07 14:51:24 -04:00
Stacy Harper
c63ca633b4
Remove unused arg 2021-07-07 20:31:54 +02:00