dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

dmenu-colorpicker (262B)


      1 #!/bin/sh
      2 die() { printf '%s\n' "$1" >&2 && exit 1; }
      3 command -v xcolor || die "xcolor not found."
      4 
      5 case "$(printf 'Hex\nRGB\n' | dmenu -l 2 -p "Color format> " -i)" in
      6   Hex)
      7     xcolor --format hex | clc
      8     ;;
      9   RGB)
     10     xcolor --format rgb | clc
     11     ;;
     12 esac