citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

dmenup (182B)


      1 #!/usr/bin/env bash
      2 
      3 set -e
      4 
      5 if [ -z "$1" ]; then
      6   printf 'usage: dmenup <prompt> <command> [cmdargs...]\n' >&2
      7   exit 1
      8 fi
      9 
     10 prompt="$1"
     11 shift
     12 
     13 out=$(dmenu -p "$prompt")
     14 
     15 "$@" $out