C | Structure of config files |
|
|---|
All of the config files except the resource file are Tcl code. If you change something, do not touch anything else than the value of the variable. Even then you should be absolutely sure about what you are doing.
The format of Tcl variable setting is:
set _variable_ _value_
NOTE!
The startup directories that are defined in the resource file can be overruled by command-line arguments.
Syntax: X-Files [left_dir [right_dir]]
set bargs(_index_) {_button-attributes_}
set bcomm(_index_) [list _Action-parameters_ _command_ _args_]
bargs() defines the out-look of the Tcl/TK-button.
bcomm() defines parameters for the command, the command itself and arguments.
Indices go from left to right, bottom to up, like this:
| 24 | 25 | 26 | 27 | 28 | 29 | | | 30 | 31 | 32 | 33 | 34 | 35 |
| 12 | 13 | 14 | 15 | 16 | 17 | | | 18 | 19 | 20 | 21 | 22 | 23 |
| 0 | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 10 | 11 |
| Button attributes: | Normal parameters for TK-Buttons |
| Action parameters: | N = Normal (none) Q = Quiet (for suppressing errors) W = Output Window U = Update listboxes C = Confirm box |
| Commands: | Refer to Appendix A |
| Args: | Arguments for commands, refer to Appendix A |
set bargs(0) {-text XV}
* Button with label "XV"
set bcomm(0) [list N exec xv %f &]
* Executes xv, with selected files in "%f", in background (&)
set bargs(23) {-text ZipLs -borderwidth 3 -relief groove -bg "#dcdcdc"}
* Button with label "ZipLs", and outlook parameters.
set bcomm(23) [list W exec unzip -l %f]
* Executes unzip and shows the output in OutputWindow.
For more examples, look the REAL xfiles.buttons file...
set _extension+button_ [list _Action-parameters_ _command_ _args_]
| Action parameters: | N = Normal (none) Q = Quiet (for suppressing errors) W = Output Window U = Update listboxes C = Confirm box |
| Extension+Button: | Describes the extension and button combination. Extension can be anything you want (jpg, gif, zip, tar.gz ..) Button is either L or M (left or middle). |
| Commands: | Refer to Appendix A |
| Args: | Arguments for commands, refer to Appendix A |
set gifL [list N exec xv %f &]
set zipM [list C exec unzip %f -d %d &]
There is also one variable that has to be set:
set extlist [list _list_of_all_used_extensions+buttons_]
i.e. If you have defined gifL, jpgM and tclM then this looks like:
set extlist [list gifL jpgM tclM]
For more examples, look the REAL xfiles.extensions file..
set header(_button_._index_) [_header_]
set hcomm(_button_._index_) [list _Action-parameters_ _command_ _args_]
| Button: | Button is either L or M (left or middle). |
| Index: | Index starting from 0. |
| Header: | Set of numbers that represents decimal ASCII values in the beginning of the file.
It is also possible to convert string to decimal automatically using [String2Integer]-procedure. |
| Action parameters: | N = Normal (none) Q = Quiet (for suppressing errors) W = Output Window U = Update listboxes C = Confirm dialogbox |
| Commands: | Refer to Appendix A |
| Args: | Arguments for commands, refer to Appendix A |
set H(M) _last_index_+1 ; # Number of Headers (Middle button)
There is also two other variables that has to be set:
set H(L) _last_index_+1 ; # Number of Headers (Left button)
set header(L.0) [String2Integer GIF8]
set hcomm(L.0) [list N exec xv %f &]
set header(L.1) 25521625522401674707370
set hcomm(L.1) [list N exec xv %f &]
|
|