969 Commits

Author SHA1 Message Date
Zach DeCook
825fce5159 Bluetooth Menu: Show device type icons
watch appears twice in this list because we're waiting on upstream bluez to merge the class detection for it

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-11-07 20:57:27 +01:00
Maarten van Gompel
1eb30701c3 alsamicismuted not implemented and led to 'Not implemented' appearing in status bar: write to stderr instead
I kept getting 'Not implemented' in my status bar, output from
sxmo_status.sh, which was caused by sxmo_audio.sh and a alsamicismuted()
outputting "Not implemented" to stdout, effectively obscuring most of
the tiny status bar. I redirected the output to stderr..

Ideally of course we should fix the function, but this will have to do
in the meantime.

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-11-05 07:42:58 -05:00
ArenM
2e84d9ce9a remove usb/bind & usb/unbind from SXMO_SYS_FILES
I believe these were used in the early days of sxmo to reset the
connection to the modem. eg25-manager now handles this.

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-11-05 07:42:58 -05:00
ArenM
95c3ce8262 remove sxmo_superd_signal.sh
It used to be used to update the clock on the desktop widget, but that's
been replaced with sxmo_aligned_sleep.

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-11-05 07:42:58 -05:00
Zach DeCook
23b4260640 audio: fix pulse volume set commands
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-11-05 07:34:27 -05:00
Stacy Harper
ab1591971e Do not scale to 2 by default
This scaling value should be specific to devices and screen sizes. I use
sxmo on my destkops and I dont want this value by default from the
swayinitconf that I cant manage.
2022-10-31 11:51:13 +01:00
Stacy Harper
405cb53fb6 Notify sound change on actual changes
pactl subscribe get spammed a lot. I think we have to check for value
difference before notifying
2022-10-31 11:47:22 +01:00
Stacy Harper
0837bb2c7e Do not notify sound on sink-input changes 2022-10-31 11:36:04 +01:00
Stacy Harper
0b0742a562 Notify with wob on mic and vol mutte toggle 2022-10-31 10:07:47 +01:00
Stacy Harper
71c0d53392 Remove duplicate calls to statusbar volume
Now that audiomonitor trigger this
2022-10-31 10:07:47 +01:00
ArenM
2cce8d76dc set power button repeat delay for multikey compatibility
This restores the key repeat settings that were used with the multikey
script. Without them long-pressing the power button is unreliable.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-10-31 09:45:00 +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
6a960bca34 daemons: pipe kills to null
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-22 20:04:00 -04:00
Peter John Hartman
ece8be47e1 sxmo_notify_user: print to sxmo_log
This gives us prettier logs.  I'm not sure if it breaks anything, since
it will prepend the date and name of shell script to the output now.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-22 20:03:17 -04:00
Peter John Hartman
4bef0f4ed6 mutex: pipe kills to null
cleanup logs

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-22 19:56:55 -04:00
ArenM
ebc7f26ff1 Use sound monitor to display volume notification
This allows inputhandler to finish before the notification is updated,
which makes using the volume gesture is more responsive.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-10-22 19:29:41 -04:00
Anjandev Momi
0bdbc7ad40 make sure touchscreen works if no deviceprofile is set
People have trouble writing a device profile when the touchscreen
doesnt work. The touchscreen doesnt work so you can't connect to wifi
to ssh in to write the device profile.

To solve this chicken and egg problem, this patch makes sure touchscreen
atleast works by introducing an "unknown" device. I
purposefully went against the linux guidelines for devicenames so that
the name will not conflict with an actual device.

Test procedure:

remove device profile for poco f1 in git repo and from
/usr/share/sxmo/default_hooks /usr/bin/

`doas make install` with this patch

Reboot and the touchscreen atleast still works.

Can someone please test this patch with a onebutton device? It doesnt
matter if the buttons dont work. Lets make sure the touchscreen atleast
works without a device profile.

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-10-13 06:04:12 -05:00
Zach DeCook
55da6d17cf get leds: don't claim a mutex to check led state
Keeps the statusbar from blinking when you open the sys menu

Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-10-05 10:54:09 -05:00
Peter John Hartman
f854c1a537 networks: wifi enable and shrink
1. Move the wifi enable/disable to Networks (more convenient)
2. Do not list wifi networks if wifi is disabled.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-10-03 09:42:05 +02:00
Peter John Hartman
70db98688b logout: add 5s
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-10-03 09:28:50 +02:00
Peter John Hartman
5f7197df2d statusbar: lockedby
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-10-03 08:52:03 +02:00
Stacy Harper
67e039824e Allow multiword execwait commands in sxmo_wm.sh
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-10-02 08:28:17 -05:00
Peter John Hartman
fa15e663d5 audio menu: remove last remnants of pamixer 2022-10-02 06:19:43 -05:00
Peter John Hartman
655d49ed04 Ring&Vibrate Mode cleanup
This makes two entries and cleans up some code.
2022-10-02 06:19:43 -05:00
Peter John Hartman
1ca1b17be8 Implement pulse functions in menu.
This patch is *just* an implementation of the pulse audio menu.
(The bugfix for call mode is now a separate patch, so too the
additions to statusbar.)

