gammaset 504 B

123456789101112131415161718192021222324252627282930
  1. #! /bin/mksh
  2. . $(realpath "$0" | xargs dirname)/../menu/dmenuconf
  3. DLIST="\
  4. 0.7
  5. 0.8
  6. 1.0
  7. 1.1
  8. 1.3
  9. 1.5
  10. "
  11. AAA="$(echo -e "$DLIST" | dmenu -i -b -p "Enter gamma: value [0.1 .. 2.0]" -nb "$DMENUBG" -nf "$DMENUFG" -sb "$DMENUFG" -sf "$DMENUBG" -fn "$DMENUFONT")"
  12. #for val in $DLIST ; do
  13. # if [ "$val" == "$AAA" ] ; then
  14. # echo "Setting gamma to $val"
  15. # exec xgamma -gamma $val
  16. # exit 0
  17. # fi
  18. #done
  19. if [ $val -lt 0.1 && $val -gt 2.0 ]
  20. then
  21. echo "Bad gamma value: $val"
  22. exit 0
  23. fi
  24. exec xgamma -gamma $AAA