Advertisement
Guest User

Prompt

a guest
Mar 4th, 2020
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/bin/sh
  2. # A dmenu binary prompt script. Source: Luke Smith https://www.youtube.com/watch?v=R9m723tAurA
  3. # Gives dmenu prompt labeled with $1 to perform command $2
  4. # For example:
  5. # './prompt "Do you want to shutdown?" "shutdown -h now"
  6.  
  7. [ $(echo -e "No\nYes" | dmenu -i -p "$1") \
  8. == "Yes" ] && $2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement