Commit Graph

299 Commits

Author SHA1 Message Date
enkore
df0982ad84 Fix & close #6
Paradigm: "I don't know what to do, so let's outsource it"
2013-03-06 18:02:46 +01:00
enkore
9732c02765 Add display for parcels not yet showing up in tracking. 2013-03-06 16:19:33 +01:00
enkore
78849d37ec parcel.DHL fix for delivered parcel 2013-03-06 15:32:48 +01:00
enkore
553ad4efb9 2013-03-06 13:14:28 +01:00
enkore
0cd3e266c3 Add parcel module (currently only suppotr for DHL)
Needs documentation, extension, some redesign/separation of concern,
and lxml
2013-03-06 00:02:49 +01:00
enkore
93bfab1d7b #5: Support for real config files 2013-03-05 23:07:50 +01:00
enkore
ae4eefdffa #5: Add setup.py 2013-03-05 17:47:35 +01:00
enkore
e0f938bcac README 2013-03-05 17:29:37 +01:00
enkore
8ebca17e79 Aaand some code butchering I forgot earlier. 2013-03-05 17:27:12 +01:00
enkore
dcc9f3c6bb #5: fix __main__.py.dist 2013-03-05 17:27:02 +01:00
enkore
ed7f95dd34 #5: Ability to scream out loud if battery is low :-) 2013-03-05 17:26:49 +01:00
enkore
6740f5b1cc #5: Add slim wrapper for notifications 2013-03-05 17:26:28 +01:00
enkore
03d96ad0ea Some internal code butchering again. 2013-03-05 17:26:10 +01:00
enkore
3cac448f6e Change process title of threads to something meaningful, if setproctitle is installed. 2013-03-02 20:05:41 +01:00
enkore
d6f1cbbd46 Fixed a bug where battery would generate no output in occasions where it should. 2013-03-02 17:35:19 +01:00
enkore
3c284ad29c Docstrings and such 2013-03-02 17:34:53 +01:00
enkore
3ebcbec4e1 i3pystatus.core.threads ; some smaller changes. 2013-03-02 17:34:32 +01:00
enkore
2bad329d13 Readme 2013-02-28 00:25:37 +01:00
enkore
901dd4319f New self-organizing/self-optimising threading model (no API changes)
Using a simple, hysteresis based approach… currently in this first
version the optimizer recursively moves modules out of a thread until a
certain timing target is reached; the "modules moved out" just mentioned
are then partitioned into new threads according to their latest time profile.

Very simple, but very effective.
Todo: Implement merging threads with (again) good behaving workloads.
2013-02-28 00:14:51 +01:00
enkore
604a4f8e29 disk module 2013-02-26 23:00:03 +01:00
enkore
09016f2816 Version 3 announcement 2013-02-26 01:42:47 +01:00
enkore
2aba299677 __main__.py.dist 2013-02-26 01:38:06 +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
b404b85cbb temp: add note about AMD support (=none) 2013-02-25 21:32:54 +01:00
enkore
3dc99ab5b2 runwatch module
It's exactly the same as i3status... I even copied the manpage!
2013-02-25 21:32:38 +01:00
enkore
197f1541b3 Fixed alsa not displaying volume changes correctly 2013-02-25 19:36:41 +01:00
enkore
446eda7218 alsa module, requires pyalsaaudio (from PyPI) 2013-02-25 18:36:17 +01:00
enkore
9ab3c751da "hardened" modsde 2013-02-24 23:34:32 +01:00
enkore
76d86807db As we can have multiple backends for mail already,
we don't need the multiple-servers functionality in imap.
Just add multiple instances of that backend.
2013-02-24 22:54:32 +01:00
enkore
582a35e412 . 2013-02-24 22:40:29 +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
fcd68e1ec1 battery 2013-02-24 18:44:00 +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
enkore
a06c4ef580 Moved backlight into submodule 2013-02-24 15:25:11 +01:00
enkore
2196c27ad4 This is probably a better way to handle file.File-based modules. 2013-02-24 15:16:07 +01:00
enkore
7d0193ccc1 Readme 2013-02-24 15:11:43 +01:00
enkore
cc7fe18869 Update README.md 2013-02-24 14:57:52 +01:00
enkore
7999cc453b Added file "template" for backlight info
This is 100pct. the same functionality as a complete module before :-)

But still,  have to come up with some better way to manage these "templates".
And a place to stash them.
2013-02-24 05:25:29 +01:00
enkore
20da1dbb08 Remove backlight module, add file module (kinda overpowered :-) 2013-02-24 05:20:35 +01:00
enkore
a5bcf9bfa2 backlight module
Probably I'll discard these as soon as I come up with a nice
generic way of reading multiple files, converting values etc.
2013-02-24 02:12:32 +01:00
enkore
bde56dfdec made battery module much more flexible
So I can have my old representation back... indeed you can
do pretty much anything now with it:

status.register(battery,
    format="{consumption:.2f}W {percentage:.2f}% [{percentage_design:.2f}%] {remaining_hm}"
)
2013-02-24 01:36:56 +01:00
enkore
ed003c123f temp module 2013-02-24 00:34:16 +01:00
enkore
a0fc9eb492 load module 2013-02-24 00:02:35 +01:00
enkore
c4db62d2a4 Some small changes 2013-02-23 23:50:50 +01:00
enkore
3677ffc852 Rewrote SettingsBase 2013-02-23 23:48:48 +01:00
enkore
4e06a9c2ee batterychecker → battery 2013-02-23 23:46:33 +01:00