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>
Several places where dash behaves differently than bash:
* read in dash has to have a variable.
* use command -v as type is not POSIX
Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Fixes: find: warning: you have specified the global option -mindepth
after the argument -exec, but global options are not positional, i.e.,
-mindepth affects tests specified before it as well as those specified
after it. Please specify global options before other arguments.
Originally busybox find was used and it probably does not give this
warning.
Signed-off-by: Tzafrir Cohen <tzafrir@debian.org>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
jk_000 on irc had a issue with the led script hanging, during the
process of debugging it it seemed to be looking for the led lock in
~/.local/run.
I don't know if this is related, but it should be changed now that we
make sure to always initialize XDG_RUNTIME_DIR, and don't use
.local/run.
v1 of this patch caused the tests to fail because XDG_RUNTIME_DIR isn't
set in the test environment. This sets it to a temporary directory
before the test run.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
The current sxmo status bar cause a high cpu usage periodically. It was
working by triggering a script that build the whole line.
This is a proposition to improve this implementation:
The design is very simple. We got a root dir that contains files. We
will cat those file contents sorted by the file names.
This way we can update a specific part and the rewriting will then be
very light.
Some abstraction to make it simple:
$ sxmo_status.sh show
To display the current content
$ sxmo_status.sh debug
To help fuzzy developpers like me
$ sxmo_status.sh watch
To watch updates of the component files. Will stdout the new line on
change.
$ sxmo_status.sh add 99-time "11:35" # or
$ printf "11:35" | sxmo_status.sh add 99-time
To add or re-write the component 99-time with the content "11:35"
$ sxmo_status.sh del 99-time
To drop a component
Then, to wrap some of the sxmo status bar component we will still use
the statusbar hook. It make it easy for the user to override or drop
some components.
$ sxmo_hooks.sh statusbar time
To set the time based on the current time. Here other existing
components:
$ sxmo_hooks.sh statusbar call_duration
$ sxmo_hooks.sh statusbar modem
$ sxmo_hooks.sh statusbar modem_monitor
$ sxmo_hooks.sh statusbar wifi
$ sxmo_hooks.sh statusbar vpn
$ sxmo_hooks.sh statusbar battery
$ sxmo_hooks.sh statusbar volume
Or to rewrite everything:
$ sxmo_hooks.sh statusbar all
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>