YAD - Tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
misko_2083
Posts: 114
Joined: Tue 08 Nov 2016, 13:42

#441 Post by misko_2083 »

stemsee wrote:Yad colour columns
I think someone shared this before, but I just (re) discovered it!
With font:

Code: Select all

 yad --list --column="Column Name" --column="@fore@" --column="@back@" --column="@font@" "red text" "#ff0000" "#ffff00" "Ubuntu 15" "black text" "#000000" "#90EE90" "Arial" "yellow text" "#ffff00" "#0000FF" "Droid bold italic 20" "green text" "#90EE90" "#ff0000" "Sans italic 20"
Attachments
yad-special-columns.png
(13.5 KiB) Downloaded 737 times

stemsee

#442 Post by stemsee »

That reminds me of my old msx computer's game graphics! :lol:

lika
Posts: 7
Joined: Tue 07 Aug 2018, 01:30

#443 Post by lika »

Hello misko_2083.

Can you help me solve the problem with a script. I modified your youtube-dl script, but without success.
I wish to add the forms with checkboxes and progress (with --enable- log) to an window. It's like appinstaller, checkboxes call scripts and when the archive is unpacked, a final dialog pops up.
For a week now I can't solve the problem, it does not work. :(

It looks like this:
Image
(this is merging layers in the GIMP) in fact it turns out either checkboxes or progress

Code: Select all

#!/bin/bash

export faextraxt='@bash -c "install_app %1"'

# We need this to store the youtube PID
export fapid=$(mktemp -u --tmpdir fpid.XXXXXXXX)

export fapipe=$(mktemp -u --tmpdir ftd.XXXXXXXX)
mkfifo "$fapipe"
export fapipetwo=$(mktemp -u --tmpdir ftd2.XXXXXXXX)
mkfifo "$fapipetwo"

trap "rm -f $fapipe $fapipetwo $fapid" EXIT

fakey=$(($RANDOM * $$))

function install_app
{
  echo "2:@disable@"

# Check if the URL is valid with the spider
if wget -q --spider "$1"; then
  echo "#Preparing to download" >> "$fapipe"

   >"$fapid"
   while read line; do
     if [[ "$(echo $line | grep '[0-9]*%')" ]];then
        percent=$(echo $line | awk '{print $2}')
        echo "${percent%.*}%" >> "$fapipe"
     fi

     if [[ "$(echo $line | grep '\[download\]')" ]];then
        progress=$(echo $line | awk '{$1=""; print $0}')
        echo "#$progress" >> "$fapipe"
     fi
   done < "$fapipetwo" &
   LOOP_PID="$!"

    tar xf archive.tar.xz 2>&1 >> $fapipetwo & \
    echo $! > "$fapid"
    wait $!

    if [[ "$?" = 0 ]]
      then
         echo "100%" >> "$fapipe"
         echo "#Download completed." >> "$fapipe"
         kill "$LOOP_PID"
    elif [[ ! -s "$fapid" ]]; then
         echo "#Download canceled" >> "$fapipe"
         kill "$LOOP_PID"
    else
         echo "#Download error" >> "$fapipe"
         kill "$LOOP_PID"
    fi
else
    echo "#Invalid URL" >> "$fapipe"
fi

    echo "2:$faextraxt"
}
export -f install_app

function get_pid_and_kill () {
if [[ -s "$fapid" ]]; then
  BCKUPID="$(<$fapid)"
  >"$fapid"
  kill $BCKUPID 2>/dev/null
fi
}
export -f get_pid_and_kill

exec 3<> $fapipe
exec 4<> $fapipetwo

yad --plug="$fakey" --tabnum=1 --form --field "Choose a folder:DIR" "$HOME" \
--field="Install!system-software-install:fbtn" "$faextraxt" &

#yad --plug="$fakey" --tabnum=2 --form --field="Add a shortcut in the applications menu:CHK" --field="Add a desktop shortcut:CHK" <&3 &

yad --plug="$fakey" --tabnum=2 --window-icon="$ICON" --progress \
--enable-log="Show log" --log-height=100 --tail --borders=5 <&3 &


