Revision history for Xdialog examples


Revision [31755]

Last edited on 2017-12-21 20:36:21 by wognath
Additions:
or {{color text='b=$(Xdialog --stdout .... )' c='green'}}
Deletions:


Revision [31746]

Edited on 2017-11-04 16:16:14 by wognath
Additions:
**{{color text='Xdialog --ok-label Maybe --cancel-label "Maybe not" --yesno "Choose" 0 0 ; a=$?' c='green'}}**


Revision [31745]

Edited on 2017-10-26 12:01:45 by wognath
Additions:
sets $b=typed text, or /path/file in case of drag & drop
**{{color text='b=$(Xdialog --password=2 --separator "|" --2inputsbox "Open encrypted file" 0 0 file "" password "" 2>&1)' c='green'}}**
$b=/path/myfile.bfe|p4ssw0rd
Deletions:
sets $b=text input (supports drag & drop)


Revision [31744]

Edited on 2017-10-19 14:21:28 by wognath
Additions:
{{color text='b=$(Xdialog .... 2>&1)' c='green'}}
**{{color text='count=0 ; L=$(wc -l </tmp/list)'c='green'}}**
sets $b=text input (supports drag & drop)
sets $b=latest choice on timeout or OK
might return $b=1 1 1 2 2 2 2 2 for example
Deletions:
{{color text='b=$(Xdialog .... 2>&1)' c='green'}}
**{{color text='count=0'c='green'}}**
sets $b=text input
sets $b=latest choice on timeout
might return $b=1 1 1 2 2 2 2 2 2 2 for example


Revision [31743]

Edited on 2017-10-18 17:51:09 by wognath
Additions:
**{{color text='let count++ 'c='green'}}**
**{{color text='bc<<<"100*$count/$L"'c='green'}}**
Deletions:
**{{color text='bc<<<"100*$count/$l"'c='green'}}**


Revision [31742]

Edited on 2017-10-18 17:45:46 by wognath
Additions:
**{{color text='count=0'c='green'}}**
**{{color text='bc<<<"100*$count/$l"'c='green'}}**
sets $b=tag2 for example
Deletions:
**{{color text='p=0 ; let inc=100/L'c='green'}}**
**{{color text='let p+=inc ; echo $p'c='green'}}**


Revision [31741]

Edited on 2017-10-18 16:44:26 by wognath
Additions:

Progress of a more complex task involving a list of L files. (thanks to gnashley [[https://www.linuxquestions.org/questions/programming-9/need-help-with-dialog-xdialog-gauge-option-271705/ here]])
**{{color text='p=0 ; let inc=100/L'c='green'}}**
**{{color text='{ while read file ; do'c='green'}}**
**{{color text='[do something with $file]'c='green'}}**
**{{color text='let p+=inc ; echo $p'c='green'}}**
**{{color text='done < /tmp/list } | Xdialog --gauge "Progress" 0 0'c='green'}}**
==radiolist==
Deletions:
==radiolist==


Revision [31725]

Edited on 2017-08-17 10:00:03 by darkcity [header]
Additions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]] > [[Xdialog]]
Deletions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]] > [[Xdialog]


Revision [31724]

Edited on 2017-08-17 09:59:51 by darkcity [header]
Additions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]] > [[Xdialog]
Deletions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]]


Revision [31720]

Edited on 2017-08-17 09:57:04 by darkcity [header]
Additions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]]
Deletions:
HomePage > Software Index > Development


Revision [31712]

Edited on 2017-07-31 21:46:19 by wognath [header]
Additions:
**{{color text='while true ; do sleep 1 ; echo -e "XXX\n`date`\nXXX" ; done | Xdialog --infobox "Initial text" 8 60 0' c='green'}}**
Initial text is overwritten. XXX = new text tag.
Deletions:
**{{color text='while true ; do echo -e "XXX\n`date`\nXXX" ; sleep 1 ; done | Xdialog --infobox "Initial text" 8 60 0' c='green'}}**
Initial text is immediately overwritten. XXX = new text tag.


Revision [31710]

