diff --git a/home/.bin/bri b/home/.bin/bri new file mode 100755 index 0000000..2f30869 --- /dev/null +++ b/home/.bin/bri @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh +if \[ "$1" = "--up" \]; then + # eww -c $HOME/.dotfiles/eww/bar o bri && brightnessctl -q s 5%+ && sleep 3 && eww -c $HOME/.dotfiles/eww/bar c bri + swayosd-client --brightness raise + # brightnessctl -q s 5%+ +elif \[ "$1" = "--down" \]; then + # eww -c $HOME/.dotfiles/eww/bar o bri && brightnessctl -q s 5%- && sleep 3 && eww -c $HOME/.dotfiles/eww/bar c bri + swayosd-client --brightness lower + # brightnessctl -q s 5%- +elif \[ "$1" = "--get" \]; then + echo $(brightnessctl | head -n 2 | tail -n 1 | awk '{print $4}' | tr -d '(%)') +fi diff --git a/home/.bin/vol b/home/.bin/vol new file mode 100755 index 0000000..fd32afd --- /dev/null +++ b/home/.bin/vol @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh +if [ "$1" = "--up" ]; then + # eww -c $HOME/.dotfiles/eww/bar o vol && wpctl set-volume u/DEFAULT_AUDIO_SINK@ 5%+ && sleep 3 && eww -c $HOME/.dotfiles/eww/bar c vol + swayosd-client --output-volume raise + # wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +elif [ "$1" = "--down" ]; then + # eww -c $HOME/.dotfiles/eww/bar o vol && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && sleep 3 && eww -c $HOME/.dotfiles/eww/bar c vol + swayosd-client --output-volume lower + # wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +fi