Commit graph

526 commits

Author SHA1 Message Date
Tobi-wan Kenobi
8724af2906 [tests/battery] Add tests for battery module 2017-03-05 09:35:56 +01:00
Tobi-wan Kenobi
728cb73189 [test_i3bar-output] Added i3bar output test modules 2017-03-05 09:34:47 +01:00
Tobi-wan Kenobi
70f138b97b [tests/i3bar-input] Add input tests for i3bar protocol
Also, replaced the MockModule with a generic mock object.
2017-03-05 08:35:15 +01:00
Tobi-wan Kenobi
cdbddcfff7 [tests/i3bar-input] Add tests for i3bar input processing 2017-03-05 07:56:10 +01:00
Tobi-wan Kenobi
ce2bc58919 [coveragerc] excludelines somehow broke the build for Python 2.7 2017-03-04 18:54:42 +01:00
Tobi-wan Kenobi
90dd636b43 [tests/engine] Add test for module aliasing 2017-03-04 18:53:31 +01:00
Tobi-wan Kenobi
6a14681a65 [tests/theme] Add tests for theme.py 2017-03-04 14:17:27 +01:00
Tobi-wan Kenobi
64523119af [tests] Added engine and module tests
Added those two unit tests together, as they are tightly linked together
anyhow.
2017-03-04 13:44:51 +01:00
Tobi-wan Kenobi
f65ab6bcae [tests/config] Add unit tests for config.py 2017-03-04 12:11:43 +01:00
Tobi-wan Kenobi
f0013c7581 [tests/util] Add test for execute with wait=False 2017-03-04 11:35:46 +01:00
Tobi-wan Kenobi
7be8df222d [runtests] Clean up coverage report + add it to runtests.sh
runtests.sh now also reports coverage.
2017-03-04 11:35:25 +01:00
Tobi-wan Kenobi
6dbe440cb5 [tests] Purge tests and start with a clean implementation of subprocess
Seems like subprocess and friends (Popen, communicate) are not so easy
to mock cleanly. Therefore, start from scratch and carefully write test
by test, until (at least) the old test coverage has been restored.
2017-03-04 11:25:52 +01:00
Tobi-wan Kenobi
1c6122fc3f [screenshots] Add screenshot for kernel module 2017-03-03 19:19:44 +01:00
Tobi-wan Kenobi
fe5bbd4b46 [modules/kernel] Use Python standard module "platform"
Instead of executing an external call to "uname", use the standard
Python module "platform" to retrieve information about the kernel used.

Positive side-effect: This is portable, if i3 ever exists on Windows :P
2017-03-03 19:18:25 +01:00
Tobi-wan Kenobi
955f123b88 [modules/kernel] Add documentation and vim hints 2017-03-03 19:13:30 +01:00
tobi-wan-kenobi
64386098b6 Merge pull request #47 from pierre87/newkernelmodule
new module that displays current kernel version
2017-03-03 19:11:56 +01:00
Pierre
bc514265d4 new module that displays current kernel
it uses the output of 'uname -r' prefixed with the linux font-awesome icon
2017-03-03 16:01:59 +01:00
Tobi-wan Kenobi
ec19f48853 [modules/weather] Remove remaining timer references
Remove obsolete _timer references.
2017-02-26 15:30:07 +01:00
tobi-wan-kenobi
17abe74115 Merge pull request #46 from paxy97/master
[modules/weather] Add API key parameter documentation and round temerature
2017-02-26 15:29:32 +01:00
Pavle Portic
44aa1bc564 [modules/weather] Add API key parameter documentation and round temperature to int 2017-02-26 14:17:26 +01:00
Tobi-wan Kenobi
a3f4b0aa6d [input] Cleaner termination logic, also, remove /tmp/bee.log
Accidentially opened file /tmp/bee.log, without writing anything to it.
2017-02-26 09:13:44 +01:00
Tobi-wan Kenobi
6d47240d6a [modules/nic] reduce code complexity (hopefully)
fixes #37
2017-02-26 09:08:36 +01:00
Tobi-wan Kenobi
0496234370 [README.md] Add dependencies 2017-02-26 08:28:30 +01:00
Tobi-wan Kenobi
d30c757a98 [screenshots] Added screenshot for weather module 2017-02-26 08:21:12 +01:00
Tobi-wan Kenobi
8dc07e666e [modules/weather] Replace urllib with requests
Since requests works the same for python2.7 and python3.x, use requests
instead of urllib (which returns a string in python2.7, but byte data in
python3.0, at least).
2017-02-26 08:19:30 +01:00
Tobi-wan Kenobi
f51ad0c6ff Merge branch 'paxy97-weather-module' 2017-02-26 08:10:08 +01:00
Tobi-wan Kenobi
feb5719ecc [modules/weather] Minor reworks
* Use app-specific API key for bumblebee-status
* Add some parameters (location, unit, update interval)
* Make interval calculation based on time, not number of calls
2017-02-26 08:07:58 +01:00
Pavle Portic
49af9c14d6 [modules/weather] Add rudimentary weather module 2017-02-26 02:42:27 +01:00
Tobi-wan Kenobi
d2c4a316a0 [README] Add list of supported Python versions 2017-02-25 07:54:03 +01:00
Tobi-wan Kenobi
72c60b8c1e [Travis] Remove Python 3.2 from list of support versions
Python 3.2 does not support unicode literals (u"some string"), which are
required for the correct display of icons.

