rice

personal dot files and scripts for linux and macOS
Log | Files | Refs | README | LICENSE

prompt (240B)


      1 #!/bin/sh
      2 #
      3 # A dmenu prompt script.
      4 # Gives a demu prompt labeled with $1 to perform command $2.
      5 # For example:
      6 # `./prompt "Do you want to shutdown?" "shutdown -h now"`
      7 
      8 [ "$(printf "No\\nYes" | dmenu -i -c -l 2 -p "$1")" = "Yes" ] && $2