dotfiles/sway/scripts/sanitize_wob
James Patrick ae3dd9681e Added wob support for brightness & volume.
Project is early, but I'm hoping this will be a proper replacement for
xob.
https://github.com/francma/wob
2019-10-06 00:19:21 -04:00

9 lines
161 B
Bash
Executable File

#!/bin/bash
while read IN
do
[[ ! $IN =~ ^[+-]?[0-9]+$ ]] && IN=0
[[ $IN -gt 100 ]] && IN=100
[[ $IN -lt 0 ]] && IN=0
echo $IN
done < "${1:-/dev/stdin}"