diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-03-08 00:27:49 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-03-08 00:27:49 +0100 |
commit | e5bf705060f230750950571a04a259b8eac48459 (patch) | |
tree | 3388c308364550fa33e53d3685e7a58870a540cb /bin | |
parent | 4b65e832b57a00c2cfb3c80335c9087b536b2e6b (diff) |
added more normalization and added auto size for dmask
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/guiscripts/dmask | 10 |
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 |