2022-06-02 18:10:59 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Toggle brightness to 'sleep' or 'awake', since brightnessctl does not support
|
|
|
|
# percentages of current amount.
|
2022-06-08 18:49:23 +02:00
|
|
|
# Just run the script
|
2022-06-02 18:10:59 +02:00
|
|
|
|
2022-06-08 18:49:23 +02:00
|
|
|
current=$( brightnessctl get )
|
|
|
|
# Doesn't have to be accurate so we can use built-in calculator.
|
|
|
|
brightnessctl -sq set $(( current / 10 * 3 ))
|
2022-06-02 18:10:59 +02:00
|
|
|
|