Commit Graph

464 Commits

Author SHA1 Message Date
enkore
708f2cb03f Is done automatically 2014-02-02 00:24:09 +01:00
Arvedui
d0885b4fbc added module cpu_usage 2014-02-01 21:13:56 +01:00
enkore
e682d974b7 mem: fix typo warn_percentage 2014-01-23 15:08:58 +01:00
Arvedui
d2529c6f31 fixed code/doc inconsistency with divisor in mem module 2014-01-23 13:42:57 +01:00
Arvedui
165049862b added 2 warning states, color support, support for user defined devisor, configurable rounding of byte values for mem module and fixed used memory calculation in mem module 2014-01-22 22:23:14 +01:00
enkore
5fc8ed3f8e ... 2014-01-16 23:13:16 +01:00
enkore
9273700ec1 Okay, that didn't work 2014-01-16 23:11:09 +01:00
enkore
723c644658 Merge branch 'master' of github.com:enkore/i3pystatus 2014-01-16 13:39:57 +01:00
enkore
aa09079903 Add detached_down option (#26)
And some other stuff I obviously forget to commit last time.
Oh, that's just the RST port... okay :)
2014-01-16 13:39:17 +01:00
Talwrii
d7e537fdf3 mbox -- mail backend to deal with mbox files as used by procmail, for example. 2014-01-01 21:40:30 +00:00
enkore
a4e6e540dc mem: Change used_mem semantics, so that it matches vm.percent and htop's memory usage report 2013-11-14 11:23:21 +01:00
enkore
c43a22c46d Optimize imports 2013-10-31 22:33:18 +01:00
enkore
6a749bb03a Add i3pystatus binary 2013-10-30 18:38:11 +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
a5b57601da Make i3pystatus a namespace package 2013-10-30 10:35:24 +01:00
enkore
44790dc357 Remove non-functional __main__.py.dist 2013-10-30 10:34:39 +01:00
enkore
98ba2e69da battery: Use alert_percentage for coloring the entry red 2013-10-24 15:36:51 +02:00
enkore
ff32f74bec battery: formatting 2013-10-24 15:36:34 +02:00
enkore
af0f9fc585 battery: rename a few variables 2013-10-24 15:36:29 +02:00
enkore
7a20cdb8de battery: use DesktopNotification 2013-10-24 15:36:15 +02: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
657cc87429 Delete main() #27 2013-10-23 21:06:04 +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
769216392f pulseaudio: change context name to something meaningful 2013-10-23 16:55:22 +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
enkore
6a3090ba8a Releasing 3.27
* Add weather module (with most bugs fixed I hope)
* Add text module (in preparation for #22)
* PulseAudio module: Add muted/unmuted options
2013-10-20 18:42:54 +02:00
enkore
751f0bbb14 pulseaudio: add muted/unmuted options 2013-10-20 18:37:38 +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
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
2ba350d71e parcel: add require(internet) 2013-10-17 19:55:59 +02:00
enkore
35a0096974 Some docs 2013-10-17 19:18:35 +02:00
enkore
cef22ea7bb weather: Should resolve #23 2013-10-17 16:31:45 +02:00
enkore
e788d83255 core.util: Add require and internet 2013-10-17 16:31:26 +02:00
enkore
27d3d67a86 Add text module 2013-10-14 19:15:10 +02:00
enkore
5a5ea0e0c5 Fix bug reported by janoliver in #21 2013-10-14 19:09:39 +02:00
enkore
0d93f165b3 Sphinx warning 2013-10-14 18:51:52 +02:00
enkore
3381959e6b Sphinx 2013-10-14 17:55:41 +02:00
enkore
537d662691 Fix required settings for weather 2013-10-14 17:24:56 +02:00
enkore
35bc1a626e Merge branch 'master' of https://github.com/yemu/i3pystatus 2013-10-14 17:23:39 +02:00
Cezary Biele
b3ae571389 weather fixes 2013-10-14 12:11:31 +02:00
Cezary Biele
dc85b64631 added humidity to weather module 2013-10-14 11:54:25 +02:00
Cezary Biele
2b3bcd4604 added weather module 2013-10-14 11:26:06 +02:00
enkore
3011e1d52e clock: this warning is obsolete 2013-10-09 09:58:58 +02:00
enkore
cdbb2f3e36 While we're at it, some other PEP8 stuff.
[obama] Except too long lines, because big screens.
2013-10-09 09:58:38 +02:00
enkore
d63896d465 Avoid non-ASCII chars 2013-10-09 09:15:24 +02:00
enkore
9feb1b7281 Partial merge of #19 2013-10-07 11:52:30 +02:00
enkore
305de3225f README 2013-10-03 00:58:21 +02:00
enkore
7f8ae4fedf mem: correct divider to megabyte (was kilobyte), don't divide percentage #16 2013-10-03 00:56:33 +02:00
enkore
9c924f77e9 mem: docstring list, pep8 #16 2013-10-03 00:52:56 +02:00
Cezary Biele
b8c7f0515e small change to mem.py 2013-10-02 23:15:59 +02:00
Cezary Biele
a63cfa20e1 changed mem.py to use psutil 2013-10-02 23:14:13 +02:00
Cezary Biele
6b89096451 added mem.py 2013-10-02 13:49:01 +02:00
enkore
78c01dd3e5 PEP8 2013-10-01 15:22:09 +02:00
enkore
21cd318c29 mail imap: fix mailbox selection 2013-10-01 13:36:59 +02:00
enkore
87c583db87 update readme 2013-10-01 13:31:40 +02:00
enkore
72f1c04c57 (PyCharm) 2013-10-01 13:10:48 +02:00
enkore
42e6258c1a mail: clarify usage 2013-10-01 13:05:18 +02:00
enkore
5184958179 core: remove unreachable code 2013-10-01 13:05:03 +02:00
enkore
ef4db339de core: add threading module 2013-10-01 13:04:54 +02:00
enkore
7f57950478 core: remove render module 2013-10-01 13:04:47 +02:00
enkore
a3d86e7a44 core: remove threading package 2013-10-01 13:04:00 +02:00
enkore
5056f22404 mail.IMAP: add mailbox parameter 2013-09-30 22:02:00 +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
3d796ce48e 3.22: pulseaudio fix -inf/db 2013-08-03 15:05:13 +02:00
enkore
ac2ed844ac Add 'Formatting' chapter to README 2013-08-03 14:40:57 +02:00
enkore
b179a55d28 pulse: db as int, add docs 2013-08-03 14:39:33 +02:00
enkore
c841736eac MPD: use formatp, remove now completly useless format_sparse 2013-08-03 14:39:27 +02:00
enkore
353c874447 pulseaudio: remove unused stuff 2013-08-03 14:24:59 +02:00
enkore
c3441da72e core.desktop: make dependency python-gobject optional 2013-08-03 14:24:37 +02:00
enkore
f39e4b3684 pulseaudio: remove dependency, add dB volume
I added a minimal version of the bindings directly.

{db} is the volume in decibels relative to 100 % output, i.e.
0 db equal 100 %.
2013-08-03 13:36:44 +02:00
enkore
d5d0b19330 Add core.util.formatp (this is going to be good) 2013-08-03 03:18:24 +02:00
enkore
e848fc4a6f Improve documentation 2013-07-31 21:39:59 +02:00
enkore
5304629cf1 3.20: Extend MPD module
-Removed playtime_* formatters (pretty much useless)
-Add bitrate formatter
-Add volume formatter
-Add song_elapsed formatter
-Add song_length formatter
-Add format_sparse option (intended for streams/internet radio or untagged media)
2013-07-31 21:07:45 +02:00
enkore
42ab76dd3a Invocation changed
-t/--test run test
-c/--config specify config file
2013-07-31 01:31:13 +02:00
enkore
c86ab5e3ab Merge branch 'master' of github.com:enkore/i3pystatus 2013-07-31 00:20:00 +02:00
enkore
70fbbe3944 Fix for mpd if playlist is consumed 2013-07-31 00:19:32 +02:00
enkore
bcf73b8b31 Update __main__.py.dist 2013-07-30 22:51:49 +02:00
enkore
7b2e07ac6a pulseaudio +docs 2013-07-29 21:27:52 +02:00
enkore
4164b11eba 3.18: Add pulseaudio module (drop-in for alsa) 2013-07-29 20:15:17 +02:00
enkore
11506f60f8 3.17: MPD: host parameter 2013-07-18 22:59:06 +02:00
enkore
5ee67aaefd 3.16: MPD: stop state bugfix, mute/unmute on rightclick
Yes, I currently just increase the minor version number on every fix
2013-07-18 22:36:52 +02:00
enkore
eb44638b87 3.15: mpd, add status and leftclick for play/pause 2013-07-09 22:31:30 +02:00
enkore
c5153ae12a 3.14: Battery: add status setting
I use it like this to save a few characters
status={
        "DIS": "↓",
        "CHR": "↑",
        "FULL": "=",
}
2013-07-05 19:58:53 +02:00
enkore
35b9ed6468 Forgot the actual MPD module 2013-07-01 20:45:25 +02:00
enkore
2425216965 Merge branch 'master' of github.com:enkore/i3pystatus 2013-07-01 20:41:27 +02:00
enkore
dccbc63826 3.13: MPD module, ALSA fix 2013-07-01 20:41:03 +02:00
Zack Gold
33e7f6559b Update network.py
interface was spelled wrong
2013-06-03 18:36:06 -06:00
enkore
5371ab4276 Add pyload module 2013-04-11 20:11:18 +02:00
enkore
d3c310e885 Fixed a bug where the battery alert would be displayed while charging 2013-04-09 16:29:37 +02:00
enkore
3c954f279b Fix parcel.UPS percentage output 2013-04-05 15:15:44 +02:00
enkore
47cd088c1c parcel: add UPS support 2013-04-04 22:23:30 +02:00
enkore
d2f6dd97a5 3.12: Fixed test command 2013-03-23 22:05:46 +01:00
enkore
c5413c4243 Module.move should return self 2013-03-23 22:02:46 +01:00
enkore
1acfe0052e Change default iface of wireless module to wlan0 2013-03-22 14:16:47 +01:00
enkore
39095594c8 README 2013-03-22 14:10:44 +01:00
enkore
9dc1ecb9d1 README 2013-03-22 14:08:10 +01:00
enkore
91b7e74ccf README 2013-03-22 14:06:53 +01:00
enkore
c41c2736bf Adjust to newest i3bar patch 2013-03-21 12:35:28 +01:00
enkore
8dd88a6180 README 2013-03-21 12:35:06 +01:00
enkore
b577cd715b modsde 2013-03-16 12:58:17 +01:00
enkore
1171a1d0ae Change Module.test API to something more intuitive
(I mean, what the hell has crossed my mind to name a method *test*
and let it return FALSE if successful? :D)
2013-03-16 12:58:01 +01:00
enkore
0e90cbfceb Merge branch 'master' of github.com:enkore/i3pystatus 2013-03-16 12:40:21 +01:00
enkore
a6810840ae Fix core.threading.wrapper 2013-03-16 12:40:09 +01:00
enkore
b662d8797e Add Module.test 2013-03-16 12:39:17 +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
philipdexter
0ff17f4242 added some debug statements for imap connection 2013-03-12 12:17:03 -04:00
philipdexter
68e9300870 changed default port in imap to 993 2013-03-12 11:52:18 -04:00
enkore
59437c1707 ClassFinder can also instanciate classes now. 2013-03-11 17:08:38 +01:00
enkore
c340b2cf75 Changed Config.test 2013-03-11 00:28:24 +01:00
enkore
a5b274fd23 PEP 8 and stuff 2013-03-11 00:21:54 +01:00
enkore
c259a653ae Refactor the config part 2013-03-11 00:21:27 +01:00
enkore
0a32494ce8 3.12: More bullet-proof wrapper 2013-03-10 21:38:02 +01:00
enkore
b42cd6aa15 3.12: Move code around 2013-03-10 21:22:58 +01:00
enkore
19aca9149a 3.12: remove I3statushandler 2013-03-10 20:57:12 +01:00
enkore
8abc7dd8e8 3.11: runwatch 2013-03-10 18:24:42 +01:00
enkore
7dfac95f1e 3.11: Add test command, invoke like this: i3pystatus test 2013-03-10 18:24:33 +01:00
enkore
c8c8e2226f Improved UX a bit: all threads are immediately started;
no more slow starting of modules.

Although I'm highly unsatisfied with the current implementation
(SoC, you hear me!?)
2013-03-10 02:11:58 +01:00
enkore
375ba3af7b Support for the 3rd version of the i3bar-onclick-patch 2013-03-10 01:27:23 +01:00
enkore
657bdb826a Add preliminary(!) support for bidirectional communication with i3bar
Novelty use only.
2013-03-09 21:23:36 +01:00
enkore
2e9b80c0a0 Oops! Forgot to check in the actual code for wireless module
(3.8.2)
2013-03-08 20:37:40 +01:00
enkore
085f5972af battery.interval 2013-03-08 20:34:39 +01:00
enkore
1680293e56 3.8: Add wireless module based on basiciw 2013-03-08 19:51:55 +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
074500007f 3.7 2013-03-08 03:30:24 +01:00
enkore
01f1587e67 ... 2013-03-08 03:11:49 +01:00
enkore
e8191da312 Reworked battery module, should work better now. Or worse. Let's find out... 2013-03-08 02:53:54 +01:00
enkore
8ef891cef6 Fix battery module status bug 2013-03-07 22:39:36 +01:00
enkore
4d42589213 Small fix (3.5)
Version numbering policy:
Increment the most righthand number every single time the package
is uploaded to PyPI.
2013-03-07 18:49:57 +01:00
enkore
4cd1b177de README 2013-03-07 18:45:31 +01:00
enkore
a2dd90c657 CIDR support for network module 2013-03-07 18:40:18 +01:00
enkore
890e8a91bc Add network module (3.4), close #4 2013-03-07 18:09:05 +01:00
enkore
6b03e35ad2 #7 fix default formatter 2013-03-06 23:16:28 +01:00
enkore
a76779fe7b Should fix #7 (v3.3) 2013-03-06 23:03:40 +01:00
enkore
7a0bb1cbaa Fix issue with gobject&gobject2
summary: just don't ever use gobject and gobject2 at the same time...
2013-03-06 22:32:07 +01:00
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
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
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
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
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
enkore
8fba0b69a3 Fixed thunderbird
(deeeeeep recursion)
2013-02-23 23:00:28 +01:00
enkore
9e6af3661a Mail 2013-02-23 23:00:14 +01:00
enkore
3f46ab24c6 flying-sheep via GS 2013-02-23 21:05:27 +01:00
enkore
c96410e92d Automagic name attribute in JSON output
If name is not set by the module, it's set automatically to the
fully qualified python dotted path to the module :-)
2013-02-23 20:52:07 +01:00
enkore
13c684860d Actualize clock once per second 2013-02-23 20:43:38 +01:00
enkore
dd7b5ef346 i3bar has some issues with locale-handling I guess.
It reliably crashes i3pystatus, but only if started by i3bar. Meh.
I can't tell if this locale issue is local (ha-ha) or everyone is affected.
2013-02-23 20:41:42 +01:00
enkore
ebe3d718e3 Reworked exceptions 2013-02-23 20:15:20 +01:00
enkore
70155b2f18 Fixed clock (my bad) 2013-02-23 19:05:57 +01:00
enkore
f6e5530468 ~rough refactoring 2013-02-23 18:59:48 +01:00
enkore
163662a633 README 2013-02-23 18:45:05 +01:00
enkore
60be03126d Docstrings 2013-02-23 18:41:53 +01:00
enkore
9dc7041997 First draft of a doc generator for this
(Already supports multiple Modules per python module)
2013-02-23 18:41:33 +01:00
enkore
d31fe9a62d Moving code around a bit 2013-02-23 18:40:59 +01:00
enkore
1cdc722f46 SettingsBase 2013-02-23 17:40:35 +01:00
enkore
040341021c modsde uses .format now 2013-02-23 17:40:23 +01:00
enkore
9d5c516d68 Renamed IMAP mail checker to … imap 2013-02-23 15:19:25 +01:00
enkore
eb1ce22610 IMAP mailchecker 2013-02-23 15:19:11 +01:00
enkore
761034dd01 Thunderbird 2013-02-23 15:18:56 +01:00
enkore
93b7ba9af9 Ported notmuchmail (needs testing) 2013-02-23 15:16:53 +01:00
enkore
7fceb73ff3 Mail checkers
Mail checkers are not separate modules anymore; there is only one
mail checker module (called mail) that can make use of various backends
, which were formerly modules on their own.

This greatly simplifies code and reduces redundance.

This commit only contains the base classes for this.
2013-02-23 15:16:23 +01:00
enkore
7c8fcb8758 Refactored the "find appropiate class" part a bit 2013-02-23 15:03:21 +01:00
enkore
efb2b31ee8 StandaloneIO 2013-02-23 14:09:23 +01:00
enkore
26cc3ff27a . 2013-02-23 14:06:55 +01:00
enkore
a1b84b74d2 Fixed issue with standalone usage 2013-02-23 13:54:35 +01:00
enkore
a354a8288e Configuration shortcut
You can now pass a module (the Python thing, e.g. modsde) into register
and it will just "do the right thing" (find a class derived from Module
in that module and instanciate it with any extra arguments)
2013-02-23 13:53:54 +01:00
enkore
612faaaa4e Adopted modules to new settings system
Btw. nothing has changed for the config files. You can pass into
__init__ a dict as before, or you can use keyword arguments.

Either way, a module defines the settings that can be specified
and those which are required. __init__ basically checks that all
required options are set and that no invalid options are used.
2013-02-23 00:12:45 +01:00
enkore
c967cdecb2 Settings system. Now is probably the right moment to tell if you don't like it :) 2013-02-23 00:11:02 +01:00
enkore
bf3b77ddbd Code cleanup 2013-02-22 23:21:53 +01:00
enkore
5474980b11 Support for standalone operation
Specify standalone=True to the I3statushandler constructor
to run i3pystatus without i3status in the background.
i3pystatus won't read input from stdin or any other
file object specified with input_stream.

The keyword argument interval specifies how often output should
be generated. The default is 1 (second).


Sorry guys for changing the way i3pystatus "way of operation"
is set so often. If you're want the "self-contained" mode
(you execute i3pystatus, i3pystatus automatically starts
i3status), don't set the file attribute, but pass the file
descriptor of the pipe as input_stream like this:

process = subprocess.Popen(["i3status", "-c", "~/.i3/status"], stdout=subprocess.PIPE, universal_newlines=True)
status = i3pystatus(input_stream=process.stdout)

On a side note:
The main class name has been changed to i3pystatus, but I3statusHandler
is still available as an alias. Use whichever you prefer :-)
(Linux is about choice after all)
2013-02-22 21:23:58 +01:00
enkore
4c5dfbe429 Using uevent instead of the separate files reduces I/O...
...and makes the code a bit cleaner.

