Commit graph

781 commits

Author SHA1 Message Date
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
Tobi-wan Kenobi
fbd7801d8d [CI] Disable test coverage reporting
Seems to work only for the default branch, so disable until merge back
to master.
2016-12-10 22:15:25 +01:00
Tobi-wan Kenobi
83488fe97f [CI] Add Code Climate token for test coverage
Let's see if/how code coverage works.
2016-12-10 22:12:02 +01:00
Tobi-wan Kenobi
14ca6d5cf0 [doc] Add code climate shield to README.md 2016-12-10 20:09:42 +01:00
Tobi-wan Kenobi
547b3dc296 [doc] Re-add README.md 2016-12-10 20:05:02 +01:00
Tobi-wan Kenobi
e8f9a50cf7 [CI] Removing Python 3.2, as it complains about unicode strings
Honestly: I have *no idea* how to fix this, so for the time being,
Python 3.2 won't be supported.
2016-12-10 20:00:09 +01:00
Tobi-wan Kenobi
c44b529c1f [CI] Add more Python versions to Travis
Now that the tests run through with Python2.7, extend the list of Python
versions to be supported.
2016-12-10 19:55:40 +01:00
Tobi-wan Kenobi
a1455c9687 [modules/battery] Handle inexistent battery more gracefully 2016-12-10 19:54:31 +01:00