Lukáš Mandák
3a33c8131b
StandaloneIO: Added documentation for new methods.
2015-06-22 13:00:41 +02:00
Lukáš Mandák
8cca39bb1a
StandaloneIO: Modules with above average intervals are refreshed in their own threads. This should prevent freezing of the bar caused by running all modules.
2015-06-22 12:27:58 +02:00
Lukáš Mandák
ba01a7af44
Click events: Modules output is udated and status line is refreshed after a valid click event callback is executed.
2015-06-22 11:43:52 +02:00
Lukáš Mandák
7dd99604be
StandaloneIO: Responds to SIGUSR1 signal by refreshing outputs of all modules.
2015-06-22 11:32:46 +02:00
Lukáš Mandák
c042be12ed
Module: on_click
now returns True if a valid click event callback was found and executed, False otherwise.
2015-06-22 11:07:23 +02:00
Lukáš Mandák
fff0444151
Module: Fixed and documented 'text_to_pango' method.
2015-06-22 11:04:51 +02:00
Lukáš Mandák
b501d22ad9
Moved hints
documentation to Configuration section.
...
Added a few basic examples.
2015-06-19 22:27:16 +02:00
Lukáš Mandák
d802c7d3de
Merge branch 'Master' into hints
...
# Conflicts:
# i3pystatus/core/modules.py
2015-06-18 21:05:54 +02:00
Lukáš Mandák
0267454557
Module: Add hyperlinks to hints docstring.
2015-06-18 20:39:28 +02:00
enkore
7df811b9a1
Add callbacks chapter
2015-06-17 18:11:40 +02:00
enkore
dee25535e7
Fix some warning from some glib-thing.
2015-06-17 14:07:43 +02:00
Lukáš Mandák
3d0142b74d
Module: Added docs for hints.
...
Module: All modules now set `"markup": "none"` by default to prevent from #181 .
Module: is now replacing ampersands with "&" if output is to be parsed by pango.
2015-06-12 17:38:34 +02:00
enkore
e9b7c6c439
Don't print exceptions to stderr, log them instead, always force output
2015-06-08 02:41:04 +02:00
enkore
3a6319c1b9
Change default log level to WARNING (30)
2015-06-08 02:40:48 +02:00
enkore
63c7cc6523
Fix minor bug with required inherited settings in subclasses redefining them
2015-06-08 02:32:39 +02:00
Lukáš Mandák
040b765b5d
Module: Replaced list comprehension for better code readability.
2015-06-06 18:17:38 +02:00
Lukáš Mandák
8d80b375a3
Module: Added hints
setting that allows the user to add additional i3bar protocol blocks to module's output.
2015-06-06 14:15:48 +02:00
enkore
41003ef702
Remove unnecessary metaclass from IntervalModule
2015-06-06 12:49:13 +02:00
enkore
60470e4d7f
Handle settings inheritance statically through a metaclass
2015-06-06 12:48:47 +02:00
enkore
e41d12079f
Fix missing documentation of inherited settings
2015-06-06 12:37:51 +02:00
enkore
317d96b176
docs
2015-06-06 00:48:45 +02:00
facetoe
5448e38d14
Use named tuple for return value
2015-05-20 21:51:26 +08:00
facetoe
2701a22db4
Add method to truncate long error messages.
2015-03-28 19:10:13 +08:00
facetoe
16b3799b91
Remove 'u' prefix from unicode strings as it is no longer required in Python3
2015-03-16 19:45:50 +08:00
facetoe
cb8f4225bd
Fixed bug that prevented user-defined keyring being used.
2015-02-16 21:09:59 +08:00
facetoe
c051e01959
Added documentation of keyring feature.
2015-02-14 10:40:58 +08:00
facetoe
61a8669eca
Removed POC NetrcBackend.
2015-02-14 10:07:30 +08:00
facetoe
7fa5c10787
Added keyring_backend to the settings tuple.
2015-02-13 19:53:08 +08:00
facetoe
887c45119b
Look for protected settings that are in the required tuple.
2015-02-01 09:15:26 +08:00
facetoe
f95066903e
Merge https://github.com/enkore/i3pystatus into credentials
2015-02-01 08:29:23 +08:00
Matus Telgarsky
c71fecdf36
util::make_graph pep8... (again, sorry)
2015-01-28 19:55:32 -05:00
Matus Telgarsky
ac2b494401
util::make_graph lower_limit parameter
...
None is now a choice for lower_limit and upper_limit as well, so that
the graph can scale as before.
For cpu_usage_graph and network, rather than exposing lower_limit
in the interface, 0.0 is used as a default, since it is already
used implicitly when choosing colors.
2015-01-28 19:48:16 -05:00
Matus Telgarsky
82db7a87a2
more braille styles (ideas from drawille)
...
added 'braille-peak' and 'braille-snake'. 'braille-peak'
renders only the top point, and 'braille-snake' fills some in.
I should have stressed earlier that I only got the braille drawing ideas
after coming across drawille ( https://github.com/asciimoo/drawille ).
2015-01-28 16:54:42 -05:00
Matus Telgarsky
117a2acfff
braille graphs: pep8 fixes
2015-01-27 15:34:05 -05:00
Matus Telgarsky
49d2f3bb0a
braille graph option
2015-01-27 15:10:26 -05:00
Matus Telgarsky
5865995d0f
simplify util::make_graph
...
rather than appending the upper limit, use it as the maximum.
In the process fixes a display bug when extent == 0,
and simplifies the addition of other drawing styles (which need
not also work around this values logic).
2015-01-27 13:42:57 -05:00
facetoe
b0d5fdba75
Added example custom keyring backend.
2015-01-25 20:26:29 +08:00
facetoe
215b85e431
Added prototype support for custom keyring backends.
2015-01-25 20:07:37 +08:00
facetoe
bec2674d38
Added prototype for protected settings.
2015-01-25 14:33:04 +08:00
facetoe
37c70634a8
Prevent webrowser.open() writing to stdout when opening link.
2015-01-20 08:22:31 +08:00
Matthieu Coudron
c5933a3b26
This commit adds a basic test to check callbacks work.
...
This can also serve as an exemple.
2014-12-21 13:31:40 +01:00
Matthieu Coudron
12546736a6
Fix in documentation
2014-12-20 15:46:34 +01:00
Matthieu Coudron
d31cc380ef
Follow up of https://github.com/enkore/i3pystatus/pull/149#issuecomment-67712619 .
...
This commit removes and replaces all the old methods 'on_*' by settings
with the same name. The old methods were renamed into more explicit names that can be used for the callbacks like "next_song","mute" etc...
For instance, you can test with:
status.register("clock",
format=[
("Format 0",'Europe/London'),
("%a %-d Format 1",'Europe/Dublin'),
"%a %-d %b %X format 2",
("%a %-d %b %X format 3", 'Europe/Paris'),
],
on_leftclick= ["urxvtc"] , # launch urxvtc on left click
on_rightclick= ["scroll_format", 2] , # update format by steps of 2
log_level=logging.DEBUG,
)
This way much code could be removed from other modules, though I did it only for the clock module here.
2014-12-20 15:30:41 +01:00
Matthieu Coudron
98e46ac3d6
Updated alsa & clock modules with new mechanism
2014-12-19 22:04:49 +01:00
Matthieu Coudron
14c0528be5
This commit introduces a skeleton that allows personalized callbacks in
...
a backwards compatible way. Settings 'on_lclick','on_rclick',
'on_scrollup','on_scrolldown' are inherited by all modules.
These parameters should be a string. Then when a matching action is
detected (ie mouseclick, scrolling), the module check if this string
corresponds to a:
1/ python callable
2/ module method,
In cases 1 and 2, it calls the python function with the module as the
first parameter. Otherwise it considers the string is an external command and launches it via run_through_shell
2014-12-19 18:52:15 +01:00
Matthieu Coudron
9e3f128a15
This commit improves the logging system: instead of setting a boolean to enable logging, the user sets a logging level (per module). By default only critical errors are logged (ie nothing for now).
...
Also adds a test for the function run_through_shell
2014-12-18 18:42:58 +01:00
Matthieu Coudron
69c1cd6460
Various pep8 and comments removal + converted shell module to use run_through_shell command
2014-12-18 00:26:24 +01:00
Matthieu Coudron
bc15eb4e6b
i3pystatus creates a logger that can be imported via import i3pystatus.logger . Thus when modules enable the 'enable_log' setting, it should log i3pystatus errors to a file called '.i3pystatus-<pid>'. This commit only solves the case when email_client was called in the email module and would output things into stderr/stdout.
2014-12-17 23:39:10 +01:00
Matthieu Coudron
cb25cb5fb3
Fix error generated by sphinx-build complaining of no end for the list
2014-12-17 18:18:08 +01:00
Matthieu Coudron
f440322b36
Settings will be inherited between modules
2014-12-17 00:48:49 +01:00
enkore
a2bb10443c
mimimi - 1.5.6 doesn't complain about that. interesting.
2014-10-14 17:40:16 +02:00
enkore
9e06145389
PEP 8 (I'm bored): core/util
2014-10-14 16:51:58 +02:00
enkore
b2b34ad81a
PEP 8 (I'm bored): core/modules
2014-10-14 16:50:40 +02:00
enkore
8db7b1d160
PEP 8 (I'm bored): core/io
2014-10-14 16:50:08 +02:00
facetoe
55810e1431
Added method to draw a vertical bar made of Unicode characters.
2014-10-12 12:10:03 +08:00
enkore
9fd557915c
Update util.py
2014-10-11 13:03:04 +02:00
facetoe
d14e7ddadc
Documented dependencies on the PyPI colour module.
2014-10-11 18:54:12 +08:00
facetoe
20363b9da0
Moved color code into it's own class that other classes can inherit
...
from.
2014-10-11 16:02:04 +08:00
facetoe
48821e34ca
Moved get_hex_color_range() from util.py to network_graph.py to prevent
...
breaking the build.
2014-10-11 14:52:08 +08:00
facetoe
3901aa43f1
Added method to generate a list of hex color values between a start
...
color and end color.
2014-10-11 13:17:02 +08:00
facetoe
a77b06a25e
Added method for printing a graph of Unicode characters.
2014-10-06 19:23:32 +08:00
Tom X. Tobin
c8b4dc0466
Fix internet() test function
...
The change in commit 6989713
broke the internet() test function by
trying to access the DNS port of "www.google.de", causing it to always
return False, which in turn broke all modules calling it. We instead use
the actual domain name of Google's DNS server at IP "8.8.8.8".
2014-09-14 17:15:50 -04:00
Matthieu Coudron
000bdc6978
i3 next branch send click events on mouse wheel up/down. This patch allows to change the alsa volume with the mousewheel when hovering the alsa indicator
2014-08-30 00:13:57 +02:00
enkore
6989713d6c
Require working DNS for internet connectivity
...
Relates to #102
2014-08-28 16:13:52 +02:00
enkore
eee14260f4
Alternative exception handling
...
Related #102 #100 and others
2014-08-28 16:11:53 +02:00
enkore
f50e6c1cf7
core Status docs
2014-08-15 14:24:11 +02:00
Arvedui
cee58e495c
prevents start of command_endpoint thread when click_events are disabled
2014-08-15 00:16:50 +02:00
Arvedui
de3db6fb19
added option for disabeling click events
2014-08-15 00:12:18 +02:00
enkore
6de38c933f
Confirmed #74 fixed, close #74
2014-08-04 18:21:16 +02:00
enkore
c0da4fce06
Possible fix for #74
2014-07-26 21:39:52 +02:00
Chris Wood
33aba4b084
Add user_open() function
2014-07-17 00:59:27 -04:00
eBrnd
a5b4ad0b1c
add bar drawing function, and modules for showing cpu and ram usage as a bar
2014-06-14 20:18:12 +02:00
Andrés Martano
29cdbf72b8
Allow round to INT
...
In round_dict, if places is None, round to INT.
2014-05-10 10:40:00 -03:00
enkore
f06a76ad52
PEP8
2014-04-30 14:51:41 +02:00
enkore
4109515914
Some documentation stuff
2014-04-23 14:45:29 +02:00
Łukasz Jędrzejewski
5fe6d049d2
Configurable interval for every IntervalModule
...
settings attribute for every class inheriting from IntervalModule are
automatically extended by interval setting if it does not exist.
A function to flatten settings in SettingsBase was extracted and added
as a static method.
2014-03-10 17:06:40 +01:00
enkore
c43a22c46d
Optimize imports
2013-10-31 22:33:18 +01:00
enkore
cdf9176258
Reformat
2013-10-30 10:46:04 +01:00
enkore
d9e3dec0c2
Catch ConfigError in register()
2013-10-30 10:41:08 +01:00
enkore
1295bf1ec5
exceptions: define format in ABC
2013-10-23 21:52:44 +02:00
enkore
32e68eb14d
Modulelist.get
2013-10-23 21:36:20 +02:00
enkore
467339e905
Remove __repr__ from Module
2013-10-23 21:36:12 +02:00
enkore
b89b8a8145
core.desktop: Refactor into class
...
TODO: find better way to handle Impl
2013-10-23 21:36:05 +02:00
enkore
c33cb3aa60
CommandEndpoint docs
2013-10-23 21:35:50 +02:00
enkore
135915ac96
Remove call_start_hooks and START_HOOKS #27
2013-10-23 21:08:49 +02:00
enkore
2895aa44cf
Refactor run_command_endpoint into class
2013-10-23 21:06:52 +02:00
enkore
266084801d
Delete Module.test() #27
2013-10-23 21:06:31 +02:00
enkore
6d9494acff
Delete config module #27
2013-10-23 21:06:14 +02:00
enkore
3d484694bd
Remove unneeded stuff
2013-10-23 17:16:04 +02:00
enkore
8fe5c77acd
ModuleList: Remove hard dependency on ClassFinder
2013-10-23 17:14:08 +02:00
enkore
2106585d4c
ClassFinder: fixed unexpected behaviour, add tests for this
2013-10-23 17:13:38 +02:00
enkore
4dd0d0b7c3
ClassFinder: fixed missing imports
2013-10-23 17:12:39 +02:00
enkore
5c0d994006
Remove import
2013-10-23 17:04:32 +02:00
enkore
a1c12a3620
id always returns int
2013-10-23 16:56:12 +02:00
enkore
ead0285ecc
Remove trivial & single-usage chain decorator
2013-10-23 16:55:10 +02:00
enkore
5eb271c684
Remove PrefixedKeyDict (unused)
2013-10-23 16:54:51 +02:00
enkore
1de1eaae87
Rename ModuleList.get_by_id to get_module_by_id
2013-10-23 16:54:30 +02:00
enkore
67faff6e0f
Handling ImportError in Status.register() ( #22 )
2013-10-23 09:50:14 +02:00
Jan Oliver Oelerich
55e070f36b
removed import of parse_json
...
caused an error.
2013-10-19 19:12:06 +02:00
enkore
a5dc101a19
Docstring for chain
2013-10-18 19:23:50 +02:00