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.
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>
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>
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>
This implements simple hooks when we enable / disable callaudio. The
"hack" in our current code is pretty specific to pinephone, and I think
that users might also want to, e.g., bump volume when receiving phone
call, or otherwise tweak some sound settings.
Mostly a cleanup. We now have sxmo_wakeup.sh so the hook should bear
that name somehow (although sxmo_hook_suspendblockers might fit too)
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
If you have a lot of wifi networks, its very annoying to have to scroll
to the bottom or swipe up to close (swiping up might activate a
different network).
Maybe we give more of a gap between top of screen and menus?
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Depends on the Massive MMS Rewrite patch. This cleans up sending an mms
dramatically --- we weren't doing proper checks if failure, for
instance.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
The problem this MMS rewrite was supposed to address is the fact that
MMS writes the *contact names* and not the *phone numbers* to the log
files, whereas SMS writes the *phone numbers* and uses sed on
tailtextlog to conver these after the fact. SMS was doing things "the
right way" and MMS was doing things "the wrong way", so I wanted to
bring the two into harmony.
Note that this fix will *should* be fully backwards compatible too.
Along the way, I realized that we could split some things out. In
particular, I now have:
sxmo_hook_smslog.sh, which allows a user to change the look-and-feel of
how things get logged. (This might be not used very much.)
I also streamlined MMS code to make it more readable (since I couldn't
read bits of it after a year or so having written it).
I also implemented sxmo_contacts.sh --name-or-number (print the contact
name, and if there is no contact name print the number back at us, as
opposed to '???'). This cleaned up some code in other places.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
The worry here is that if we have multiple cron jobs running at the same
time, the first one to exit will remove the lock. (I could be wrong on
this.)
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This implements sxmo_hook_smslog.sh which allows the user to establish
how logging looks.
We were also inconsistent on this: mms would set the contact names in
the logfile whereas sms ony gave the numbers and used a sed to convert
them.
I tought about setting this in sxmo_hook_tailtextlog.sh, but:
(1) processing on a tail is a PITA
(2) one can get the "raw" data for sms.txt from modelog.tsv.
I implemented a basic and a fancy option, but it is really up to the
user.
I also implemented sxmo_contacts.sh --name-or-number and so was able to
clear out the '???' code all over the place.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
- Add it to sxmo_migrate.sh
- Fix sxmo_migrate.sh to handle -- comments from conky.conf
- Only embed one config
- Strip it to minimum. It is only a date and time
- Make it to works under Wayland and X11
- Run it by default on sxmo_hook_start.sh
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>