Send mail address to X11
This commit is contained in:
parent
373316fddb
commit
481349d07e
10
kmail.sh
10
kmail.sh
|
@ -33,14 +33,20 @@ case "$#" in
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
contact_pattern="$*"
|
debug_message "− Verify arguments : Script get ${#} arguments."
|
||||||
|
contact_pattern="${*}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# ]]]
|
# ]]]
|
||||||
|
|
||||||
|
debug_message "Look for a contact with these informations:\n${contact_pattern}"
|
||||||
contact_line=$(khard email "${contact_pattern}" | sed -n 2p)
|
contact_line=$(khard email "${contact_pattern}" | sed -n 2p)
|
||||||
|
debug_message "Matching contact:\n${contact_line}"
|
||||||
|
|
||||||
contact_mail=$(printf '%s' "${contact_line}" | awk '{print $NF}')
|
contact_mail=$(printf '%s' "${contact_line}" | awk '{print $NF}')
|
||||||
|
debug_message "Mail of this contact:\n${contact_mail}"
|
||||||
|
|
||||||
|
# Print the message to X11
|
||||||
|
printf '%s' "${contact_mail}" | xdotool type --clearmodifiers --file -
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue