All gsu modules are contained in a git repository. Get a copy with
- git clone git://git.tuebingen.mpg.de/gsu.git
+ git clone https://git.tuebingen.mpg.de/gsu.git
-There is also a [gitweb](http://git.tuebingen.mpg.de/gsu.git) page.
+There is also a [gitweb](https://git.tuebingen.mpg.de/gsu.git) page.
___Installation___
tree could look like this:
menu_tree='
- load_average
- processes
- hardware/
- cpu
- scsi
- storage/
- df
- mdstat
- log/
- syslog
- dmesg
+ load_average System load
+ processes Running processes of a user
+ hardware/ Hardware related information
+ cpu Show prozessor type and features
+ scsi Show SCSI devices
+ storage/ Filesystems and software raid
+ df List of mounted filesystems
+ mdstat Status of software raid arrays
+ log/ System and kernel logs
+ syslog System log
+ dmesg Kernel log
'
-In this tree, `hardware/`, `block_devices/` and `log/` are the only
-internal nodes. Note that these are written with a trailing slash
-character while the leaf nodes have no slash at the end. All entries
-of the menu tree must be indented by tab characters.
+Each line of the menu tree consists of an identifier, suffixed with an
+optional slash, and a description. The identifier becomes part of the
+name of a bash function and should only contain alphabetic characters
+and underscores. The description becomes the text shown as the menu
+item. Identifiers suffixed with a slash are regarded as internal nodes
+which represent submenus. In the above tree, `hardware/`, `storage/`
+and `log/` are internal nodes. All entries of the menu tree must be
+properly indented by tab characters.
___Action handlers___
}
The function name `lsi_df` is derived from the name of the script
-(`lsi`) and the name of the leaf node (`df`). The function simply
+(`lsi`) and the identifier of the leaf node (`df`). The function simply
passes the output of the `df(1)` command as the first argument to the
public gsu function `gsu_msgbox()` which runs dialog(1) to display
a message box that shows the given text.
___Example___
-The complete lsi script below can be used as a starting point
-for your own gsu gui application. If you cut and paste it, be
-sure to not turn tab characters into space characters.
+The complete lsi script below can be used as a starting point for your
+own gsu gui application. If you cut and paste it, be sure to not turn
+tab characters into space characters. The script must be named "lsi".
#!/bin/bash
menu_tree='
- load_average
- processes
- hardware/
- cpu
- scsi
- storage/
- df
- mdstat
- log/
- syslog
- dmesg
+ load_average System load
+ processes Running processes of a user
+ hardware/ Hardware related information
+ cpu Show prozessor type and features
+ scsi Show SCSI devices
+ storage/ Filesystems and software raid
+ df List of mounted filesystems
+ mdstat Status of software raid arrays
+ log/ System and kernel logs
+ syslog System log
+ dmesg Kernel log
'
lsi_load_average()
If an option is set both in the environment and in the config file,
the environment takes precedence.
+The `$gsu_config_file` variable can actually contain more than one
+filename, separated by spaces. The config files are processed in
+order, so that an option that is specified in the second config file
+overwrites the definition given in the first. This is useful for
+applications which implement a system-wide config file in addition
+to a per-user config file.
+
___Checking config options___
The gsu config module defines two public functions for this purpose:
----------
- [bash](http://www.gnu.org/software/bash/bash.html)
- [dialog](http://www.invisible-island.net/dialog/dialog.html)
-- [The author's home page](http://people.tuebingen.mpg.de/maan/)
+- [The author's home page](https://people.tuebingen.mpg.de/maan/)