-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
146 lines (116 loc) · 5.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
pycious(1)
==========
NAME
----
pycious - Simple and efficient widget library for the awesome window manager written in Python
DESCRIPTION
-----------
*pycious* is a widget library for the "awesome" window manager that allows
to write widget directly written in Python instead of using Lua language.
The main advantage of this is because with Python it is possible to write
complex widget using all the available bindings and packages already written
in Python. Furthermore, the api reference is simpler and more object oriented
than the corresponding api of awesome.
*pycious* gives also some already written widgets for monitoring system (cpu
usage, mem usage, ...), gathering web information (mail, rss, ...) and
applications (dictionary, volume, ...).
*pycious* widget types are a framework for creating your own awesome
widgets. In *pycious* is rewritten the awesome api reference to be used of
creating your widgets. It's also possible to use some function that gather
information and can be used to custom the widget as you want.
INSTALLATION & CONFIGURATION
----------------------------
In order to install *pycious* consider the following steps:
* Copy and rename the file 'rc-example.py' from the installation
directory of *pycious* to your '~/.config/pycious/rc.py'
* Put in '~/.xinitrc' the following:
-----------------------------
~/.config/pycious/rc.py &
-----------------------------
USAGE
-----
After correctly installing *pycious* you must edit 'rc.py' file
You must declare all the widgets you want in awesome directly in 'rc.lua'
before configuring them in 'rc.py'. Moreover, the widgets have to stay declared
in a wibox as whatever other widgets of awesome. For example, if we want to define a
widget for mail:
------------------------------------------------------------
mailwidget = widget({ type = "textbox", align = "right" })
-- In the creation of wibox
mywibox[s].widgets{
...
...
mailwidget
}
------------------------------------------------------------
After doing so, you just use it directly in 'rc.py' in two ways.
* The simplest way is by using the built-in widget of *pycious*.
You need to hook it with the corresponding object in 'rc.lua'
by passing in the argument the name of the widget in lua.
For example for mail widget:
------------------------------------------
from pycious.widgets.web import MailTextWidget
widget = MailTextWidget('mailwidget')
widget()
------------------------------------------
This create a callable object and every time you call it, it update the
number of unread mails.
* The second way is by using the awesome api reference of *pycious*
creating a TextWidget object:
------------------------------------------
from pycious.api.widget import TextWidget
widget = TextWidget('mailwidget')
------------------------------------------
In this case you need to implement the mail logic from scratch.
*pycious* gives for you some utility function for gather information
such as Mail to get the number of unread mail. In this way you can integrate
both graphcal and logic component to create custom widget as much fast as
possible:
--------------------------------------------------
from pycious.lib.web import Mail
mail = Mail(username, password, server, port)
mail() # return number unread mails
--------------------------------------------------
BUILT-IN WIDGETS
----------------
# TODO explain all the available built-in widgets
COPYRIGHT
---------
Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software
Foundation, Inc.
Permission is granted to make and distribute verbatim copies
of this document provided the copyright notice and this per‐
mission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions
of this document under the conditions for verbatim copying,
provided that the entire resulting derived work is distributed
under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of
this document into another language, under the above condi‐
tions for modified versions, except that this permission
notice may be stated in a translation approved by the Free
Software Foundation.
BUGS
----
Of course there is no bug in *pycious*. But there may be unexpected behaviors.
Go to 'https://github.com/fsquillace/pycious/issues' you can report directly
this unexpected behaviors.
SEE ALSO
--------
*vicious* - Modular widget library for the awesome window manager
AUTHORS
-------
Filippo Squillace <sqoox85@gmail.com>.
Giuseppe Leone <joebew42@gmail.com>
WWW
---
http://github.com/fsquillace/pycious
Last words
----------
[verse, Dante Alighieri, from Divine Comedy]
__________________________________________________
O somma sapïenza, quanta è l'arte
che mostri in cielo, in terra e nel mal mondo,
e quanto giusto tua virtù comparte!
(inferno, XIX, 10-12)
__________________________________________________