Commit Graph

16 Commits

Author SHA1 Message Date
Peter John Hartman
8bd1feb1cf give keyboard time to open
Sometimes the menu would open before keyboard in sxmo_menu_with_kb.sh.
Reproduce: from main menu, click texts.  A small pause is sufficient.
This is bad since then menu overlaps keyboard and you can't type esc
or numbers.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-01-22 15:15:25 -08:00
Anjandev Momi
1123c0f072 Change license to AGPL-3.0-only 2022-03-15 08:00:00 -04:00
Stacy Harper
238aa38efc Refact: commons loading
- 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>
2022-01-15 11:31:00 +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
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
7ac78f8272 sxmo_dmenu_with_kb should exit the dmenu exit code
Some script could behave differently if the dmenu has been killed with a
swipe up gesture. We have to return the dmenu exit code.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-23 19:16:32 +02:00
Stacy Harper
a3e4dc0fa4 Make all sxmo menu SSH mode compatible
We then simplify the sxmo_modemtext that was already using SSH related
behaviors.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-04-10 13:20:19 +02:00
Stacy Harper
b574ff2f93 Do not close svkbd if it was already open before dmenu
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-03-24 21:40:02 +01: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
ace9960926 Made choice for virtual keyboard configurable through the $KEYBOARD environment variable.
This implements what was suggested in the discussion regarding the svkbd
patch, it makes the choice of virtual keyboard configurable using the
$KEYBOARD variable, rather than hard-coding it.
2020-07-26 10:22:31 -05:00
Miles Alan
8ee22f3038 Quote $@ where needed 2020-06-27 20:50:06 -05:00
Miles Alan
049a93e5d8 Shellcheck and tabindent all scripts 2020-06-13 20:36:13 -05:00
Miles Alan
e5877059ff Lots of bugfixes related to calling/modem and various script fixes 2020-05-11 20:55:47 -05:00
Miles Alan
b96789df69 Enable synclient/keynav; fix kb w/ dmenu script; make bat/volume control device independent 2020-05-02 19:28:54 -05:00
Miles Alan
ae983ef8c8 Various progess on calling & texting; reorganize scripts dirs by category 2020-04-25 07:55:22 -05:00