Commit Graph

14 Commits

Author SHA1 Message Date
Peter John Hartman
7965c0c2e0 Rename $OS to $SXMO_OS. 2023-04-04 10:55:18 -05:00
Peter John Hartman
ad3b182177 bluetoothtoggle: include debian
as per user request, not tested.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-11-07 21:02:50 +01:00
wentam
583ff70617 Add nixos to all OS branches
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-07-15 22:48:24 +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
Peter John Hartman
6beb27b34f rfkill: switch the wifi checks to use busybox rfkil
An earlier patch switched us over to busybox rfkill, but didn't
switchover all rfkill instants to use new syntax.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-12 11:30:37 +01:00
Peter John Hartman
e210528d3c bluetooth/wifitoggle: fix to make things permanent
On most systems, the rfkill states are saved on reboot (see
/etc/init.d/rfkill in alpine, for instance).  However, if we
unload the modules, the the rfkill state would not be visible,
and so toggle would not be permanent.

One solution would be to add the modules to blacklist, but that seems
too complicated.  The simpler solution is to not unload/load the modules
at all.  After all, rfkill should block these modules from running
and/or sucking up battery, nad you really only need to unload the module
if it is buggy.  Maybe there's a reason we want to unload the module,
but I think that might be a user decision.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-01-02 15:54:39 +01:00
Peter John Hartman
324bd397b0 statusbarupdate: if root, don't run
These were running as root, which I think would be bad.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-12-30 16:01:59 +01:00
Peter John Hartman
dd4ad00ff7 statusbarupdate: add caller for debugging purposes
This might be useful as well in general.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-12-29 21:46:27 +01:00
Peter John Hartman
99e87b9073 bluetooth: make stop/start permanent.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-12-24 14:28:22 +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
Anjandev Momi
129de52d4c fix starting bluetooth in toggle script on arch distros
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-12-11 10:11:28 +01:00
Peter John Hartman
e710341253 bluetoothtoggle: fixups
Same as before but with the correct spellchecks.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-12-10 13:41:22 +01:00
Peter John Hartman
727020bb0c Add Bluetooth Toggle.
Just like sxmo_wifitoggle.sh this will toggle rfkill unload modules and
also toggle the daemon.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-12-10 00:08:36 +01:00