28 Commits

Author SHA1 Message Date
Willow Barraco
3338bec056 Increase dmenu line so that appmenu is complete 2023-05-12 08:42:44 +02:00
Stacy Harper
8164bdf331 Fix shellchecks 2022-11-15 13:41:55 +01:00
Peter John Hartman
c05ec048a3 dmenu: add DMENU_OPTS
(like BEMENU_OPTS to set height, etc.)

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-22 20:12:12 -04:00
Peter John Hartman
b119a5c776 Change BMENU to BEMENU for variables.
This was inconsistent with BEMENU_OPTS.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-09-12 13:18:44 +02:00
Jami Kettunen
a813bafc01 Source scripts directly instead of using "which"
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>
2022-04-18 02:43:51 -04:00
Anjandev Momi
1123c0f072 Change license to AGPL-3.0-only 2022-03-15 08:00:00 -04:00
Miles Alan
8ef5f4fcb4 core/sxmo_dmenu.sh: Remove -c argument for dmenu centering
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>
2022-02-28 08:22:13 -06:00
Maarten van Gompel
aa80586006 sxmo_dmenu.sh: Make sure bemenu/dmenu is not aliased 2022-02-03 21:09:29 +01:00
Maarten van Gompel
95c8ad9724 unlocksim fix: add sxmo_common to ensure right version to pgrep
This should fix the pin-entry popup on dwm/x

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-03 18:46:23 +01:00
Maarten van Gompel
fdf6f39fa7 readding set -e to unlocksim and handling menu close/kill correctly
This addresses stacy's comment after commit 51ffb34c (fix unlocksim)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-02 22:47:07 +01:00
Peter John Hartman
1fb95b989e fixup: sxmo_dmenu.sh printf statements
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-02 19:26:59 +01:00
Peter John Hartman
d78f8cd22a sxmo_dmenu.sh: height/width as user defined
In case someone has unusual fonts.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-01-31 20:03:43 +01: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
Peter John Hartman
9b1f56c9e6 Fix height / width of dmenu in dwm so it doesnt overlap with numbers on keyboard
I think the ultimate solution will be to tweak the -c patch to dwm.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-11-22 14:04:59 -05:00
Stacy Harper
cb474f8d64 Ensure we reset the sway mode on script crashes 2021-11-11 18:41:36 +01:00
Stacy Harper
2a823c88d5 Move some bemenu arg to env variable
This also add the -M and -H new bemenu args

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2021-11-08 12:10:16 -05:00
Peter John Hartman (wart)
00e495374d bump up the number of lines in sxmo_dmenu.sh (see patch to sxmo-dmenu) 2021-09-06 13:56:39 +02:00
Stacy Harper
f86cc46d03 Add a bemenu control mode to access bemenu control with buttons
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-30 22:22:43 +02:00
Stacy Harper
df11b22b51 Add no spacing to bemenu 2021-08-28 09:31:19 +02:00
Stacy Harper
56f5658cc9 Larger bemenu cause keyboard scale correctly on landscape
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-08-27 11:12:59 +02: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
Peter John Hartman (wart)
b46a347d85 if the keyboard is open, 7 lines in horizontal and 23 lines in vertical is too much in order to enter data. This especially affects the Dialer and Text menus. I lowered the numbers.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-08-25 19:29:10 +02:00
Stacy Harper
9f6af8abcc Fix appmenu.sh in ssh mode
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.
2021-08-25 13:29:59 +02:00
Stacy Harper
8d2afc8e14 Simplify bemenu scroll up
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>
2021-08-24 22:18:29 +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
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