1. Implements the sxmo_audio.sh menu for pulse completely using ONLY
   pactl (so we don't need pamixer).
2. Cleans up the InCall menu.

A further patch will remove extra alsa functions.
2022-10-02 06:19:43 -05:00
Stacy Harper
72e151e6c4 Pause audio clients when a call arrives
This solution is based on playerctl daemon/client common setups. This is
harmless if the user doesnt have the required binaries or dont have
the daemon running.
2022-10-02 11:55:48 +02:00
Peter John Hartman
819d1cafb7 remove unused alsa functions
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-10-02 11:46:48 +02:00
Stacy Harper
9fa7625ffc Fix sxmo_mutex.sh lockedby
Avoid sxmo_debug to exit 1
2022-09-28 14:06:10 +02:00
Peter John Hartman
96c6977c43 Make Lockedby message sxmo_debug 2022-09-25 16:35:12 -05:00
Peter John Hartman
ec993316b1 sxmo_debug: make it only print if SXMO_DEBUG 2022-09-25 16:35:12 -05:00
Peter John Hartman
1e8bdbb385 sound monitor
Right now all it does is monitor for headphone in/out and update
the statusbar, but this can be useful for other things too.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-09-24 09:20:05 +02:00
Anjandev Momi
529c5939de sxmo_version.sh: print arch, superd version, and which bonsaid
Rationale: It gets hard providing support with sxmo being packaged on multiple distros and different
arches using a slightly different stack (superd - pmOS vs systemd - arch/debian, bonsaid -
aarch64 and x86_64 vs no bonsaid - 32bit)

Being able to tell users to run one command when reporting an issue will
help us narrow down whether an issue is a regression, packaging mistake,
or user error.

TODO: when bonsai has version numbering, print it here
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2022-09-13 18:02:20 -05:00
Stacy Harper
ac939e4ac7 fix some shellcheck issues 2022-09-12 13:50:15 +02:00
Peter John Hartman
e7494639f3 Audio Menu: Make it more intuitive
This should make some things more intuitive.  I'm not happy with having
four entries for Vibrate/Ring options.  We should really only have two
toggles: Vibrate, and Ring.  But for now this will do.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-09-12 13:22:58 +02: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
Stacy Harper
c769ef1518 Allow multikeys without bonsaictl 2022-09-12 12:57:31 +02:00
hazardchem
17fb3097c8 Added badwolf as a selection option for sxmo_urlhandler.sh
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-09-03 11:01:37 +02:00
Stacy Harper
6cdb8aa4c2 fix sxmo_migrate.sh for non versioned files
With bonsai_tree.json I tried to use a hack to migrate it, using only
the file diff. It was incomplete cause it doest use "interactive" mode
so the .need-migration always remains.

To fix this correctly, first I reverted the defaultconfig function
behavior. Then I adapted checkconfigversion to handle ref files without
explicit versions. For those cases, we also just use diff exit status.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-09-01 14:52:00 -04:00
ArenM
54f5052884 Don't start a dbus session if one is already running
Systemd starts a dbus session bus automatically, and runs user services
on it. When we create our own session bus, we can't talk to those
services.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-31 17:23:16 -04:00
Stacy Harper
a1c3eebacf Prevent the modem to wake the device up on ppp through gpio input
On sway on ppp the modem got a dedicated device input on sway. It
trigger wake up on some event which break sxmo workflows.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-31 17:16:44 -04:00
Stacy Harper
a1a549dec1 Remove states from audio menu sink list
This new parameter appeared some weeks ago and the output now looks
like:

"suspended" "foo bar"

This strip this !
2022-08-30 14:02:19 +02:00
Stacy Harper
ad5586fb7e Make sxmo_migrate.sh sync interactive the default
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-29 15:26:07 -04:00
Stacy Harper
2f6adad3fc Revert "Avoid superd issues with lisgd and bonsaid"
This reverts commit df41312cd5.

Now that we freed lisgd and bonsaid process from forked logs, we dont
suffer the issue from superd.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-29 15:17:26 -04:00
Stacy Harper
df41312cd5 Avoid superd issues with lisgd and bonsaid
Superd fail to manage correctly bonsai and lisgd daemons atm. It doesnt
stop/restart them correctly cause they start async process and their
pipes are used.

This is a superd issue but this break sxmo for a too long time. This
one could be reverted when superd is fixed.
2022-08-29 14:42:13 +02:00
Stacy Harper
69a087faf2 Fix multikey issues on sway : move to bonsai
To fix the problems mentionned in the following ticket I worked on new
solution to handle complex key bindings on mobile devices:

https://todo.sr.ht/~mil/sxmo-tickets/524

This solution is structured as client/server state machine in hare lang.
It read a json transition tree and wait for the client to send events or
to change contexts.

Installing bonsai is ofc required :

$ doas apk add bonsai

Dont forget to $ sxmo_migrate.sh sync interactive to setup the json in
your config folder.

I adapted the migration scripts to not break the json. We cannot
versionise it so let's just check if the user one differ from the sxmo
default one.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-27 15:14:34 -04:00
Stacy Harper
47856d2073 Fix some shellcheck issues 2022-08-25 15:58:49 +02:00
Stacy Harper
138c6d7753 Bump sxmo_open.sh
I improved this script over time to cover more cases and to fix issues.
2022-08-25 15:46:14 +02:00
Stacy Harper
674864a522 Fix loosing touch on rotation on sway
Calling map_to_output while rotating seems to cause a bug. Anyway we
only have to call those one time so let's move this in
sxmo_swayinitconf.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2022-08-24 19:44:11 -04:00
shivers
46b98c39cf Add ring profiles for incoming calls and texts
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-07-31 19:38:27 +02:00
Hanspeter Portner
fe608f3c91 Add check for WPA key lengths to fall between 8-63
Without the check, creation of new wifi-hotspots will silently fail with
keys that are either too short or too long.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-07-17 11:51:31 +02:00