Commit Graph

25 Commits

Author SHA1 Message Date
Willow Barraco
582c9b1b7b sxmo_timer.sh: finish as soon as it get killed
Without this, the script will wait the full second before handling the
kill signal.
2024-05-31 18:46:28 +02:00
Willow Barraco
636053e4f1 sxmo_timer.sh: stop at precise second
-ge means that we wait one additional second. Sleep 5s should actually
wait 5s, no more.
2024-05-31 18:46:27 +02:00
Willow Barraco
13e7a3bc69 sxmo_timer.sh: allow suspension while running
To do this, we implement a new sxmo_sleep program that is a sleep
but that can wake the device from suspension when the timer expires.

Also, stopwatch can perfectly survive a suspension. So we don't have to
wakelock on this.
2024-05-31 18:46:27 +02:00
Willow Barraco
4913fac4ee Cleanup virtual keyboard management
Some devices doesn't need a virtual keyboard, aka Nokia N900, aka
Pinephone with keyboard. This give a way to disable this feature
completely.

Also, we remove the sxmo_dmenu_with_kb.sh script, cause it is poorly
used, and give inconsistent behavior between menus. The user can already open
the keyboard very easily.

For this same reason, we remove some random "sxmo_keyboards.sh open". If
this isn't necessary cause of a specific usage (aka dtmf special
layout.

I also dropped some code in sxmo_dmenu.sh that adapt the available size
depending on if the keyboard is open or not. The keyboard can be open
later, so this is dumb to rely on this, and we should alway be able to
open/close it, and to read all lines.

I adapted the inputhandler a bit when keyboard is disabled. If you guys
think about better usage of freed handler, I'm open!
2024-03-25 17:32:26 +01:00
Zach DeCook
3a70be4fd7 Device Profile: Make vibration strength configurable
Fixes vibration on OnePlus 6

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-08-29 19:06:23 +02:00
Willow Barraco
e0ecf42cb7 sxmo_timer.sh prevent suspension while running 2023-07-15 13:22:34 +02:00
Willow Barraco
853ad37d23 sxmo_timer.sh decrease resource consumption
The stopwatchrun sleep was in the wrong line, and so this was very costy
to use.

Also moved to sxmo_aligned_sleep to avoid overlapping seconds, while
still being the cheapest possible.
2023-07-15 13:22:33 +02:00
Stacy Harper
088feda2c8 Cleanup sxmo_timer.sh 2022-12-17 11:25:30 +01:00
hazardchem
faba6af2eb sxmo_timer.sh: added stopwatch function
Added selection for stopwatch in timer

Signed-off-by: hazardchem <pthom44@live.com.au>
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-12-17 11:25:24 +01:00
Eolien55
fb2f25c13e appscripts/timer: improved sed call and fixed parsing
Sed is called only once

now it interprets `5m37s` as `5m + 37s` -> `5*60s + 37s` -> `5*60 + 37`
before, it was `5m37s` -> `5*60s37s` -> `5*60*137*1`. the problem is
that the script does not insert a `+` between each non-number characters
and numbers. it does now, and will understand combinations of seconds,
minutes and hours.

Note, the script will interpret `5m37s` and `37s5m` exactly the same way

This may not be necessary if the user uses by themselves`+` to separate
diffent units, though I think the current behavior is very misleading.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-05 23:02:56 -04:00
Anjandev Momi
1123c0f072 Change license to AGPL-3.0-only 2022-03-15 08:00:00 -04:00
ArenM
dda8a25e65 Appscript cleanup
* handle exiting menus with escape

* replace if statements with case, where reasonable

* using shell string operations instead of forking

* use sxmo_dmenu_with_kb instead of opening and closing the keyboard

* remove extra options to sxmo_terminal and sxmo_bemenu (some of them
  were causing problems)

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-02-27 16:24:27 -06:00
Zach DeCook
34d0188a1e appscripts: Create list automatically
This will allow other packages to add system-wide appscripts

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-16 21:18:57 +01:00
Nihal Jere
c309751b33 rename sxmo_vibratepine to sxmo_vibrate
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-02 20:12:45 +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
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
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
24905884ee Removed explicit font from most dmenu calls, dmenu font is read from Xresources now and kept as uniform as possible 2021-02-01 18:32:32 +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
f9e580106e Shellcheck and tabindent all appscripts 2020-06-07 10:17:14 -05:00
Miles Alan
9a16998e64 Rework timer script and timezone script to use $# checking/recursive call trick 2020-05-30 15:15:01 -05:00
Miles Alan
ce78bf58fa Vibrate phone instead of flipping screen on off for timer script 2020-05-22 23:15:32 -05:00
Miles Alan
ae983ef8c8 Various progess on calling & texting; reorganize scripts dirs by category 2020-04-25 07:55:22 -05:00