sb: use gammastep on wayland

This commit is contained in:
Lauri Räsänen 2024-11-09 16:15:59 +02:00
parent 4537d3777f
commit b318bc2ee4

View file

@ -8,7 +8,13 @@ export HISTSIZE=100
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
function screen_brightness() {
function screen_brightness_wlroots() {
brightness="${1:-1}"
temp="${2:-6500}"
gammastep -b "$brightness" -O "$temp"
}
function screen_brightness_x11() {
redshift -x
brightness="${1:-1}"
@ -19,6 +25,13 @@ function screen_brightness() {
redshift -O "$temp"
}
function screen_brightness() {
if [ "$XDG_SESSION_TYPE" = "x11" ]; then
screen_brightness_x11 "$@"
else
screen_brightness_wlroots "$@"
fi
}
alias sb=screen_brightness
function upload() {