Commit Graph

1539 Commits

Author SHA1 Message Date
Alex Mayer
73e4b4ac08 Fix Color Hex Values 2018-05-22 17:01:18 -07:00
patrick96
3708d4139a refactor(clang-tidy): Clean up .clang-tidy 2018-05-20 16:37:18 -07:00
patrick96
72948dbc97 fix(clang): Search for files in right places
Before, because of [ -d "$search" ] || search="$(dirname "$search")",
clang-format.sh would search for files to format in the whole repo
(even in the build directory and the submodules)

This now also looks for source files in the tests folder

I have removed the clang-format from clang-tidy.sh because one may want
to run clang-tidy without reformatting
2018-05-20 16:37:18 -07:00
Doron Behar
da9372fb70 refactor(build.sh): Add gcc over clang option(#1249)
There was no way to build with gcc when clang was installed using build.sh
2018-05-20 10:30:33 +02:00
patrick96
3c0732ac2a fix(travis): no xrm build failure
install_xcb_xrm.sh takes advantage of the travis cache but it doesn't
actually install the libraries on the system when it finds that the
compilation has been cached.
2018-05-18 22:17:42 -07:00
patrick96
930be72c89 refactor(tray): Log restack failure as error
I suspect that people that are seeing the tray above their fullscreen
windows get this exception
2018-05-15 16:01:07 -07:00
patrick96
77d36b959d fix(doc): Use proper license badge URL 2018-05-09 16:44:24 -07:00
patrick96
22542afc73 bar: Add comment to geom_format_to_pixels 2018-05-10 00:05:18 +02:00
patrick96
4e5628dd5f bar: Use strtod instead of strtof
This makes the function more consistent, since it actually returns a
double and it also fixes the tests that use EXPECT_DOUBLE_EQ
2018-05-10 00:05:18 +02:00
patrick96
cc9423e682 bar: Add geom_format_to_pixels tests 2018-05-10 00:05:18 +02:00
patrick96
20f3d9a141 refactor: Don't initialize forward declared members
Using brace initialization here causes bar.hpp to not compile when
included on its own, forcing all clients to also include
tray_manager.hpp and so on, which defeats the purpose of forward
declaring those classes.

This also allows us to remove the tray_manager.hpp, renderer.hpp and
parser.hpp includes from the clients of bar.hpp
2018-05-10 00:05:18 +02:00
lukediamond
c2ac93db55 Added support for mixed percent/pixel geometry. 2018-05-10 00:05:18 +02:00
patrick96
0dddb0be4a fix(aur): Backport gcc fix 2018-05-07 19:39:05 -07:00
patrick96
3408db3475 fix(builder): Don't truncate colors with same channels
The builder would convert bg and fg colors like #00000000 to #000 which
would make it loose its alpha channel.

Fixes #1183
2018-05-07 00:12:29 +02:00
patrick96
758dbb85ed fix(codecov): Ignore lib folder for coverage 2018-05-06 14:30:34 -07:00
patrick96
8173a6473e fix(gcc): Fix -Wstringop-truncation warning
As mentioned in #1215, gcc >=8 will complain, if strncpy truncates the
source string or gcc can prove there is no NUL terminating byte.

This also updates the i3ipcpp submodule where there was a similar error

Fixes #1215
2018-05-06 14:17:10 -07:00
NBonaparte
f2010edf94 fix(pulseaudio): fix max_volume naming 2018-05-05 10:57:01 +02:00
NBonaparte
4bf73ddd81 fix(pulseaudio): listen for default sink changes, and use @DEFAULT_SINK@
Using @DEFAULT_SINK@ macro avoids having to retrieve default sink name
2018-05-05 10:57:01 +02:00
Kajzer
45b39b0fbd Add Gentoo install instructions 2018-05-05 10:11:09 +02:00
patrick96
095d68fad0 fix: Stop using ato* for string to num conversion
atoi, atof and so on have undefined behavior if anything goes wrong. We
now use strto*, but without error checking. In most places overflows and
the like *should* not happen. String to number conversions are only used
when reading data from other applications or from the config, if another
application gives unparsable strings or too large numbers, then most
likely there is something wrong with that application. If the error
comes from the user config, then the user has to live with values
provided by strto* on error (which are very reasonable)

Fixes #1201
2018-05-03 11:07:37 -07:00
Christoph Schiessl
cc334e5040 fix(battery): check current state to decide which framerate to use 2018-05-02 11:44:55 +02:00
Christoph Schiessl
2a9d5db179 feat(battery): implement animation-discharging 2018-05-02 11:44:55 +02:00
Christoph Schiessl
ee5dfbbf59 feat(battery): add animation-discharging 2018-05-02 11:44:55 +02:00
patrick96
553fde9499 fix(tests): Add forgotten scope test 2018-05-01 20:14:23 -07:00
Matthias Gamsjager
ff39c9d09f Add Freebsd install instructions 2018-04-18 21:15:55 +02:00
patrick96
7eb1f61080 fix(net): Mark not connected on querying failure
Fixes #1163
2018-04-18 09:27:12 +02:00
NBonaparte
4dfa4079be feat(travis): switch to codecov for code coverage (#1165) 2018-04-16 20:03:34 +02:00
patrick96
6cee262225 travis: Move MAKEFLAGS to .travis.yml 2018-04-11 19:37:50 -07:00
patrick96
c900a9958d travis: Don't fetch as many git commits 2018-04-11 19:37:50 -07:00
patrick96
0394172cc3 travis: Enable ccache and apt caching
Will massively decrease build time
2018-04-11 19:37:50 -07:00
patrick96
a8234ddd4e travis: Don't install specific compilers
clang is already installed in travis' trusty environment

Should decrease build time quite a bit because we don't need to download
and compule libc++
2018-04-11 19:37:50 -07:00
patrick96
7b7498bde1 travis: Remove custom cmake
Travis provides cmake 3.9.2 ([1])

[1]:
https://docs.travis-ci.com/user/build-environment-updates/2017-12-12/
2018-04-11 19:37:50 -07:00
patrick96
be2d05a4bc cmake: Print module versions in summary
Makes helping with build issues easier as we readily see what versions
are being used.
Cmake already prints the version but only when run the first time and
not on subsequent calls, so the information is often lost
2018-04-10 22:22:22 -07:00
Kajzer
688658c306 (pulseaudio) Add max volume configuration 2018-04-09 20:27:55 -07:00
patrick96
3f9ce4bb99 tests: Only configure tests when asked for
This prevents the download of googletest for normal builds. Now when we
want to compile and run tests we need to specify -DBUILD_TESTS=ON
2018-04-10 00:56:51 +02:00
patrick96
fce313f3ef tests: Fix clang build
Compiling gtest with clang fails with -Wmissing-field-initializers as
reported in [1]
[1]: https://github.com/google/googletest/issues/1521
2018-04-10 00:56:51 +02:00
patrick96
0e5584920b tests: Use local gtest headers
This makes sure the headers and the compiled gtest library are
compatible
2018-04-10 00:56:51 +02:00
patrick96
fa99be63a0 tests: Don't include src dir
Since we now link source files instead of including them, this is not
necessary anymore
2018-04-10 00:56:51 +02:00
patrick96
56413aa7a8 coverage: Add badge 2018-04-10 00:56:51 +02:00
patrick96
eb6159767b tests: Remove log message 2018-04-10 00:56:51 +02:00
patrick96
cacd161ed7 travis: Send data to coveralls.io after tests
The PYTHONPATH env variable needed to be removed because it was messing
with pip and cpp-coveralls

Unfortunately adding the '-e build' to coveralls doesn't work to exclude
source files in the build directory, as it won't collect any data then.
If at some point, we have source files that are used by the tests
somewhere inside the build folder that isn't covered by the exclusion
rules, we'll need to add it here
2018-04-10 00:56:51 +02:00
patrick96
d768c49980 travis: Separate compiling and testing 2018-04-10 00:56:51 +02:00
patrick96
eed4d3ffc8 fix(tests): Compile gtest at configure time
Ubuntu (and thus travis CI) doesn't have the gtest library in its repos,
only the header files and according to [1], gtest should be compiled in
every project anyways

[1]: https://github.com/google/googletest/blob/master/googletest/docs/FAQ.md#why-is-it-not-recommended-to-install-a-pre-compiled-copy-of-google-test-for-example-into-usrlocal
2018-04-10 00:56:51 +02:00
patrick96
c865add821 refactor(tests): Migrate to googletest
googletest (gtest) is more feature rich than the current implementation
which only provides expect() which is basically an assertion. It is also
quite intuitive to use, this can be seen in the rewrite of the
command_line test where EXPECT_THROW replaces a whole try-catch block.

I have also moved the source files the test depend on to be linked in
CMakeLists.txt instead of including them directly because include .cpp
files is bad.

The two x11 tests were removed because they were written two years ago
and a lot of the things they depend on, don't actually exist anymore in
polybar (I think we switched to xpp after those tests were written)

Tests are now compiled with the gcov lib which can be used to provide
test coverage in a second step
2018-04-10 00:56:51 +02:00
patrick96
1d20df00e8 fix(ycm): Fix ycm error
All files that include base.inl also include base.hpp but technically
it's required for it to compile
2018-04-08 02:30:04 +02:00
patrick96
aaf49c302f fix(ycm): Use compilation db for all possible files
This is basically a major rewrite of the .ycm_extra_conf.py file that
ycm uses to determine what compile commands it should use for a file.
But the basic purpose is for it to use the generated flags in
build/compile_commands.json that is generated by cmake for as many files
as possible.

Before it always used the hardcoded default flags which would not always
work for all files.

Now it gets the proper flags for all files I tested.
In the src and tests folder the flags are already generated by cmake
In the include folder it tries to use the flags of the corresponding
source files in the src folder
2018-04-08 02:30:04 +02:00
patrick96
36ea6fbff8 Revert "fix(pulseaudio): add mutex for queue"
This reverts commit d430174f0b.
Mutual exclusion is already guaranteed by the lock on
pa_threaded_mainloop

Fixes #1139
2018-04-07 13:52:48 -07:00
patrick96
428e54e0f6 log(mpd): typo 2018-04-07 12:10:10 -07:00
patrick96
ddb1fb4c3a log(mpd): Use __func__ instead of __FUNCTION__ 2018-04-07 12:10:10 -07:00
patrick96
57a2f95ff9 log(mpd): Log mpd input events 2018-04-07 12:10:10 -07:00