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 f6dab4ebcfd1412468e8216eb47230239ed481c5
parent 9baef2b089ea714208beb3049699c7464f5f47ea
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 27 Jan 2020 19:23:11 +0100

Add -i option to input message via dmenu

Diffstat:
M.local/bin/text.sh | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.local/bin/text.sh b/.local/bin/text.sh @@ -5,7 +5,10 @@ to="$(find "$HOME/.password-store/Telephone" -type f | \ dmenu -i -p "to:")" if [ $# -eq 0 ]; then msg="$(cat)" -else +elif [ "$1" = "-i" ]; then msg="$(echo | dmenu -p "message:")" +else + echo "usage: ${0##/*} [-i]" >&2 + exit 1 fi printf '%s\n' "$msg" | sendtext "$to"