Commit graph

288 commits

Author SHA1 Message Date
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
tobi-wan-kenobi
41b61d05d5 Merge pull request #33 from paxy97/master
[theme/gruvbox] Remove empty space around the modules
2016-12-13 07:08:05 +01:00
Pavle Portic
49fdc8e724 [theme/gruvbox] Remove empty space around the modules 2016-12-12 22:06:46 +01:00
Tobi-wan Kenobi
f8fc74870c [doc] Add screenshot of layout module 2016-12-11 15:01:51 +01:00
Tobi-wan Kenobi
999547f794 [modules/layout] Re-enable keyboard layout switcher
Displays the current layout and allows switching to next/previous
configured layout via mouse clicks.
2016-12-11 15:00:13 +01:00
Tobi-wan Kenobi
b4f9123ba4 [README] Update badges for better readability in .md file 2016-12-11 13:50:33 +01:00
Tobi-wan Kenobi
75f5af4866 [core/input] Skip partial events
Clicking on a separator creates partial events ("instance" missing).
Ignore those events, as they crash the input processor.

fixes #31
2016-12-11 13:43:34 +01:00
Tobi-wan Kenobi
90adbfbec9 [README] Add code coverage information
Even if it is not stellar...
2016-12-11 13:26:38 +01:00
Tobi-wan Kenobi
a5ed2830ac [themes] Fix gap issues 2016-12-11 13:26:02 +01:00
Tobi-wan Kenobi
0ea29c0244 [CI] More tests to get Travis to send coverage info to Code Climate 2016-12-11 13:24:37 +01:00
Tobi-wan Kenobi
27d1d15b23 [CI] Enable Travis Code Climate coverage integration
No idea whether this will work...
2016-12-11 13:17:43 +01:00
Tobi-wan Kenobi
abb6d4aeeb [README] Update branch info for Travis badge 2016-12-11 13:12:22 +01:00
Tobi-wan Kenobi
4cd8e73564 Merge branch 'engine-rework'
At long last, this fixes #23

(and probably introduces millions of new bugs)
2016-12-11 13:10:44 +01:00
Tobi-wan Kenobi
9b9403d92e [doc] Update screenshot for CPU module 2016-12-11 13:08:07 +01:00
Tobi-wan Kenobi
c3214a8a3b [bin] Re-add i3bar load script 2016-12-11 13:05:49 +01:00
Tobi-wan Kenobi
8bde4845e0 [theme] Add ASCII "icons" 2016-12-11 13:05:19 +01:00
Tobi-wan Kenobi
f441be7d11 [doc] Re-add screenshots 2016-12-11 12:58:46 +01:00
Tobi-wan Kenobi
65ae8c242b [themes] Re-enable themes
see #23
2016-12-11 12:58:03 +01:00
Tobi-wan Kenobi
d10fc814ed [modules/dnf] Re-enable DNF update checking module
see #23
2016-12-11 12:53:31 +01:00
Tobi-wan Kenobi
dd6b13265d [modules/pacman] Re-enable pacman update information
see #23
2016-12-11 12:42:49 +01:00
Tobi-wan Kenobi
9878bbf971 [tests] Fix automated testrun in Travis
Forgot to mock Popen() in setUp
2016-12-11 12:31:37 +01:00
Tobi-wan Kenobi
9fe0915730 [tests] Add mocking for module tests 2016-12-11 12:26:28 +01:00
Tobi-wan Kenobi
1d6ca352b9 [modules/xrandr] Re-enable xrandr module
Displays the connected screens and allows the user to enable/disable
them.

see #23
2016-12-11 12:23:33 +01:00
Tobi-wan Kenobi
17ee621a5a [modules/ping] Spawn thread on-the-fly
Instead of having a thread that runs in the background continuously,
spawn a new one for every update interval. That speeds up the tests
quite a lot.

see #23
2016-12-11 11:50:15 +01:00
Tobi-wan Kenobi
71582cbcd7 [modules/ping] Re-enable ping module
Show RTT measured by ICMP echo request/replies for a given host.

For that to work correctly, change the "full_text" callback for a widget
so that the widget itself is also passed as argument in the callback
method. That actually makes a lot of sense, since the widget can now be
used as a repository of state information.

see #23
2016-12-11 11:37:24 +01:00
Tobi-wan Kenobi
4f6ec89d3c [doc] Add Code Climate issue count 2016-12-11 09:06:23 +01:00
Tobi-wan Kenobi
666daff9a6 [modules/pulseaudio] Re-enable pulseaudio module
Display volume for default PulseAudio source/sink, change volume and
mute/unmute device.

see #23
2016-12-11 08:51:56 +01:00
Tobi-wan Kenobi
c2c70da4ef [tests/disk] Fix copy/paste error - duplicate method name 2016-12-11 08:45:43 +01:00
Tobi-wan Kenobi
23d7d53fca [modules] critical/warning threshold refactoring
Quite a lot of modules use the "if higher X -> critical, if higher Y ->
warning" idiom now, so extracted that into a common function for reuse.

see #23
2016-12-11 08:25:54 +01:00
Tobi-wan Kenobi
edfccd2d31 [modules/spacer] Re-enable "spacer", the text-display widget
see #23
2016-12-11 08:17:37 +01:00
Tobi-wan Kenobi
e603a2cb26 [tests/battery] Forgot a mock in previous commit 2016-12-11 08:14:55 +01:00
Tobi-wan Kenobi
ef224fdbb6 [themes] Add missing load module icon 2016-12-11 08:13:54 +01:00
Tobi-wan Kenobi
7db80b6d3b [tests/battery] Mock exists() call for Travis CI 2016-12-11 08:11:26 +01:00
Tobi-wan Kenobi
c8fc75a401 [modules/load] Re-enable load module
Display system load and show warning/critical error when load is above a
certain threshold (compared to the number of available CPUs).

see #23
2016-12-11 08:01:43 +01:00
Tobi-wan Kenobi
4bd13c2f63 [tests] Refactor i3barinput
Use the assertMouseEvent helper in i3barinput.

see #23
2016-12-11 08:01:16 +01:00
Tobi-wan Kenobi
1a4cddb0b6 [core] Fix callback registration ("shadowed" events)
Until now, as soon as a widget registered *any* callback, the default
callbacks (e.g. scroll up/down to go to next/previous workspace) didn't
work anymore, as there was a better match for the general registration
(even though not for the button).

To fix this, merge the callback registration into a flat registration,
where a key is calculated from the ID of the registrar and the
registered button.

see #23
2016-12-11 07:38:56 +01:00
Tobi-wan Kenobi
d91294f010 [modules/battery] Fix ac and unknown display
If the computer runs on AC, display that instead of showing "100%" in
the status.

Also, if reading the charging status fails for some reason (except the
computer being on AC), go into critical state and display "n/a".

see #23
2016-12-11 07:28:15 +01:00
Tobi-wan Kenobi
2cc2cf8282 [core/engine] Add aliasing mechanism to modules
Allow modules to define aliases. This replaces the symlink mechanism
that was in place previously, because it was a bit ugly (and confused
code climate).

see #23
2016-12-11 07:18:06 +01:00
Tobi-wan Kenobi
8f759e6134 [CI] Add config file for Code Climate 2016-12-10 22:20:55 +01:00