Changes since v1:
- source directly instead of using "command -v" as much as possible,
I couldn't get the sources in deviceprofile cases to return a proper
exit code so they still use "command -v".
- avoid leaving deviceprofile var set in interactive shells from
sxmo_init.sh
- small fixup to warning message if deviceprofile not found
This allows Sxmo to drop an external dependency on which.
Anjan's note: This is also faster due to being a shell built-in
Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Moved to be a default for sxmo-dmenu; bonus this script is now more
compatible with non sxmo-dmenu / vanilla dmenu.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
- 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>
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>
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>
We had issue in ssh mode and this new bemenu curses mode.
No issue on other sxmo menu that use successive bemnu but this appmenu
loop displaying some ~F char when you select a subentry.
I refactorised a little bit this script and now it works well. I'm not
stil not sure of what was causing this.
By the way I changed some echo for printf. I also added the wrap
argument for bemenu in ssh mode.
The size was perfect to fit between keyboard and the status bar but then
it was hard to trigger page up without triggering lisgd gesture.
Make bemenu a little tinier to simplify this
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
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>
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>