closes #43
2017-02-25 07:51:19 +01:00
Tobi-wan Kenobi
817b8468b6 [Travis] Add Python 3.2
see #43
2017-02-25 07:32:55 +01:00
Tobi-wan Kenobi
2a1a1f10b8 [travis] Add Python 3.6 to tests
see #42
2017-02-25 07:27:06 +01:00
Tobi-wan Kenobi
d19efbe21a [README] Add note regarding awesome font
see #41
2017-02-24 18:28:41 +01:00
Tobi-wan Kenobi
633f167f18 [testjson] Exclude known invalid JSON from tests
There are invalid JSON files in themes/ that are used for unit tests, so
exclude those from the testjson.sh execution.

see #41
2017-02-24 18:13:17 +01:00
Tobi-wan Kenobi
188ee36780 [modules] Add redshift module
New module that shows the current state of redshift
(day/night/transition) and, if in transition, also shows
the day/night percentages.

fixes #40
2017-01-21 11:23:29 +01:00
Tobi-wan Kenobi
87714f12ee [modules/*] Add required executables/commandline tools to help output
fixes #39
2017-01-05 04:55:14 +01:00
Tobi-wan Kenobi
d3fc5094f8 [modules/gpmdp] Make unit tests run through
* full_text needs to return a string *always*
* relax full_text check to also allow unicode results
2017-01-02 22:26:57 +01:00
tobi-wan-kenobi
3d1f4ddf25 Merge pull request #38 from paxy97/master
[modules/gpmdp] Add Google play music desktop player support

Requires commandline tool "playerctl" for next/prev/play/pause functionality

Requires commandline tool "gpmdp-remote" for song information
2017-01-02 22:13:14 +01:00
Pavle Portic
0f1725982a [modules/gpmdp] Add Google play music desktop player support 2017-01-02 21:44:53 +01:00
Tobi-wan Kenobi
a705adf207 [modules/pulseaudio] Fix status extraction
With multiple devices, extracting mute status and volumes failed
(because the loop would continue even after it found the correct device)
2016-12-20 07:49:21 +01:00
Tobi-wan Kenobi
846d28714a [tests] Add tests for bumblebee.util
Add tests for the utility functions and fix a few embarrassing bugs in
the process.
2016-12-17 09:00:49 +01:00
Tobi-wan Kenobi
672413c238 [CI] Add .coveragerc to exclude tests from coverage report 2016-12-17 08:46:11 +01:00
Tobi-wan Kenobi
9a350ddc2a [tests/config] Add tests for helptexts
Ensure that each theme is listed in the helptext and that there is a
helptext entry for every module.
2016-12-17 08:42:23 +01:00
Tobi-wan Kenobi
4f7666533c [modules/pulseaudio] Refactor callback registration
Make it easier to add/extend callbacks in the future.

fixes #35
2016-12-17 08:16:10 +01:00
Tobi-wan Kenobi
cfd1406525 [modules/pulseaudio] (Hopefully) improve parsing logic
Improve parsing logic to make code easier to understand and extend.

fixes #32
2016-12-17 08:06:58 +01:00
Tobi-wan Kenobi
220bb9bf60 [core/input] Ugly hack for responsiveness
Somehow, the fix in the previous commit didn't work, it seems that
sometimes epoll() doesn't trigger, even if there is more data in
sys.stdin. I'm sure I'm doing something horribly wrong here.

Anyhow, as a quick fix, check for the open bracket to be sure to not
buffer the first event too long.
2016-12-17 08:04:21 +01:00
Tobi-wan Kenobi
f6be25bc73 [core/input] Move from select to epoll
Use epoll instead of select in order to be able to use level-triggered
semantics and not get stuck on the first event.
2016-12-17 07:43:38 +01:00
Tobi-wan Kenobi
31f9154be2 [help] Add theme and module listing
Re-enable the possibility to list available themes and modules.

fixes #29
2016-12-17 07:05:23 +01:00
Tobi-wan Kenobi
71cc0c216f [engine/config] Add helptexts 2016-12-15 19:44:49 +01:00
Tobi-wan Kenobi
5e305bf3b6 [engine/input] Re-enable mouse button parameter bindings
Re-enable the possibility to define custom mouse actions by binding
commands to "<alias|module>.<left-click|right-click|...>". These
commands are then executed as shell commands.

fixes #30
2016-12-15 19:41:50 +01:00