suckless/dwm/redshifttoggle
Arija A. d0a994d534
Init
Signed-off-by: Arija A. <ari@ari.lt>
2025-05-25 22:11:02 +03:00

18 lines
451 B
Bash
Executable file

#!/usr/bin/env sh
main() {
if [ ! "$1" ]; then
echo 'Usage: redshifttoggle <xrandr display>'
exit 1
fi
if [ -f "/tmp/redshifttoggle.lock" ]; then
xrandr --output "$1" --gamma 1.0:1.0:1.0 --brightness 1.0
rm -f /tmp/redshifttoggle.lock
else
xrandr --output "$1" --gamma 1.91000000000000000000:1.46000000000000000000:1 --brightness 0.9
touch /tmp/redshifttoggle.lock
fi
}
main "$@"