Skip to content

Commit

Permalink
setup.cfg setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rostislav-matveev committed Feb 10, 2022
1 parent e6557db commit 22c15cf
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 28 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
**/*tmp*
**/*~
**/#*#
install
examples/*
examples/
FvwmTest.py
FvwmTest.py
.pypirc
63 changes: 38 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ I love FVWM
- Simple interface for communicating with the window manager.
- Possibility of maintaining dynamically updated list of windows and
their properties.
- Possibility to iterate over windows satisfying given conditions.
- Possibility of dynamically change configuration
- Simple interface for accessing FVWM's variables and infostore
database.
Expand All @@ -37,7 +38,10 @@ class mymodule(fvwmpy):
def h_handler2(self,pack):
### respond to the pack
...
### Let's have lot's of debugging output
LOGGINGLEVEL = fvwmpy._logging.DEBUG
m = mymodule()
### Keep FVWM mute while we are setting things up
Expand Down Expand Up @@ -74,7 +78,13 @@ m.mask |= fvwmpy.M_SENDCONFIG | fvwmpy.M_CONFIGINFO
m.syncmask |= fvwmpy.M_SENDCONFIG
m.register_handler(fvwmpy.M_SENDCONFIG, m.h_unlock)
### If we want to have up to date list of windows
m.getwinlist()
m.register_handler(fvwmpy.M_FOR_WINLIST, m.h_updatewl)
m.mask |= fvwmpy.M_FOR_WINLIST
### Do some other module stuff
m.info(" Looks like FVWM manages now {} windows",len(m.winlist))
### If the module is persistent (listens to FVWM and executes handlers)
m.run()
Expand Down Expand Up @@ -218,17 +228,16 @@ Instances of `fvwmpy` have the following attributes and methods

- **`m.alias`**

String. Alias of the module. Initially it is equal to `m.me`. Alias
is then guessed from command line arguments of the module during
initialization. If the first acommandline rgument does not start
with '-', then it is assumed to be the alias of the module. Then
`m.alias` is set (which affects logging functions and pruning of
configuration lines) and this argument is not included in
`m.args`. If the first argument is a single '-', then it is also
removed from `m.args` and `m.alias` is set to be the same as
`m.me`.
`m.alias` can be changed afterwards. Such action will affect logging
functions and prunning of configuration lines.
String. Alias of the module. Alias is guessed from the command line
arguments of the module during initialization. If the first
commandline argument does not start with '-', then it is assumed to
be the alias of the module. Then `m.alias` is set (which affects
logging functions and pruning of configuration lines) and this
argument is not included in `m.args`. If the first argument is a
single '-', then it is also removed from `m.args` and `m.alias` will
be the same as `m.me`. `m.alias` can be changed afterwards. Such
action will affect logging functions and prunning of configuration
lines.

- **`m.mask`**

Expand Down Expand Up @@ -258,8 +267,8 @@ Instances of `fvwmpy` have the following attributes and methods

- **`m.syncmask`** and **`m.nograbmask`**

are similar to `m.mask` but contain values of syncmask and nograb
masks.
are similar to `m.mask` but contain values of syncmask and
nograbmask.

- **`m.winlist`**

Expand Down Expand Up @@ -306,22 +315,30 @@ Instances of `fvwmpy` have the following attributes and methods
argument is not included in `m.args`. If the first argument is a
single '-', then it is also removed from `m.args`.
- If the module is invoked by
```Module FvwmMyModule FvwmAkaModule arg1 arg2 ...```
then `m.alias == 'FvwmAkaModule' and `m.args == ['arg1', 'arg2', ...]`
```
Module FvwmMyModule FvwmAkaModule arg1 arg2 ...
```
then `m.alias == 'FvwmAkaModule'` and `m.args == ['arg1', 'arg2', ...]`

- If the module is invoked by
```Module FvwmMyModule - FvwmAkaModule arg1 arg2 ...```
then `m.alias == 'FvwmMyModule' and
```
Module FvwmMyModule - FvwmAkaModule arg1 arg2 ...
```
then `m.alias == 'FvwmMyModule'` and
`m.args == ['FvwmAkaModule', 'arg1', 'arg2', ...]`

- If the module is invoked by
```Module FvwmMyModule - FvwmAkaModule arg1 arg2 ...```
```
Module FvwmMyModule - FvwmAkaModule arg1 arg2 ...
```
then `m.alias == 'FvwmMyModule' and
`m.args == ['FvwmAkaModule', 'arg1', 'arg2', ...]`

- If the module is invoked by
```Module FvwmMyModule -geometry 200x200+24+0 ...```
then `m.alias == 'FvwmMyModule' and
```
Module FvwmMyModule -geometry 200x200+24+0 ...
```
then `m.alias == 'FvwmMyModule'` and
`m.args == ['-geometry', '200x200+24+0', ...]`

- **`m.handlers`**
Expand Down Expand Up @@ -595,10 +612,6 @@ and another one descrimed below.
winlist database is not up to date, since it delegates tha actual
filtering to the window manager.

**ToDo** implement winlist.filter(conditions) method to return
iterator going through windows matching conditions (like '*All
(conditions)*' command in FVWM's scripting language).

##### Attributes and methods of instances of `fvwmpy._window` class.

For more comprehensive information refer to [FVWM module
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
16 changes: 16 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/python3

from distutils.core import setup

setup(
name = 'fvwmpy',
packages = ['fvwmpy'],
version = '1.0.0',
description = 'Framework for developing FVWM modules in python',
author = 'Rostislav Matveev',
author_email = 'rostislav.matveev',
url = 'https://github.com/rostislav-matveev/FvwmPy'
download_url = 'https://github.com/rostislav-matveev/FvwmPy/releases/tag/v1.0.0',
keywords = ['fvwm', 'fvwm module'],
classifiers = [],
)

0 comments on commit 22c15cf

Please sign in to comment.