Edited on 2017-07-12 21:27:42 by wognath [header]
Additions:
might return $b=1 1 1 2 2 2 2 2 2 2 for example
Deletions:
might return $b=1 1 1 2 2 3 2 1 2 2 2 2 1 for example


Revision [31709]

Edited on 2017-07-12 16:39:23 by wognath [header]
Additions:
with --wizard option, next button -> 0, previous button -> 3
Deletions:
next button -> 0, previous button -> 3 (--wizard option)


Revision [31708]

Edited on 2017-07-12 16:37:02 by wognath [header]
Additions:
next button -> 0, previous button -> 3 (--wizard option)
Deletions:
next button -> 0, previous button -> 3 (--wizard option), help button -> 2 (--help option)


Revision [31707]

Edited on 2017-07-12 16:32:00 by wognath [header]
Additions:
The series of 2 or 3 numbers after "text" is for sizing. Zeros-> autosize, which may not work well.
Deletions:
The series of 2 or 3 numbers after "text" is for sizing. Zeros-> autosize, which sometimes doesn't work well.


Revision [31706]

Edited on 2017-07-12 16:29:59 by wognath [header]
Additions:
yes or ok -> 0, no, cancel, ESC -> 1, timeout or window closed -> 255
next button -> 0, previous button -> 3 (--wizard option), help button -> 2 (--help option)
Deletions:
yes or ok -> 0, no or cancel -> 1, timeout -> 255


Revision [31705]

Edited on 2017-07-12 16:15:32 by wognath [header]
Additions:
The series of 2 or 3 numbers after "text" is for sizing. Zeros-> autosize, which sometimes doesn't work well.
**{{color text='b=$(Xdialog --radiolist "Sound" 0 0 0 ' c='green'}}tag1 "PC" off tag2 "HDMI" on tag3 "BT" off{{color text=' 2>&1)' c='green'}}**
**{{color text='b=$(Xdialog --timeout 4 --interval 4000 --radiolist "asldkjf" 12 20 3 ' c='green'}}1 "first choice" off 2 "second choice" on 3 "third choice" off{{color text=' 2>&1)' c='green'}}**
Deletions:
**{{color text='b=$(Xdialog --radiolist "Sound" 12 20 3 ' c='green'}}tag1 "PC" off tag2 "HDMI" on tag3 "BT" off{{color text=' 2>&1)' c='green'}}**
**{{color text='b=(Xdialog --timeout 4 --interval 4000 --radiolist "asldkjf" 12 20 3 ' c='green'}}1 "first choice" off 2 "second choice" on 3 "third choice" off{{color text=' 2>&1)' c='green'}}**


Revision [31704]

