AFAICT we restart lisgd because it learns the orientation via its
`-o <orientation>` CLI argument. but we only pass that flag on dwm/x11,
not sway. restarting it on sway is wasteful, and potentially racy (i'm
able to get multiple lisgd's running just by enabling autorotate and
flipping the phone rapidly), so don't do that.
sxmo_wm.sh uses the `SXMO_WORKSPACE_WRAPPING` variable to control
relative movements. for example, set this to "5" and then the "Next
Workspace" option in the switch menu will cycle WS 1 -> 2 ... -> 5 -> 1.
same for one- and two-finger left/right swipe to switch/move workspaces.
however, absolute movements (via the move menu) only allowed moving to
WS 1-4. a user with non-default `SXMO_WORKSPACE_WRAPPING` could move a
window from WS 5 to WS 4 with this menu, but not from WS 4 back to WS 5.
this patch brings consistency by using `SXMO_WORKSPACE_WRAPPING`
anywhere we would otherwise assume the number of possible workspaces.
Some french char, and also emojies was rendered as "\324\2343" chars.
This has been introduced with d27f7e1, when the printf %b became %s,
while moving it to the new sxmo_hook_smslog.sh.
Reverting this fix the problem.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
sxmo incorrectly suspends when:
- the user has two MPRIS applications active (e.g. vlc + mpd), and
- one of these is stopped while the other is still playing
this is because `playerctl` by default operates on "the first available
player" (quoted from its manpage). from the perspective of sxmo though,
that "first player" is arbitrary: we should query the status of *all*
players and block suspend if any of them are active.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
this naming mirrors SXMO_UNLOCK_IDLE_TIME introduced in 70be22c9.
it's nice to let this be tunable, both as a matter of user preference
and to leverage when debugging pathological resume behavior.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
`sxmo_log()` logs to `$XDG_STATE_HOME/sxmo.log` (`~/.local/state/sxmo.log`),
so sxmo needs to ensure that directory exists to have reliable logging.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
the default for NixOS is to place ordinary users into the "users" group,
and to not create a group per user.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
In a situation of one output was already turned off manualy by the user,
the script was not turning off other outputs.
Reversing this check produce a more consistent behavior.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
On sdm845 devices, I would get the same text multiple times. Even
though, the person sending the text only sent it once.
I ran the sxmo modemmonitor daemon manually and got the following
log:
```
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13225" (uid=10000 pid=24991 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13227" (uid=10000 pid=24994 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13226" (uid=10000 pid=24999 comm="dbus-monitor --system interface='org.freedesktop.D") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
Failed to open connection to session bus: Failed to connect to socket /tmp/dbus-QIILCAmZIu: No such file or directory
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.13228" (uid=10000 pid=25007 comm="dbus-monitor --system interface='org.freedesktop.M") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
error: couldn't delete SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't delete 1 parts from this SMS'
/home/user/.config/sxmo/hooks/sxmo_hook_sms.sh: line 20: go-sendxmpp: not found
successfully deleted SMS from modem
/home/user/.config/sxmo/hooks/sxmo_hook_sms.sh: line 20: go-sendxmpp: not found
```
The important line is:
```
error: couldn't delete SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Couldn't delete 1 parts from this SMS'
```
After applying this patch, I only recieve texts once. I dont know why deleting
text command fails the first time. Moreover, this patch fixes the double
text issue on sdm845 devices.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
* Make icon_prn a nerd-font icons. It was using a font awesome code
point, which we don't install with sxmo.
* Fix phone locked and laptop icons that weren't automatically updated
* Fix brightness icon in legacy nerd-fonts range and move it to
sxmo_hook_icons from sxmo_brightness
* Use standard Unicode arrows instead of nerd-fonts ones
* Use icon variables for arrows in sxmo_wmmenu.sh
* Add variable for audio icon & use in sxmo_audio.sh
* Remove no stray break space from sxmo_contactmenu
* Remove up arrow character from reddit script
* use only icon variables in modemtext
* Update icons breakpoints
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This makes the power, volume down & volume up buttons work in SXMO
on my Samsung Galaxy Note 10.1 (samsung-p4note), the N8010 variant.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Gnu printf interprets these to be arguments instead of a format string
which breaks sending mms.
Also ATTACHMENTS_ARG was being overwritten make_attachments_arg causing
messages to not have the description included, only the attachment.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
The lsof / grep call is broken and causes the script to crash when
adding or removing a recipient.
Lsof also doesn't have a stable output format, and the format is
different between the busybox and gnu versions, so we shouldn't be
trying to parse the output of it.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
autosuspend calls the presuspend check when the kernel locks are clear,
and it hasn't been called recently. If we always call it, there's a risk
that running all checks could take too long and we'll fail to suspend
often.
Successfully exiting means that there is nothing going on, so the system is
free to suspend within a reasonable timeframe (something like < 10 seconds).
All the checks currently use the (default) delay wait mechanism, but I
would like to try to write others. For example `playerctl -F` could be
used when playerctl is blocking suspend. Unfortunately managing spawned
jobs and race conditions is harder than it seems at first glance.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This revision changes things to refer to shell script for hooks not
manpages. I think manpages will just introduce problems. Instead, the
proposal is to have each hook include its own documentation in comments
at the start of it, and refer the viewer back to the section in the
sxmo(7) manpage where that hook is discussed.
This is unfinished but pushing it.
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
This is basically a conversion of USERGUIDE.md. Pushing this now for
comment on the structure. The idea is to have each of our hooks as
its own man page (e.g., sxmo_hook_sms(1) and so on). And then we'd
also have "bigger" scripts have their own man pages, e.g.,
sxmo_files(1), sxmo_rtcwake(1), sxmo_notifications(1).
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Watch was spitting out no such file or directory errors, that I think
were caused by a race between updating the status bar, and removing
items.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Never happend before but it is definitely possible that the 30s duration
could expire if the following trigger take longer than 20s. By example
in case of network issue.
The goal of this default duration is to avoid stucked wake
locks, even if this could theorically not happen anyway. So let's use a
big value to avoid causing troubles.
A mpv instance is a inhibit idle for the WM. It means that we
should not rely on sxmo_idle.sh to start and stop the periodic wake lock
checker.
Instead we should just periodically run them.
This file was not bumped on new version. This can cause issue, by
example with our recent font change.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>