yad --paned --key="$fakey" --buttons-layout=edge --button="gtk-close:0" \
--button="Abort":'bash -c "get_pid_and_kill" 2>/dev/null' --text="" \--title="TEST" --window-icon="$ICON" --center

exec 3>&-
exec 4>&-
Thank you in advance.

User avatar
misko_2083
Posts: 114
Joined: Tue 08 Nov 2016, 13:42

#444 Post by misko_2083 »

stemsee wrote:That reminds me of my old msx computer's game graphics! :lol:
You must have had a lot of 8-bit fun.
The first one I had had a pentium 1 MMX on 233MHz and 32 MB of RAM. :)
lika wrote:Hello misko_2083.

Can you help me solve the problem with a script. I modified your youtube-dl script, but without success.
I wish to add the forms with checkboxes and progress (with --enable- log) to an window. It's like appinstaller, checkboxes call scripts and when the archive is unpacked, a final dialog pops up.
For a week now I can't solve the problem, it does not work. :(
I made an example with for one loop as the main process so you can see how the data is flowing to the progress bar.
The form fields are now restored.
Also you may want to disable the form fields while installing. Added that too.
Image

Code: Select all

#!/bin/bash

export faextraxt='bash -c "install_app "%1" %2 %3 %4"'

# We need this to store the youtube PID
export main_proc_id=$(mktemp -u --tmpdir fpid.XXXXXXXX)

export progress_pipe=$(mktemp -u --tmpdir ftd.XXXXXXXX)
mkfifo "$progress_pipe"

export percentage_pipe=$(mktemp -u --tmpdir ftd2.XXXXXXXX)
mkfifo "$percentage_pipe"

export form_pipe=$(mktemp -u --tmpdir ftd3.XXXXXXXX)
mkfifo "$form_pipe"

trap "rm -f $progress_pipe $percentage_pipe $form_pipe $main_proc_id" EXIT

fakey=$(($RANDOM * $$))

function install_app
{

# Form fields are read in a cycle 1-4, each cycle sets new values

# Disables all the form fields when the install starts
echo "@disabled@" > "$form_pipe"
echo "@disabled@" > "$form_pipe"
echo "@disabled@" > "$form_pipe"
echo "@disabled@" > "$form_pipe"

echo "#Selected extraction path: $1" >> "$progress_pipe"
echo "#" >> "$progress_pipe"
echo "#Add a shortcut in the applications menu : $2" >> "$progress_pipe"
echo "#Add a desktop shortcut : $3" >> "$progress_pipe"
echo "#" >> "$progress_pipe"

  echo "#Preparing to extract..." >> "$progress_pipe"

   >"$main_proc_id"
   while read line; do
     if [[ "$(echo $line | grep '[0-9]*%')" ]];then
        percent=$(echo $line | awk '{print $2}')
        echo "${percent%.*}%" >> "$progress_pipe"
        echo "$line" >> "$progress_pipe"
     fi

     echo "#$line" >> "$progress_pipe"

   done < "$percentage_pipe" &
   LOOP_PID="$!"

    # main process example for a demonstration purpose
    for i in {1..100}; do echo "$i %" 2>&1 >> $percentage_pipe; sleep .1; done & echo $! > "$main_proc_id"
    
    # You would probably do something like this
    # tar xf archive.tar.xz 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"

    # Wait here
    # Wait returns exit status ${?}
    # It's stderr is redirected to /dev/null to prevent kill command to print messages
    wait $(<$main_proc_id) 2>/dev/null

    if [[ "$?" = 0 ]]
      then
         echo "100%" >> "$progress_pipe"
         echo "#Install completed." >> "$progress_pipe"
         kill "$LOOP_PID"
    elif [[ ! -s "$main_proc_id" ]]; then
         echo "#Install canceled." >> "$progress_pipe"
         kill "$LOOP_PID"
    else
         echo "#Install error." >> "$progress_pipe"
         kill "$LOOP_PID"
    fi


    # Strips quotes from stored path
    install_dir="${1#\'}"
    install_dir="${install_dir%\'}"

    # Resets the field values when the install ends
    echo "${install_dir}" > $form_pipe
    echo "$2" > $form_pipe
    echo "$3" > $form_pipe
    echo "$faextraxt &" > $form_pipe
}
export -f install_app


function get_pid_and_kill () {
if [[ -s "$main_proc_id" ]]; then
  BCKUPID="$(<$main_proc_id)"
  >"$main_proc_id"
  kill $BCKUPID 2>/dev/null
fi
}
export -f get_pid_and_kill

exec 3<> $progress_pipe
exec 4<> $percentage_pipe
exec 5<> $form_pipe

yad --plug="$fakey" --tabnum=1 --form \
    --field="Choose a folder:DIR" \
    --field="Add a shortcut in the applications menu:CHK" \
    --field="Add a desktop shortcut:CHK" \
    --field="Install!system-software-install:fbtn" --cycle-read <&5 &

    # This is the initial cycle that sets the form field values
    echo "${HOME}" > $form_pipe
    echo "TRUE" > $form_pipe
    echo "FALSE" > $form_pipe
    echo "$faextraxt &" > $form_pipe

yad --plug="$fakey" --tabnum=2 --window-icon="$ICON" --progress \
--enable-log="Show log" --log-height=100 --tail --borders=5 <&3 &


yad --paned --key="$fakey" --buttons-layout=edge --button="gtk-close:0" \
--button="Abort":'bash -c "get_pid_and_kill" 2>/dev/null' --text="" --title="TEST" --window-icon="$ICON" --center

exec 3>&-
exec 4>&-
exec 5>&-

lika
Posts: 7
Joined: Tue 07 Aug 2018, 01:30

#445 Post by lika »

misko_2083 wrote: I made an example with for one loop as the main process so you can see how the data is flowing to the progress bar.
The form fields are now restored.
Also you may want to disable the form fields while installing. Added that too.
Oh, it's great. Thank you very much!

How to print a realtime unpacking log from xz (gz, 7z whatever) to YAD log spoiler instead process simulation? And call a popup dialog if the "Abort" or "Close" or window close button pressed during installation?

I chose the path to extract, but:

Code: Select all

tar: Error is not recoverable: exiting now
I add "$1" as a destination folder to the tar:

Code: Select all

tar xfv archive.tar.xz -C "$1" 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"
and now:

Code: Select all

tar: '/home/lika/local apps': Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
It looks like the script doesn't find the specified folder because that folder is not in the current folder where the script is located.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#446 Post by fredx181 »

lika wrote:I add "$1" as a destination folder to the tar:
Code:
tar xfv archive.tar.xz -C "$1" 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"
That works for me if I remove the slashes (and quotes after them) on line 3, so becomes this:

Code: Select all

export faextraxt='bash -c "install_app %1 %2 %3 %4"'
Fred

lika
Posts: 7
Joined: Tue 07 Aug 2018, 01:30

#447 Post by lika »

fredx181 wrote: That works for me if I remove the slashes (and quotes after them) on line 3, so becomes this:

Code: Select all

export faextraxt='bash -c "install_app %1 %2 %3 %4"'
Fred
In this case the archive.tar.zx is unpacked in the same folder where is it located.
Regardless of the specified path.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#448 Post by fredx181 »

lika wrote:
fredx181 wrote: That works for me if I remove the slashes (and quotes after them) on line 3, so becomes this:

Code: Select all

export faextraxt='bash -c "install_app %1 %2 %3 %4"'
Fred
In this case the archive.tar.zx is unpacked in the same folder where is it located.
Regardless of the specified path.
Strange.. works for me to extract to folder of choice, with this tar extract line the way you changed:

Code: Select all

tar xfv app.tar.xz -C "$1" 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"
Fred

lika
Posts: 7
Joined: Tue 07 Aug 2018, 01:30

#449 Post by lika »

fredx181 wrote: Strange.. works for me to extract to folder of choice, with this tar extract line the way you changed:

Code: Select all

tar xfv app.tar.xz -C "$1" 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"
Yes, pathing works. My previous post was wrong.

