From e5bf705060f230750950571a04a259b8eac48459 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 8 Mar 2023 00:27:49 +0100 Subject: added more normalization and added auto size for dmask --- bin/guiscripts/dmask | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/guiscripts/dmask b/bin/guiscripts/dmask index 067e311..6772854 100755 --- a/bin/guiscripts/dmask +++ b/bin/guiscripts/dmask @@ -4,6 +4,12 @@ which dmenu Xdialog ask > /dev/null || exit 1 -prompt="$(echo -n | dmenu -p "prompt:" | tr -d '\n')" +prompt="$(echo -n | dmenu -p "prompt:" | tr '"' "'")" + test -z "$prompt" && exit 1 -Xdialog --wrap --msgbox "$(ask "$prompt")" 20 40 +answer="$(ask "$prompt" | tr '"' "'" | fold -w 80 -s)" + +if ! Xdialog --wrap --msgbox "${answer:1}" 0 0 +then + echo -n "$answer" | xclip -r -sel c +fi -- cgit v1.2.3