Skip to content

Commit 49914ac

Browse files
committed
Var. "supercontext" created, minor bugfixes
1 parent 11d449e commit 49914ac

7 files changed

Lines changed: 327 additions & 24 deletions

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ transparently, based on the availability of the backends (frontends).
2222
* Console mode:
2323
* gum
2424
* dialog
25+
* none (= bash)
2526
* Graphical mode:
2627
* yad
2728
* gtkdialog
2829
* kdialog
2930
* zenity
30-
* xdialog
31+
* Xdialog
32+
33+
Since 14.0.0 version you can export "supercontext" env. variable (available values are:
34+
supercontext="terminal" or supercontext="windows" ) to set EasyBashGUI to use
35+
a terminal (xterm, gnome-terminal, etc. ) with "gum", "dialog" or "none" mode or
36+
graphical widgets ("yad", "gtkdialog", "kdialog", "zenity", "Xdialog" ).
3137

3238
![](docs/easybasguidialogs.jpeg)
3339

docs/README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,14 @@ The script that will implement the EBG is always structured in three main parts:
123123
#!/bin/bash
124124
# part 1 environment variables and endpoint
125125
export supermode="zenity"
126-
source /path/easybashgui
126+
export supertitle="Hola script v.0.0.1"
127+
export supericon="system"
128+
export supercontext="windows" #or supercontext="terminal" (see below)
129+
source /path/easybashgui #or simply: "source easybashgui" if you have installed it ! ;)
130+
#
127131
# part 2 .. code here
128132
message "hola"
133+
#
129134
# part 3 the finally sentences or output manipulation
130135
echo $?
131136
clean_temp
@@ -145,16 +150,16 @@ EBG implements different dialogs boxes! You don't have to worry about what
145150
environment you are running the script in, as **EasyBashGUI** will handle this
146151
transparently, based on the availability of the widget backends (frontends).
147152

148-
* Console mode:
153+
* Console mode (supercontext="terminal") :
149154
* gum
150155
* dialog
151156
* whiptail (not selectable, just fall back)
152-
* Graphical mode:
157+
* Graphical mode (supercontext="windows") :
153158
* yad
154159
* gtkdialog
155160
* kdialog
156161
* zenity
157-
* xdialog
162+
* Xdialog
158163

159164
If there is no dialog/cdialog support installed. Check next section about `supermode`!
160165

@@ -369,6 +374,7 @@ source easybashgui
369374

370375
input 1 "(write here IP address)"
371376
input 1 "Please, write IP address" "192.168.1.1"
377+
input 2 "Username" "root" "IP address" "192.168.0.1"
372378
input 3 "Username" "root" "IP address" "192.168.0.1" "Destination directory" "/tmp"
373379
IFS=$'\n' ; choices=( $(0< "${dir_tmp}/${file_tmp}" ) ) ; IFS=$' \t\n'
374380
user="${choices[0]}"
@@ -443,7 +449,7 @@ for (( index=0 ; index < ${#women[@]} ; index++ }))
443449
echo "PROGRESS"
444450
#
445451
done | progress "This is a _LOVE_ progress..." "${#women[@]}"
446-
# if you use "PROGRESS" string in STDIN do not forget second argument ( "[elements number]" )
452+
# if you use "PROGRESS" string in STDIN (echo "PROGRESS") do not forget progress() second argument ( "[elements number]" )
447453
```
448454

449455
#### A notification example
@@ -911,7 +917,7 @@ notify_message [-i "<icon>"] "[text]"
911917
#### notify_change
912918

913919
This function is used to change the desktop systray notification from a state (say "good" )
914-
to the other state (say: "bad" ) set previously by notify() function (see below );
920+
to the other state (say: "bad" ) set _previously by notify() _ function (see below );
915921
moreover, you can optionally change on-the-fly even the systray icon and its tooltip:
916922

917923
* ARGUMENTS:
@@ -943,7 +949,7 @@ Like "message" but now as desktop systray notification to display:
943949
* PID: echoes the PID of the current process
944950

945951
``` bash
946-
notify [-c "<command>"] [-i "<icongood|iconbad>"] [-t "<textgood|textbad>"] "[good|bad]" "<item1>" "<command1>" "[item2]" "[command2]" .. "[itemN]" "[commandN]"
952+
notify [-c "<command>"] [-i "<icongood|iconbad>"] [-t "<textgood|textbad>"] "<item1>" "<command1>" "[item2]" "[command2]" .. "[itemN]" "[commandN]"
947953
```
948954

949955
## Notes

0 commit comments

Comments
 (0)