And how to print a original realtime unpacking log (which can be seen in the terminal) from xz, gz etc to YAD log spoiler instead percentages simulation + call a popup dialog ("Are you sure you want to cancel the installation?) while "Abort" or "Close" or window close button pressed.

I tried to apply the "--wrap" option for the log spoiler, but seems it not affected for progress form or I'm doing something wrong.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#450 Post by fredx181 »

lika wrote:And how to print a original realtime unpacking log (which can be seen in the terminal) from xz, gz etc to YAD log spoiler instead percentages simulation
There is some output, but not all, I think commenting out some lines starting at line 41, change to:

Code: Select all

   while read line; do
#     if [[ "$(echo $line | grep '[0-9]*%')" ]];then
#       percent=$(echo $line | awk '{print $2}')
#        echo "${percent%.*}%" >> "$progress_pipe"
        echo "$line" >> "$progress_pipe"
#     fi
Then I see all output from tar.

Your other question can be answered better by misko, I guess.

Fred

lika
Posts: 7
Joined: Tue 07 Aug 2018, 01:30

#451 Post by lika »

fredx181 wrote: There is some output, but not all, I think commenting out some lines starting at line 41, change to:

Code: Select all

   while read line; do
#     if [[ "$(echo $line | grep '[0-9]*%')" ]];then
#       percent=$(echo $line | awk '{print $2}')
#        echo "${percent%.*}%" >> "$progress_pipe"
        echo "$line" >> "$progress_pipe"
#     fi
Then I see all output from tar.
Fred
Thank you.
I'll see.

User avatar
misko_2083
Posts: 114
Joined: Tue 08 Nov 2016, 13:42

#452 Post by misko_2083 »

Thanks fredx181, don't know why I thought that DIR field in the form dialog doesn't quote the path. :roll:

lika Added pv command to display the progress. One more dependancy to install but I see no other way for now.

X window button is managed by the window manager so intercepting it is impossible. It's only possible to get the exit status 252 when the window is closed via X.That's why I added undecoratzed to pprevent the paned dialog from closing and --no-escape to prevent closing the same dialog if Escape was pressed. That is the simplest solution. Anything else would be too complex.

To use the checkboxes in the function install_app you would need to check if $2 and $3 are true or false.

The script now displays extra dialogs and prevents them from opening multiple times e.g.if the cancel and abort buttons are clicked several times. This is working for me:

Code: Select all

#!/bin/bash

if ! hash pv; then
   yad --text "install pv first"
   exit 1
fi

export faextraxt='bash -c "install_app %1 %2 %3 %4"'

# We need this to store the main proces ID
export main_proc_id=$(mktemp -u --tmpdir fpid.XXXXXXXX)

export progress_pipe=$(mktemp -u --tmpdir ftd.XXXXXXXX)
mkfifo "$progress_pipe"

export percentage_pipe=$(mktemp -u --tmpdir ftd2.XXXXXXXX)
mkfifo "$percentage_pipe"

export form_pipe=$(mktemp -u --tmpdir ftd3.XXXXXXXX)
mkfifo "$form_pipe"

trap "rm -f $progress_pipe $percentage_pipe $form_pipe $main_proc_id" EXIT

fakey=$(($RANDOM * $$))

function install_app
{
# Form fields are read in a cycle 1-4, each cycle sets new values

# Disables all the form fields when the install starts
echo "@disabled@" > "$form_pipe"
echo "@disabled@" > "$form_pipe"
echo "@disabled@" > "$form_pipe"
echo "@disabled@" > "$form_pipe"

echo "#Selected extraction path: $1" >> "$progress_pipe"
echo "#" >> "$progress_pipe"
echo "#Add a shortcut in the applications menu : $2" >> "$progress_pipe"
echo "#Add a desktop shortcut : $3" >> "$progress_pipe"
echo "#" >> "$progress_pipe"


  echo "#Preparing to extract..." >> "$progress_pipe"

   >"$main_proc_id"
   while read -r line; do
     # If line is a integer number
     if [[ "$line" == +([0-9]) ]];then
        echo "$line" >> "$progress_pipe"
     else
        echo "#$line" >> "$progress_pipe"
     fi

   done < "$percentage_pipe" &
   LOOP_PID="$!"

    # main process example for a demonstration purpose
    # for i in {1..100}; do echo "$i %" 2>&1 >> $percentage_pipe; sleep .1; done & echo $! > "$main_proc_id"
    
    pv -n archive.tar.xz 2>$percentage_pipe | xzcat | tar xp -C "$1" -v 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"

    # Wait here
    # Wait returns exit status ${?}
    # It's stderr is redirected to /dev/null to prevent kill command to print messages
    wait $(<$main_proc_id) 2>/dev/null

    if [[ "$?" = 0 ]]
    then
         echo "100%" >> "$progress_pipe"
         echo "#Install completed." >> "$progress_pipe"
         kill "$LOOP_PID"
         >$main_proc_id
         yad --text="Install successfull" --button="gtk-ok:0"  &
    elif [[ ! -s "$main_proc_id" ]]; then
         echo "#Install canceled." >> "$progress_pipe"
         kill "$LOOP_PID"
         >$main_proc_id
    else
         echo "#Install error." >> "$progress_pipe"
         kill "$LOOP_PID"
         >$main_proc_id
    fi

    # Resets the field values when the install ends
    echo "$1" > $form_pipe
    echo "$2" > $form_pipe
    echo "$3" > $form_pipe
    echo "$faextraxt &" > $form_pipe
}
export -f install_app

function get_pid_and_kill () {
Sure_Command='yad --text=Are you sure you want to cancel the installation? --button=gtk-yes:0 --button=gtk-no:1'
Sure_Command_PID="$(ps -eo pid,cmd | grep -F "$Sure_Command" | grep -v "grep" | awk '{ print $1 }')"

if [[ -s "$main_proc_id" ]] && [[ "$Sure_Command_PID" == "" ]] && yad --text="Are you sure you want to cancel the installation?" --button="gtk-yes:0" --button="gtk-no:1"; then
  if [[ -s "$main_proc_id" ]]; then
     BCKUPID="$(<$main_proc_id)"
     >"$main_proc_id"
     kill $BCKUPID 2>/dev/null
     sleep 1
  fi
   # The special yad variable $YAD_PID stores the main window PID
   # killing that PID closes the window
  [[ "$1" == "CLOSE" ]] && kill -s SIGUSR1 $YAD_PID
elif [[ ! -s "$main_proc_id" ]] ; then
  [[ "$1" == "CLOSE" ]] && kill -s SIGUSR1 $YAD_PID
fi

}
export -f get_pid_and_kill

exec 3<> $progress_pipe
exec 4<> $percentage_pipe
exec 5<> $form_pipe

yad --plug="$fakey" --tabnum=1 --form \
    --field="Choose a folder:DIR" \
    --field="Add a shortcut in the applications menu:CHK" \
    --field="Add a desktop shortcut:CHK" \
    --field="Install!system-software-install:fbtn" --cycle-read <&5 &

    # This is the initial cycle that sets the form field values
    echo "${HOME}" > $form_pipe         # set default folder in this line
    echo "TRUE" > $form_pipe               # default first checkbox value
    echo "FALSE" > $form_pipe              # default second checkbox value
    echo "$faextraxt &" > $form_pipe

yad --plug="$fakey" --tabnum=2 --window-icon="$ICON" --progress \
--enable-log="Show log" --log-height=100 --tail --borders=5 <&3 &


yad --paned --key="$fakey" --buttons-layout=edge \
    --button="gtk-close":'bash -c "get_pid_and_kill CLOSE" 2>/dev/null' \
    --button="Abort!gtk-stop":'bash -c "get_pid_and_kill" 2>/dev/null' \
    --text="" --title="TEST" --window-icon="$ICON" --center \
    --no-escape --undecorated & MAIN_PID=$!

# Redirecting kill output from get_pid_and_kill function to /dev/null
wait $MAIN_PID 2>/dev/null

exec 3>&-
exec 4>&-
exec 5>&-

User avatar
misko_2083
Posts: 114
Joined: Tue 08 Nov 2016, 13:42

#453 Post by misko_2083 »

by the way fred, discovered something by accident.

killing $YAD_PID in the beginning of funcion install_app, closes the first tab and the second tab goes to the top of the paned window. :shock:
The progress continues to run. :lol:

Code: Select all

.....

function install_app
{
# Check this out
kill $YAD_PID

# Form fields are read in a cycle 1-4, each cycle sets new values

# Disables all the form fields when the install starts
#echo "@disabled@" > "$form_pipe"
#echo "@disabled@" > "$form_pipe"
#echo "@disabled@" > "$form_pipe"
#echo "@disabled@" > "$form_pipe"

....

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#454 Post by fredx181 »

Always your scripts are very educational misko, thanks !
I'm still struggling to understand these pipes and paned thing, but I'll get there probably... some day :wink:

Fred

stemsee

#455 Post by stemsee »

fredx181 wrote:Always your scripts are very educational misko, thanks !
I'm still struggling to understand these pipes and paned thing, but I'll get there probably... some day :wink:

Fred
Ditto (echo) that sentiment!

I have many questions :?
stemsee

lika
Posts: 7
Joined: Tue 07 Aug 2018, 01:30

#456 Post by lika »

misko_2083 wrote:Added pv command to display the progress. One more dependancy to install but I see no other way for now.
Hello, misko_2083.

What about coproc, tail or stdbuf instead pv?

And:
- there are 2 times expanded "Sure_Command" in the script, maybe use "export?"
- attach the final dialog (window about successful installation) to main window? Is it possible?
- is there way to fix top border (thin line) of the progress plug? But "--fixed" option don't applied for a plug.
- and maybe make the button "Abort" inactive at the beginning and at the end of the installation?

Replace the line:

Code: Select all

pv -n 2>$percentage_pipe | tar xJfv archive.tar.xz -C "$1" 2>&1 >> $percentage_pipe & echo $! > "$main_proc_id"
and now no visual progressbar... :?

Yes, there is a "--pulsate" option, but it doesn't quite fit here.

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#457 Post by Argolance »

Bonsoir,
yad --text doesn't let to display text the way it is directly formatted in the script using \n for break lines but it is automatically wrapped! How could this behavior be bypassed?
Thank you for your attention.

Cordialement.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#458 Post by smokey01 »

Argolance wrote:Bonsoir,
yad --text doesn't let to display text the way it is directly formatted in the script using \n for break lines but it is automatically wrapped! How could this behavior be bypassed?
Thank you for your attention.

Cordialement.
It does here in Ver 0.36.3:

Code: Select all

yad --text "One\nTwo\nThree\nFour\nFive"
If this is what you mean.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#459 Post by MochiMoppel »

@Argolance: I assume that your question refers to your Xdialog example here.
Unlike Xdialog yad does not seem to autoexpand the window but breaks lines at word boundaries. A simple way to mimic Xdialog would be to replace ordinary spaces with non-breaking spaces. Would need more sophistication if your text contains tabs.

Code: Select all

MSG1="$(gettext 'YaPI (Yet another Puppy Installer) supports 3 alternative installation types and mounts your drives seeking every installable Pup iso:')" 
MSG2="$(gettext '(1) FRUGAL***** 
    The files vmlinuz, initrd.gz and pup_xxx.sfs (plus, as needed, sfs files starting with an a, f, y, or z) are copied to a chosen partition. 
    This partition will retain, undisturbed, all existing information currently held in the form of directories and files. 
    This can be any type of partition, for example: MSDOS, Windows (FAT, NTFS) or Linux (EXT2, EXT3, EXT4 or REISERFS). 
    THIS IS RECOMMENDED AS THE BEST OPTION for most users. IT IS ALSO THE SAFEST as with this method nothing is overwritten.')\n\n 
  $(gettext 'or, (2) SUPERFLOPPY (simple but destructive without care and needs a special process if wanting to return the drive to normal use) 
    Wnich takes over the entire storage device. It has neither MBR, master boot record, nor PARTITIONS and only a SINGLE file system. 
    It uses part of the storage device space for its frugal installation and the remaining space is used for data storage.')"

nbsp=$'\xc2\xa0'  
MSG1=${MSG1//' '/$nbsp}
MSG2=${MSG2//' '/$nbsp}

yad --text "$MSG1"\n\n"$MSG2"

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#460 Post by Argolance »

Bonjour,

@smokey01
Excuse me if my explanation wasn't clear. :oops:

@MochiMoppel
As there is a --wrap option, I thought that without this option, text would be non wrapped, that is to say, "normally" displayed as formatted using break lines \n or not formatted (without any \n), just new line every new sentence ("word boundaries"?), just like Xdialog or your example do (what I was looking for!).

Thank you both.

Cordialement.

Post Reply