This removes the dependency on an external compiled app for writing the
brightness value to sysfs, and just echoes it directly to the backlight
sysfs node.
In addition, if the write fails, the script exits instead of sending a
misleading notification.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This uses the BACKLIGHT env var to override the device used for
controlling the backlight. My intention was to keep the default behavior
if it's unset, use the backlight/backlight path if that exists then fall
back to backlight/edp-backlight.
Finally, this changes the script to return immediately if no backlight
device is found with the given options.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
I took the WMCLASS linecode from the appmenu where we do not strip the
full line
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>
The Debian busybox does not provide those applets. This makes no
difference for PostmarketOS as they are an alias to busybox.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
The number variable was already used so it is not empty where we need it
to be.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Some pkill implementations match on /proc/pid/stat which is limited to
15 characters [1]. $KEYBOARD defaults to svkbd-mobile-intl which is more
then 15 characters, so use -f to match the full string. Note that sxmo
uses busybox pkill by default which does not have this limit.
[1] https://manpages.debian.org/buster/procps/pgrep.1.en.html (Notes)
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Useful when identifying/debugging lisgd crashes, and other strange behavior.
The log location is the same place where dwm logs to, so this seemed
appropriate.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
A mistake from implementing this resulted in the shell trying to expand
the 'word' part (e.g. "Line Out"), when the var was unset or null.
Obviously those are are strings and not expandable.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Currently there are 3 revisions of the L5, and they are all sharing the
same profile here since this only sets audio vars and they're all the
same. In the future the symlinks can be broken if profiles need to
deviate for some reason in order to set different values for vars, etc.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
If the env variables in this script are set, use those values. Else it
defaults to using the values set before this patch.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
This reads base/compatible from the devicetree to get the device name,
and sources a script in /bin with a filename in the format
'sxmo_deviceprofile_NAME.sh'. The purpose of this is to allow
setting/overriding variables in other sxmo scripts with device-specific
values. For example, some audio devices on one phone may have different
names on another.
Signed-off-by: Anjandev Momi <anjan@momi.ca>
Some script could behave differently if the dmenu has been killed with a
swipe up gesture. We have to return the dmenu exit code.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
* The sxmo_modemmonitor.sh will now run a new sxmo_modemcall.sh
dedicated menu to Pickup, Hangup or Mute the call. It will not write
notifications anymore.
* We now can mute the ring with the new pickup menu. With the default
hook, this will stop the ringtone like the missed_call would do.
* The sxmo_modemcall.sh now use a new sxmo_proximitylock.sh which
will lock the screen when putting the phone in front of the ear. This
script should be smart enough to work smoothly with a crust context.
To achieve this, the proximity_lock will only disable the initial
lock (the one who want to go back in crust after some seconds) if the
phone moved a little bit and is not in your pocket. So forgetting the
phone in a table or not earing the ring in your bag will not empty the
battery. You'll find the phone in crust with notifications.
* The sxmo_modemcall.sh do not monitor finished calls anymore. We leave
it with hangup or being killed by sxmo_modemmonitor.sh. This simplify
the call script and prevent double deleting mmcli calls. I had to use
pids and wait commands to fix and issue and make the script killeable
by the monitor.
Plus, only the monitor will now delete calls. The call script should be
precise on what happen using cached files.
* Discarded and hanged up calls are two different behavior with
different script (by default use the same linked ones)
* Fixed a bug where sometime ringing was started twice. I think this is
cause by the new checkforincomingcalls in the connected state change. We
now use a file to test if the call already has been managed.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Very usefull when displaying multiple files. It is used by mless, a
basic mblaze command to show emails.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Anjandev Momi <anjan@momi.ca>