Files
sxmo-utils/scripts/core/sxmo_flashtoggle.sh
Aren Moynihan 8c0c0e4311 check if flash led exists instead of using SXMO_DISABLE_LEDS
Also use brightnessctl directly, the flash toggle logic doesn't use any
of the features provided on top of it by sxmo_led.sh. This simplifies
the cases that sxmo_led.sh needs to support.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2024-04-26 14:14:04 +02:00

10 lines
244 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2024 Sxmo Contributors
if [ "$(brightnessctl -d "white:flash" get)" -gt 0 ]; then
brightnessctl -q -d "white:flash" set "0%"
else
brightnessctl -q -d "white:flash" set "100%"
fi