Commit Graph

34 Commits

Author SHA1 Message Date
Tzafrir Cohen
c113099ea5 dash: Avoid empty shift
Dash gives an error if you try to shift with no positional parameters.

$ bash -c 'shift; echo b'
b
$ dash -c 'shift; echo b'
dash: 1: shift: can't shift that many

Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-12-05 11:46:44 -08:00
Stacy Harper
2f6adad3fc Revert "Avoid superd issues with lisgd and bonsaid"
This reverts commit df41312cd5.

Now that we freed lisgd and bonsaid process from forked logs, we dont
suffer the issue from superd.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-29 15:17:26 -04:00
Stacy Harper
df41312cd5 Avoid superd issues with lisgd and bonsaid
Superd fail to manage correctly bonsai and lisgd daemons atm. It doesnt
stop/restart them correctly cause they start async process and their
pipes are used.

This is a superd issue but this break sxmo for a too long time. This
one could be reverted when superd is fixed.
2022-08-29 14:42:13 +02:00
Stacy Harper
674864a522 Fix loosing touch on rotation on sway
Calling map_to_output while rotating seems to cause a bug. Anyway we
only have to call those one time so let's move this in
sxmo_swayinitconf.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-24 19:44:11 -04:00
Anjandev Momi
6f52863501 Switch to superd for daemons we want to monitor
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-04-16 11:11:10 +02:00
Anjandev Momi
1123c0f072 Change license to AGPL-3.0-only 2022-03-15 08:00:00 -04:00
Peter John Hartman
0f897e86eb rotate: add 180
On pinenote 180 is the place to be for the little cover stand to work.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-14 14:01:43 +01:00
Andrew Bates
180332ae7a Added new hook for when screen is rotated.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-02-12 17:42:33 +01:00
Peter John Hartman
2a4a614be7 fix shellcheck err 2022-02-12 17:42:33 +01:00
Stacy Harper
282660b113 Make sway rotation to works on every focused output
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-02-12 09:13:19 -06:00
Stacy Harper
92c258f990 Make sxmo hooks scripts in PATH
We then add /usr/share/sxmo/default_hooks/ to the PATH (see
sxmo_init.sh)
2022-02-11 17:04:11 +01:00
Peter John Hartman
246cab105c allow user to have no touchscreen
The user will unset SXMO_TOUCHSCREEN_ID in the deviceprofile.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-07 19:24:50 +01:00
Peter John Hartman
cb22148818 rotate: rotate touch and tablet_tool
This allows stylus and touch matrices to rotate too in sway.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-07 19:24:47 +01:00
Peter John Hartman
e26d8beda6 Change DSI-1 to SXMO_MONITOR
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-07 18:18:52 +01:00
Peter John Hartman
05f2ea4d87 TOUCH_POINTER_ID -> TOUCHSCREEN_ID and STYLUS_ID
This adds a stylus input device, which meant we had to split
TOUCH_POINTER_ID up into two options: TOUCHSCREEN_ID and STYLUS_ID.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-07 18:15:41 +01:00
Peter John Hartman
004dfb112d TOUCH_POINT_ID -> SXMO_TOUCH_POINT_ID
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-01-31 20:22:12 +01:00
Zach DeCook
6274f1f222 shebangs: change to /bin/sh
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>
2021-12-20 14:29:25 +01:00
Stacy Harper
c446e9f23e Refactorise to simplify wm detection
We dont use guesswm and rely on a SXMO_WM env variable. We now use
guesswm for non wm action (from ssh, console, rtc wakes, etc). It will
try to setup needed variables.

This way, we avoid to run sxmo_wm.sh and to check variables everytime.

This allow the user to manage sxmo_screenlock.sh from ssh and to run a
desktop software with "sxmo_wm.sh exec foot" by example.

We remove the "ssh" wm cause it does not really make sense anyway.

The sxmo_rtcwake.sh dont try to setup variables anymore cause the user
must use "sxmo_wm.sh exec" if they want to start a destkop software
anyway.

We remove the "xorg" check everywhere cause that make no sense. We
keep the xorg prefixed methods for common xorgs cases.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-11-23 15:26:35 -05:00
Stacy Harper
103a6612f3 Fix autorotation script
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-26 20:42:51 +02:00
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
e6ea657634 Cleanup hooks
This add a script to use either the user hook or the default one.

Sometime we checked the user hook or a default code. We move this
default code in a defaut hook.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-06-29 22:43:16 +02:00
Stacy Harper
c183530b38 Fix rotation while simplifying id detection.
We hardcode the default pinephone screen input id as we now can override
it by device.
2021-05-20 13:50:08 +02:00
Alex O
5741f0692c Wileyfox Swift rotate and autorotate fix
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-05-20 09:09:45 +02:00
Stacy Harper
de0697a83c Fix sxmo rotate left
lisgd doesnt care about negative rotations. Rotating left is 3 rotation
rights.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-09 22:56:20 +02:00
Maarten van Gompel
4eb914265d Added sxmo_keyboard script that acts as an intermediary to opening and closing the keyboard 2021-03-15 13:51:48 +01:00
Maarten van Gompel
295af30993 various scripts were not sourcing the common include script yet (noted by mrrabbit1155) 2021-02-21 15:14:16 +01:00
Maarten van Gompel
774f1eabdf Fixed rotate gesture #141 2020-12-23 12:00:01 +01:00
ivoulis
24380603a4 Do not start lisgd if it is not running (e.g. lockscreen) 2020-11-20 17:35:43 +01:00
Anjandev Momi
ab3bb9bcdd kill the keyboard on rotation 2020-11-08 19:20:53 -05:00
Anjandev Momi
b86b152e6e Added autorotate using accelerometer script 2020-08-28 19:31:49 -05:00
Miles Alan
60963cd20c Start lisgd via a script instead of directly so changing gestures is simpler 2020-06-26 19:56:56 -05:00
Miles Alan
818d7d5b17 Use lisgd orientation -o flag in rotate script 2020-06-13 20:36:18 -05:00
Miles Alan
6a432b305b Shellcheck a few core scripts 2020-06-07 10:17:14 -05:00
Miles Alan
23d6a29926 Add rotation script sxmo_rotate.sh which fixes touchscreen input 2020-05-26 17:46:43 -05:00