Skip to content

Instantly share code, notes, and snippets.

@BlurryFlurry
Created October 11, 2018 10:38
Show Gist options
  • Save BlurryFlurry/fe8770b48f647e280cf5b01c39239b36 to your computer and use it in GitHub Desktop.
Save BlurryFlurry/fe8770b48f647e280cf5b01c39239b36 to your computer and use it in GitHub Desktop.
Ask sudo password rofi
#!/bin/sh
# Take password prompt from STDIN, print password to STDOUT
# the sed piece just removes the colon from the provided
# prompt: rofi -p already gives us a colon
rofi -dmenu \
-password \
-no-fixed-num-lines \
-p "$(printf "$1" | sed s/://)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment