969 Commits

Author SHA1 Message Date
0b3ce90e74 sxmo_rotate: don't restart lisgd on sway
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.
2023-07-16 12:45:54 +00:00
bf00570117 sxmo_wmmenu: respect SXMO_WORKSPACE_WRAPPING
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.
2023-07-15 21:36:58 +00:00
021462a4a5 sxmo_autorotate: allow all four orientations 2023-07-09 07:25:31 +00:00
6027263770 sxmo_swayinitconf: fix xkb paths
the xkb files were moved in 6a529751 but not all references were updated
2023-07-09 07:25:31 +00:00
Willow Barraco
8b10c99a09 sxmo_wm.sh: fix dpms switch when outputs are partially turned off
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>
2023-07-01 21:23:15 -07:00
hazardchem
bb0c5578b1 sxmo_terminal.sh: Add alacritty as option
Signed-off-by: hazardchem <pthom44@live.com.au>
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-06-05 13:41:00 +02:00
ArenM
7ea019e402 Manual fixups for nerd fonts 3.0
* 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>
2023-05-29 19:58:29 +02:00
Anjandev Momi
66e20f57af fix editorconfig: remove trailing space and use tabs 2023-05-14 00:19:17 -07:00
Willow Barraco
3338bec056 Increase dmenu line so that appmenu is complete 2023-05-12 08:42:44 +02:00
Willow Barraco
f5dd68bc75 Reset sxmo_run_periodically.sh wait first feature 2023-04-28 11:57:53 +02:00
ArenM
2691b8cca6 Refactor presuspend checks to run infrequently
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>
2023-04-28 11:39:32 +02:00
ArenM
ce6514d490 check SXMO_WM instead of tinydm session when logging out
This could break if someone decides not to use tinydm, or uses
tinyd-set-session instead of togglewm.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-04-23 19:29:39 -07:00
Peter John Hartman
7965c0c2e0 Rename $OS to $SXMO_OS. 2023-04-04 10:55:18 -05:00
ArenM
f630b2bbdb sxmo_status.sh add locking
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>
2023-03-31 19:29:15 +02:00
Willow Barraco
75cf104db3 sxmo_run_periodically.sh avoid spaming kill errors 2023-03-30 17:40:26 +02:00
Willow Barraco
ea27c8d785 Avoid crazy edge case if the first wake lock checker is delayed 2023-03-30 17:40:26 +02:00
Willow Barraco
856905c7ae Add a sxmo_brun.sh to run binaries 2023-03-29 21:04:18 +02:00
Willow Barraco
2b1dde63ae Manage and migrate user Xresources
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>
2023-03-29 09:24:44 -05:00
Willow Barraco
db0cbac8ab Add an explicit "None" choice while adding wpa network passphrase
And refactorise those menu choices computing…

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-03-23 13:45:40 -05:00
Peter John Hartman
f8c9138739 dialer: don't show group contacts
There's no need since you can't *dial* them, and it makes narrow-as-you-type searches annoying.
2023-03-23 13:42:44 -05:00
Willow Barraco
b730f4562f Use a single font: deja vu mono nerd font
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-03-23 13:42:43 -05:00
Peter John Hartman
be0bb09739 cleanup check_state_mutex (rename to wakelock)
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>
2023-03-12 08:17:23 +01:00
Willow Barraco
e32e12637b sxmo_audio.sh move close menu at the the top 2023-03-10 13:00:15 +01:00
Peter John Hartman
08a8b15a96 networks: move close to top
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>
2023-03-10 13:00:15 +01:00
Peter John Hartman
611d4b2f44 rtcwake: give its wakelock a uniq id
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>
2023-03-09 15:33:58 +01:00
ArenM
6213d1dacd Add debian support to timezonechange
This was reported and tested by jason on the irc.pine64.org#pinephone
channel.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-03-09 15:33:57 +01:00
Peter John Hartman
d27f7e108d normalize smslog for mms and sms
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>
2023-03-03 16:33:14 +01:00
hazardchem
7f78a92b18 winit.sh/xinit.sh: added pkill superd before starting WM.
This patch superseeds the following:

