You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mpw-get 390B

12345678910111213
  1. #!/usr/bin/env elvish
  2. t=""
  3. if (eq 0 (count $args)) {
  4. @sites=(keys (from-json <~/.mpw.d/(get-env MPW_FULLNAME).mpsites.json)[sites])
  5. if (eq ?(tty -s) $ok) {
  6. t=(echo &sep="\n" $@sites | sk)
  7. } else {
  8. t=(echo &sep="\n" $@sites | rofi -dmenu -p 'Enter site: ' -width 25)
  9. }
  10. } else {
  11. t=$args[0]
  12. }
  13. mpw -t x -M (gpg2 -d -q ~/sns/password.gpg) $t 2>/dev/null | xclip -sel c -r -l 1