Didn't touch much of the class logic, except that it just
displays the charge if the state is "Unknown".
2013-02-22 21:04:33 +01:00
enkore
62b59db8d6 Fixed issue #9
Notmuch checker does not work in this state
NotmuchMailChecker does not work because of a conflict between the notmuch Python API and the file for NotmuchMailChecker which is also named notmuch.

I suggest to rename i3pystatus/notmuch.py to i3pystatus/notmuchchecker.py and modify main.py.dist appropriately.

Reported by mjepronk

Also removed some superfluous whitespace
2013-02-22 18:16:39 +01:00
enkore
8a1041ac0e Merge branch 'master' of https://github.com/janoliver/i3pystatus 2013-02-22 18:14:05 +01:00
Matthias Pronk
400d639e31 register_module has been renamed to register 2013-02-22 14:15:14 +01:00
Matthias Pronk
0adbc0ad28 remove unused import 2013-02-22 14:11:05 +01:00
Matthias Pronk
fdadd3f143 clock added 2013-02-22 13:59:28 +01:00
Matthias Pronk
c72363092d battery checker added 2013-02-22 13:56:37 +01:00
enkore
4966f90775 .dist 2013-02-21 16:08:52 +01:00
enkore
99b1e003cb Fixed crash if used with normal pipe
If one wants to run i3status as a subprocess of
i3pystatus, do it like this:

import subprocess
import io
...
process = subprocess.Popen(["i3status", "-c", "~/.i3/status"], stdout=subprocess.PIPE)
stdin = io.TextIOWrapper(process.stdout)
status = I3statusHandler(stdin)
2013-02-21 14:05:11 +01:00
enkore
426f57d97d Regex module. Batteries... eh.. example included.
*gotta get some sleep. maybe.
2013-02-21 04:56:34 +01:00
enkore
d3228cc8be Reworked that (again) 2013-02-19 01:59:59 +01:00
enkore
d4f1c77c85 Once in a while I even delete code. I like it. 2013-02-19 01:59:43 +01:00
enkore
e3829b5700 We were finally successful in moving the input loop
to the lower I/O layer.
This means we unified the loop with it's implicit abort
condition (end of stream or ^C).
2013-02-18 19:15:27 +01:00
enkore
6ff3e8ebf3 One may want to change the ordering
("injecting" items in the middle of i3status output, for example)
2013-02-18 18:06:08 +01:00
enkore
143d7d1a40 Turns out, i3bar doesn't care for "None". One conditional less <3 2013-02-18 18:03:54 +01:00