dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

contactmenu (322B)


      1 #!/usr/bin/env bash
      2 set -e
      3 
      4 shopt -s nullglob globstar
      5 
      6 contact_files=~/.config/mutt/aliases
      7 
      8 contact=$(cat "${contact_files[@]}" | awk '{ print $2 }'| dmenu -i "$@")
      9 [[ -n $contact ]] || exit 0
     10 
     11 email=$(cat "${contact_files[@]}" | grep "$contact " | grep "@" | sed 's/.*<//;s/>.*//')
     12 
     13 echo "$email" | xclip
     14 echo "$email"