Commit Graph

43 Commits

Author SHA1 Message Date
enkore
6989713d6c Require working DNS for internet connectivity
Relates to #102
2014-08-28 16:13: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
enkore
c43a22c46d Optimize imports 2013-10-31 22:33:18 +01:00
enkore
32e68eb14d Modulelist.get 2013-10-23 21:36:20 +02:00
enkore
8fe5c77acd ModuleList: Remove hard dependency on ClassFinder 2013-10-23 17:14:08 +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
a5dc101a19 Docstring for chain 2013-10-18 19:23:50 +02:00
enkore
26165647e3 Remove unused render_json 2013-10-18 19:23:41 +02:00
enkore
a983a744be remove some debugging stuff from formatp 2013-10-18 19:23:15 +02:00
enkore
130f103d07 TimeWrapper docs 2013-10-17 23:24:51 +02:00
enkore
eb661a0ebb More docs 2013-10-17 21:42:52 +02:00
enkore
35a0096974 Some docs 2013-10-17 19:18:35 +02:00
enkore
e788d83255 core.util: Add require and internet 2013-10-17 16:31:26 +02:00
enkore
78c01dd3e5 PEP8 2013-10-01 15:22:09 +02:00
enkore
7f57950478 core: remove render module 2013-10-01 13:04:47 +02:00
enkore
69b702d2f1 3.24: Introduce time wrapper, remove battery remaining_* formatter(!!!) 2013-08-04 23:40:19 +02:00
enkore
3394aa56ea Change relative to absolute imports (style) 2013-08-04 17:56:04 +02:00
enkore
ea1cbe9a0c 3.23: Fixed core.util.formatp (also added core.util.flatten for this fix) 2013-08-04 17:25:04 +02:00
enkore
d5d0b19330 Add core.util.formatp (this is going to be good) 2013-08-03 03:18:24 +02:00
enkore
c5413c4243 Module.move should return self 2013-03-23 22:02:46 +01:00
philipdexter
60c475d6e6 Add the option of specifying python-ish negative array indices to the move method 2013-03-15 21:34:45 -04:00
philipdexter
ecb6c54052 Add the ability to change the position of a module in the i3bar
Create a method `move' in modules.py to insert the module's json in a different position than the default 0.
2013-03-15 21:20:24 -04:00
enkore
b42cd6aa15 3.12: Move code around 2013-03-10 21:22:58 +01:00
enkore
657bdb826a Add preliminary(!) support for bidirectional communication with i3bar
Novelty use only.
2013-03-09 21:23:36 +01:00
enkore
c60d2fd3df Should definitely test KeyConstraintDict.
Seems to be all ok so far, just needed to add __delitem__
2013-03-08 16:59:59 +01:00
enkore
9084661a5d Rewrote core.util.partition, added tests for it. 2013-03-08 15:53:48 +01:00
enkore
237123ae0f Small changes in battery module 2013-03-08 15:53:28 +01:00
enkore
03d96ad0ea Some internal code butchering again. 2013-03-05 17:26:10 +01:00
enkore
604a4f8e29 disk module 2013-02-26 23:00:03 +01:00
enkore
9510f0b1c0 Added ability to automatically import modules
I thought: Well, isn't it a bit redundant if I go ahead and say in my
config "import this-n-that and temp and load and alsa" while later
just giving register() the modules.
So register() (/ClassFinder as the backend) now support just naming a
module as the first parameter. That module is then imported and
searched for a class as usual.

Just for reference the synopsis of Status.register():

register(mod.SomeChecker())
register(mod, setting1=..., setting2=...)
register(mod, {"setting1:":, "setting2":...})
register("mod", setting=1..., setting2=...)
register("mod", {"setting1:":, "setting2":...})

Fun fact: Actually register() doesn't care for it's arguments.
They're passed straight into ClassFinder.instanciate_class_from_module
(something I should definitely rename), which checks if it's first
parameter is one of:
-Python module
 => It calls ClassFinder.get_class with the same parameters
   => get_class will search the module using ClassFinder.search_module
      and return a matching class if and only if there is a single matching
      class in the module
-string
 => It calls ClassFinder.get_module to import the module and calls itself
  on the result
-something else
 => It returns that something

The actual variation in passing the settings (keyword arguments vs. dict)
is handled in SettingsBase.
2013-02-26 00:56:09 +01:00
enkore
a89b421ebb battery 2013-02-24 21:46:29 +01:00
enkore
a892a09581 Moving some code around. 2013-02-24 21:00:16 +01:00
enkore
1fd53cd60a Add ModuleList 2013-02-24 20:20:15 +01:00
enkore
92b2af56a8 Removed ModuleFinder, changed ClassFinder
ClassFinder:
Removed exclude argument, which is basically covered with
obj.__module__ == module.__name__ which ensures that no imported
classes are found, which was the only use case for exclude.
2013-02-24 20:16:33 +01:00
enkore
a2104f5d2f Removed support for indicating the position of a module 2013-02-24 20:13:57 +01:00
enkore
1b6498883b Divided __init__ into some submodules
This didn't change the public "API" used by modules.

.core.io contains the IO classes, namely IOHandler, StandaloneIO and JSONIO

.core.util contains SettingsBase and ClassFinder

.core.exceptions contains all custom exceptions
2013-02-24 18:43:00 +01:00