summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/guiscripts/dmask10
1 files changed, 8 insertions, 2 deletions
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