💾 Archived View for hajime.4teri.de › dotfiles › file › scripts › abook.sh.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
abook.sh - dotfiles - Collection of my dotfiles
---
abook.sh (474B)
---
1 #! /bin/sh
2 TMP_FILE="/tmp/abook"
3 PERS_FILE="/home/zocki/.abook/addressbook"
4
5 die()
6 {
7 notify-send "Nothing selected, Aborting."
8 rm "$TMP_FILE"
9 exit
10 }
11
12 abook --convert --infile "$PERS_FILE" --outfile "$TMP_FILE" --outformat csv
13
14 chosen=$(cut -d ',' -f1 "$TMP_FILE" | replace "\"" "" | rofi -dmenu)
15 if [ -z "$chosen" ]
16 then
17 die
18 fi
19
20 mail=$(abook --mutt-query "$chosen" | cut -f1 | rofi -dmenu)
21
22 if [ -z "$mail" ]
23 then
24 die
25 fi
26
27 rm "$TMP_FILE"
28
29 xdotool type --delay 0 "$mail"
generated w/ stagit-gemini