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

commit fd924a64a6e6bc5d33eeb1d2385929dae8f9af0a
parent f0c65297e09c1962ea056a301e65e4cceafe4faf
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sun, 20 Jan 2019 15:01:59 +0100

Add script to find email from alias file

Diffstat:
Mlinks/.config/i3/config | 1+
Alinks/bin/contactmenu | 15+++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/links/.config/i3/config b/links/.config/i3/config @@ -90,6 +90,7 @@ bindsym $modalt+space exec ducksearch bindsym $mod+Tab focus mode_toggle bindsym $mod+a exec $term -e $audiomixer +bindsym $mod+Shift+a exec --no-startup-id contactmenu bindsym $mod+b exec $term -e board ~/doc bindsym $mod+$modalt+b exec $term -e board ~/mst bindsym $mod+c exec $term -e calcurse diff --git a/links/bin/contactmenu b/links/bin/contactmenu @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +shopt -s nullglob globstar + +contact_files=~/.mutt/aliases + +contact=$(cat "${contact_files[@]}" | awk '{ print $2 }'| dmenu_themed -i "$@") + +[[ -n $contact ]] || exit 0 + +email=$(cat "${contact_files[@]}" | grep "$contact" | grep "@" | sed 's/.*<//;s/>.*//') + +echo "$email" | xclip + +