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>