nixos-config/modules/home-manager/ricing/awesomewm/dotfiles/misc/scripts/redshift
2024-07-12 18:19:30 +09:00

16 lines
289 B
Bash

#!/usr/bin/env bash
is_active=$(cat ~/.cache/redshift)
toggle() {
if [[ $is_active == *"true"* ]]; then
redshift -x && echo false > ~/.cache/redshift
else
redshift -O 4000 && echo true > ~/.cache/redshift
fi
}
if [[ $1 == "--toggle" ]]; then
toggle
fi