Edited on 2017-07-12 14:07:03 by wognath [header]
Additions:
[[http://web.mit.edu/outland/share/doc/Xdialog-2.1.2/index.html Xdialog is well documented ]], but examples are hard to find (except within Puppy scripts). Here are a few, which can be copied & pasted into a terminal to try out. Please add useful examples if you have them.
Deletions:
[[http://web.mit.edu/outland/share/doc/Xdialog-2.1.2/index.html Xdialog is well documented ]], but examples are hard to find (except within Puppy scripts). Here are a few, which can be copied & pasted into a terminal. Please add useful examples if you have them.


Revision [31703]

Edited on 2017-07-12 13:58:17 by wognath [header]
Additions:
**{{color text='Xdialog --timeout 2 --yesno "Choose" 0 0 ; a=$?' c='green'}}**
**{{color text='for i in {0..100..10} ; do echo $i ; sleep 1 ; done | Xdialog --gauge "Ten second countdown" 0 0' c='green'}}**
**{{color text='b=$(Xdialog --inputbox "application to run" 0 0 2>&1)' c='green'}}**
**{{color text='b=$(Xdialog --radiolist "Sound" 12 20 3 ' c='green'}}tag1 "PC" off tag2 "HDMI" on tag3 "BT" off{{color text=' 2>&1)' c='green'}}**
**{{color text='b=$(Xdialog --menubox "Choose wifi adapter to connect" 10 42 8 ' c='green'}}tag1 "card0" tag2 "card1" tag3 "wifi off" {{color text=' 2>&1)' c='green'}}**
**{{color text='b=$(Xdialog --checklist "$1" 12 32 12 ' c='green'}} tag1 "Save" on tag2 "Reboot" off tag3 "Shut down" on {{color text=' 2>&1)' c='green'}}**
**{{color text='Xdialog --infobox "important message" 0 0 2000' c='green'}}**
**{{color text='while true ; do echo -e "XXX\n`date`\nXXX" ; sleep 1 ; done | Xdialog --infobox "Initial text" 8 60 0' c='green'}}**
**{{color text='b=(Xdialog --timeout 4 --interval 4000 --radiolist "asldkjf" 12 20 3 ' c='green'}}1 "first choice" off 2 "second choice" on 3 "third choice" off{{color text=' 2>&1)' c='green'}}**
**{{color text='b=$(Xdialog --timeout 4 --interval 200 --menubox "text" 10 42 8' c='green'}} 1 "first choice" 2 "second choice" 3 "third choice"{{color text=' 2>&1)' c='green'}} **
Deletions:
{{color text='Xdialog --timeout 2 --yesno "Choose" 0 0 ; a=$?' c='green'}}
{{color text='for i in {0..100..10} ; do echo $i ; sleep 1 ; done | Xdialog --gauge "Ten second countdown" 0 0' c='green'}}
{{color text='b=$(Xdialog --inputbox "application to run" 0 0 2>&1)' c='green'}}
{{color text='b=$(Xdialog --radiolist "Sound" 12 20 3 ' c='green'}}tag1 "PC" off tag2 "HDMI" on tag3 "BT" off{{color text=' 2>&1)' c='green'}}
{{color text='b=$(Xdialog --menubox "Choose wifi adapter to connect" 10 42 8 ' c='green'}}tag1 "card0" tag2 "card1" tag3 "wifi off" {{color text=' 2>&1)' c='green'}}
{{color text='b=$(Xdialog --checklist "$1" 12 32 12 ' c='green'}} tag1 "Save" on tag2 "Reboot" off tag3 "Shut down" on {{color text=' 2>&1)' c='green'}}
{{color text='Xdialog --infobox "important message" 0 0 2000' c='green'}}
{{color text='while true ; do echo -e "XXX\n`date`\nXXX" ; sleep 1 ; done | Xdialog --infobox "Initial text" 8 60 0' c='green'}}
{{color text='b=(Xdialog --timeout 4 --interval 4000 --radiolist "asldkjf" 12 20 3 ' c='green'}}1 "first choice" off 2 "second choice" on 3 "third choice" off{{color text=' 2>&1)' c='green'}}
{{color text='b=$(Xdialog --timeout 4 --interval 200 --menubox "text" 10 42 8' c='green'}} 1 "first choice" 2 "second choice" 3 "third choice"{{color text=' 2>&1)' c='green'}}


Revision [31702]

Edited on 2017-07-12 13:52:41 by wognath [header]
Additions:
{{color text='b=$(Xdialog --inputbox "application to run" 0 0 2>&1)' c='green'}}
Deletions:
{{color text='b=$(Xdialog --inputbox "application to run" 2>&1)' c='green'}}


Revision [31701]

Edited on 2017-07-12 13:44:22 by wognath [header]
Additions:
(2000 is timeout in ms; 0 = no timeout)
Deletions:
(timeout 2000 ms)


Revision [31700]

Edited on 2017-07-12 13:25:20 by wognath [header]
Additions:
[[http://web.mit.edu/outland/share/doc/Xdialog-2.1.2/index.html Xdialog is well documented ]], but examples are hard to find (except within Puppy scripts). Here are a few, which can be copied & pasted into a terminal. Please add useful examples if you have them.
Deletions:
Xdialog is well documented, but examples are hard to find (except within Puppy scripts).
[[http://web.mit.edu/outland/share/doc/Xdialog-2.1.2/index.html Xdialog documentation]]


Revision [31699]

The oldest known version of this page was created on 2017-07-12 13:10:14 by wognath [header]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki