mirror of
https://github.com/gryf/wmdocklib.git
synced 2025-12-18 12:00:20 +01:00
added the ./setup.py script. added the */__init__.py files. modified the import instruction (import from pywmgeneral).
[WHAT]
Pywmgeneric is a dockapp with five entrys that display the first line of
output from an external program, the returned string from an python
method or an static string. Three mouse actions can be associated with
each displayed entry.
[DETAILED]
Five different entries can be defined in pywmgeneric. Every entry can
have an action, an update_delay and up to three mouse actions associated
with it. Some additional options are also available.
The associated action of an entry is executed with update_delay time
between executions. The output from the action is stored. If no special
display options are defined, the application will display the first line
of output from the action. If it does not fit in the window, it will
slowly scroll in the window. Clicking with the mouse on the text invokes
one of the mouse actions, depending on which button was pressed. The
action can be to execute an external program, to run a python method or
to update the text through performing the action associated with the
entry. The mouse actions can retreive the text genererated by the timed
action.
Python methods that should be executed as actions should be defined in
the class UserMethods. Look in pywmgeneric.py, near the top, for this
class and the documentation of how these methods should be defined.
Note that the methods allready there only are samples and will probably
not work on your system.
Other options in the configuration file include:
scroll = yes|no - en-/disable scrolling of the text when it doesn't fit
display = <text> - display a static string instead of the first line of
the action-generated output.
See the sample configuration file for examples and more information.
Note that this file is only for reference, it is the one I use. Things
will probably not work on your system if you do not change it.
[USES]
This program is very generic (hence the name ;) ), the uses are many
since it is highly configurable.
I use it for displaying my cpu and system temperatures. I just defined
methods for reading two files in the /proc filesystem on my system.
I also use it for fetching headlines from a newspaper, displaying the
first headline fetched. If I click with my left button, all headlines
will appear in an xmessage. If I rightclick the headlines along with
summaries are displayed, and if I click with my middle button mozilla
will fire up showing the newspaper's website.
I have an external program which displays what's currently on tv,
ideal for use with this program I thought! I modified it a bit so
it printed a summary line at the top, and voila I have all
currently running tv programs scrolling by in an dockapp. And clicking
on it shows me the details.
You could use it as an application launcher, just display the name of
the applications and associate mouse actions to lauch them. The
xterm-entry in the sample shows this.
You could probably come up with much more than this!
[CONTACT]
Mail bug reports, suggestions, comments, complaints or anything else, be it
funny or boring, related to this program to me, Mario Frasca
<mfrasca@interia.pl>.
The newest version can be found at http://pywmdockapps.sourceforge.net/.