https://lists.sr.ht/~mil/sxmo-devel/patches/39336

This should prevent situations where superd still lives and causes issues on start.

Signed-off-by: hazardchem <pthom44@live.com.au>
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-03-03 16:33:13 +01:00
Willow Barraco
5f0516bed7 Manage bonsaid on dwm too
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-03-03 07:45:13 -06:00
Willow Barraco
8a841877e8 Fix sxmo_migrate.sh for conky config 2023-02-26 08:01:15 +01:00
Willow Barraco
fc68f77cce Re-habilitate conky
- 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>
2023-02-25 07:23:44 -06:00
Willow Barraco
7af66e1ea8 Use unit instead of nanoseconds 2023-02-24 19:21:47 +01:00
Willow Barraco
e0a8731a61 Drop extra whitespace 2023-02-24 19:17:54 +01:00
Peter John Hartman
41502ea358 remove the last sxmo_uniq_exec.sh
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-02-24 10:46:48 +01:00
Willow Barraco
73fdb6140d Remove debug logs 2023-02-24 09:42:45 +01:00
Willow Barraco
de33574d58 Fix mnc detection cause sxmo_hook_mnc.sh has been simplified earlier 2023-02-24 09:42:45 +01:00
ArenM
3ab2b5480f Read wakeup_count instead of using sxmo_wakeafter
The approach sxmo_wakeafter uses is flawed because the kernel isn't
obligated to pass control to it after suspend. I'm pretty sure it
normally gets called when the kernel updates the system clock.

Since we're waiting for some time after every suspend we're not actually
using opportunistic suspend. It's much simpler to read wakeup_count to
ask the kernel to wait until there's no active locks.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-02-24 09:42:44 +01:00
Peter John Hartman
b3da010599 wakelock fixup: add sxmo_ to infinite case 2023-02-23 18:07:32 -06:00
Peter John Hartman
b9a6fb92c7 wakelock: add sxmo_ in front of names
We should make sure we are unique to avoid conflict with non-sxmo
programs.
2023-02-23 17:12:38 -06:00
Peter John Hartman
dc290f7159 add debug watch option to wakelock 2023-02-23 17:12:38 -06:00
Peter John Hartman
45f10889b8 add warning to sxmo wakelock 2023-02-23 17:12:38 -06:00
Peter John Hartman
36592269c0 sxmo_wakelock.sh handle units 2023-02-23 17:12:38 -06:00
Willow Barraco
b1ab67cc89 sxmo_led.sh: Don't set exclusive flock to get values
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-02-23 17:12:38 -06:00
Willow Barraco
2868a86710 Ensure sxmo_led.sh reset leds when it finish
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-02-23 17:12:38 -06:00
Willow Barraco
b8e6cf3330 Centralize wakelock management in sxmo_wakelock.sh
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-02-23 17:12:36 -06:00
Willow Barraco
4cfdfa3b26 Drop now useless wakeup management
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-02-23 17:11:50 -06:00
Willow Barraco
89a77e6057 Rely on /sys/power/wake_lock
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Peter John Hartman <peterjohnhartman@gmail.com>
2023-02-23 17:11:48 -06:00
Peter John Hartman
9a22b0835d sxmo log: if no XDG_STATE_HOME use HOME
If someone ssh's in and runs our commands, for instance.
2023-02-22 07:39:43 -06:00
Peter John Hartman
fd8d87cc2c check mutex: change to debug
It spams up the log and it does wc -l which takes up processing, so put
as debug rather than log so its optional.
2023-02-18 09:52:36 -06:00
Willow Barraco
15551ca895 Drop double cal to statusbar refresh 2023-02-18 09:49:19 +01:00