Commit Graph

136 Commits

Author SHA1 Message Date
patrick96
9103d232a5 build: Remove -Werror
Whenever a new gcc version is released that introduces new warnings,
this breaks lots of builds on the user's side. This change pushes the
detection of these new warnings a bit back until either a user reports
warnings or developers get the new compiler updates. I think this is a
good tradeoff since release builds are no longer totally broken as soon
as a new compiler version comes out.

Travis still uses -Werror because there we actually want builds to fail.
2019-05-08 12:23:48 +02:00
patrick96
bfaeb71cb8 build: create config even when docs are disabled
Fixes #1733
2019-04-24 08:11:27 +02:00
patrick96
0251a80e75 build: Remove C compiler
There isn't a single .c file in the project. It just added bloat
2019-04-08 09:01:48 +02:00
patrick96
a67b824e25 cmake: Make Release default build type
The polybar executable with RelWithDebInfo gets over 100MB. And there
really isn't any reason to have users install such huge executables.

Release build type gives you approx. 3.6M executables

Fixes #1497
2019-04-08 09:01:48 +02:00
Jérôme BOULMIER
627c4ac2af fix(brightness): reading brightness in actual_brightness (#1689)
As the kernel documentation said:
https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-class-backlight

    This file will also show the brightness level stored in the driver, which may not be the actual brightness (see actual_brightness).

Therefore the brightness value should be read in the actual_brightness file.

Fix #1180
2019-04-07 17:04:55 +02:00
patrick96
5b7bb2514e refactor(doc): Enable only if sphinx is available 2019-04-05 23:43:37 +02:00
patrick96
73de9257a1 refactor(cmake): Remove unused querybin 2019-04-05 23:43:37 +02:00
patrick96
754673bff8 refactor(cmake): Make documentation optional 2019-04-05 23:43:37 +02:00
patrick96
3596001de1 refactor(cmake): Add version information to summary 2019-04-05 23:43:37 +02:00
patrick96
9aefbd5d34 build: Add UndefinedBehaviorSanitizer 2019-01-20 15:12:22 +01:00
NBonaparte
35c0c4a343 fix(xcb): check for composite extension (#1430)
* fix(xcb): check for composite extension

* fix(travis): add xcb-composite to deps

* fix(xcb): always include composite when building
2018-12-02 16:39:14 +01:00
sam-lunt
d3e37918e5 CMake refactor (#1510)
* Clean up CMake logic

- removed logic to find CppUnit (no longer used)
- removed "dirs" variable used to pass include directories
- removed add_library function (no longer used)
- removed make_executable function
    * only used in 2 places (polybar and polybar-msg)
    * it was more general than needed, logic is simpler without it
- split polybar into static library and executable
    * this allows linking unit tests to the library

* rename library

* add coverage build

- Added a CMake build type "Coverage" that builds C and C++
  code with the "--coverage" flag (recognized by both GCC and Clang)
- removed "-Wno-missing-field-initializers" from test flags,
  since it didn't seem to be needed any more
- removed logic from tests/CMakeLists to disable "-Werror" and "-pedantic-errors"
  since there didn't seem to be any warnings during the build

* fix whitespace

* update travis

* remove O2 from defalt flags

* allow tests to be built by default make target

* disable Werror for debug builds
2018-11-21 18:46:33 +01:00
patrick96
a881d49d9d doc(net): Indicate the wireless library used
This helps us to more easily debug network issues because before it
wasn't clear if a user had built polybar with the libnl or libiw
adapter
2018-09-18 15:29:05 -07:00
Andre Schröder
b632e7da38 fix(cmake): Use name of found font (#1350)
Before queryfont would never change the name of the font, this ensure that it is propery updated in the caller's scope
2018-08-07 17:04:42 +02:00
taschenb
3afc341c7b feat(net): Add nl80211 support (#1009)
This patch enables support for nl80211. In case the libnl-genl-3.0
library isn't found, it will fall back to Wext instead.
The library to use can also be manually set with the CMake option
WITH_LIBNL.

The Wireless-Extensions (WE or Wext) are deprecated and long replaced
by cfg80211.

Although Wext isn't used by WiFi drivers anymore, CFG80211_WEXT allows
old tools to communicate with modern drivers by providing a wrapper
API.
2018-06-18 20:16:09 -07:00
patrick96
6157c697bc refactor(build): List xkeyboard in cmake and polybar -v 2018-06-18 11:49:31 +02:00
patrick96
f7a6e5ba98 refactor(build): Build wihtout xkb
The only reason polybar couldn't build without xkb is because the
xkeyboard module's source file was not removed during compilation.
xkeyboard already has an entry in unsupported.hpp

This effectively makes xcb-util-xkb optional
2018-06-18 11:49:31 +02:00
patrick96
b5129ae0c4 refactor(ccache): Enable by default
Following [1] to get to this setup.

We setup all the ccache configuration before calling project() because
project will perform compiler checks. This is also why we can't use
message_colored here and print the colors manually

Before ENABLE_CCACHE was not yet defined when we reached the check in
01-core because the option was defined in 02-opts

[1] https://crascit.com/2016/04/09/using-ccache-with-cmake/
2018-06-01 10:49:00 -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
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
Le Baron d'Merde
55331d17f7 fix(FreeBSD): Use libraries from LOCALBASE (#1111)
Ensures proper linking when not building a port
2018-03-22 00:03:47 +01:00
Kyle Cook
0f34178104 Add FreeBSD Support (#931) 2018-03-21 23:35:10 +01:00
patrick96
f2bc6d1844 logger: Enable trace logging by default
Often we may need information from the user that is only available if
-l trace is used which requires most users to recompile polybar in debug
mode.
2018-02-27 00:19:29 -08:00
NBonaparte
6e8b9dea29 fix(pulseaudio): Move pulseaudio to separate module 2018-01-20 12:37:41 -08:00
NBonaparte
9b0ff59b56 fix(build): Check for pulseaudio binary 2018-01-20 12:37:41 -08:00
NBonaparte
81913cf181 wip(pulseaudio): create pulseaudio backend 2018-01-20 12:37:41 -08:00
NBonaparte
1dc111c0fa fix: make xcb-cursor optional for now 2017-09-16 15:31:24 -07:00
NBonaparte
65edba3321 feat: add cursor change 2017-09-16 15:31:24 -07:00
Chase Geigle
299f1617d3 fix(cmake): Suppress -Wnoexcept-type warning on GCC
There is no way to avoid this error in the code itself, so we must
suppress this warning if we wish to keep -Werror.
2017-08-30 15:27:05 +02:00
patrick96
2d1e3c215f Add textual indicator for module support
If color output was surpressed, there was no way to tell in the cmake
summary, if a module is actually enabled or not.
Now each module is prefixed with either a "[X]" to indicate it's enabled
or a "[ ]" to indicate it's not
2017-07-14 10:14:13 +02:00
Dmitry Marakasov
b23ff17dde Disable -Werror for parentheses-equality warning
This warning fires here:

/home/travis/build/jaagr/polybar/src/utils/command.cpp:135:46: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
    } else if ((((*(int *) &(m_forkstatus))) == 0xffff)) {
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

and as this system macro cannot be changed, let's not turn this into an error
2017-07-05 17:17:58 +02:00
Andrzej Ressel
c2629fb77a Fix typo 2017-02-26 23:22:00 +01:00
Mohammad Saboorian
82dc7c895e install_manifest has a .txt extension 2017-02-25 11:01:19 +03:30
Michael Carlberg
41f7f82bd0 fix(cmake): Debug check 2017-01-27 13:30:23 +01:00
Michael Carlberg
2912f0f3f2 fix(cmake): Require xcb-randr>=1.12 for monitors
Refs #344
2017-01-27 00:35:00 +01:00
Michael Carlberg
43a17c3b36 refactor(cmake): Cleanup 2017-01-26 17:39:50 +01:00
Michael Carlberg
b97e4c56c5 fix(cmake): Properly check xcb-xrm
The default value of WITH_XRM was never calculated because
the "IF NOT DEFINED" check was done after the call to option()

Refs #381
2017-01-26 12:59:13 +01:00
Michael Carlberg
37d0a0e57b refactor(cmake): Cleanup 2017-01-25 23:28:25 +01:00
Michael Carlberg
8fa879c8d8 fix(cmake): Require xcb-proto>=1.12 for monitor support
Refs #344
2017-01-25 20:16:04 +01:00
Michael Carlberg
017abee679 fix(cmake): Require randproto>=1.5 for monitor support
Refs #344
2017-01-25 17:36:40 +01:00
Michael Carlberg
8147e2a511 fix(cmake): Font not found message 2017-01-24 13:02:55 +01:00
Michael Carlberg
6692b4a8da refactor(x11): Cleanup 2017-01-24 10:49:14 +01:00
Michael Carlberg
5e1886a312 wip(refactor): Cairo drawing 2017-01-24 07:11:14 +01:00
Michael Carlberg
20b196f5e0 fix(cmake): Typo 2017-01-20 03:32:44 +01:00
Michael Carlberg
e1483c3f65 refactor(xresources): Use xcb-util-xrm
Drop the Xlib version and handle X resource
lookups using xcb-util-xrm

Refs #356
2017-01-20 02:26:01 +01:00
Michael Carlberg
e20150e6ca feat(cmake): Query fonts 2017-01-14 00:05:54 +01:00
Michael Carlberg
989e4c3039 cmake: MinSizeRel flags 2017-01-13 13:17:11 +01:00
Michael Carlberg
6fb48c8e6f feat(build): Add flag for drawing visible whitespace 2017-01-13 11:04:43 +01:00
Michael Carlberg
081578b168 fix(cmake): Require XRandR 1.5+ for monitor support
Refs #280
2017-01-13 04:13:46 +01:00
Michael Carlberg
506ac3e4ac fix(xrandr): Enable monitor support by default
Refs #280
2017-01-13 04:02:27 +01:00
Michael Carlberg
385572ec64 feat(xrandr): Support for monitors
Refs #280
2017-01-13 03:52:57 +01:00
Michael Carlberg
79856d7ed2 feat(ipc): Add polybar-msg to facilitate ipc messaging 2017-01-10 02:09:33 +01:00
Michael Carlberg
e062170b1f fix(cmake): Use new config path 2016-12-26 17:07:02 +01:00
Michael Carlberg
92424f0d49 refactor(cmake): Install components 2016-12-23 18:10:19 +01:00
Michael Carlberg
5c561e3d77 fix(cmake): Use RelWithDebInfo as default build type 2016-12-23 16:58:05 +01:00
Michael Carlberg
7c7e053e1f fix(cmake): Default to -O2 for Release builds 2016-12-23 15:52:55 +01:00
Michael Carlberg
f84ed1fafb fix(cmake): Less specialized defaults 2016-12-23 15:03:28 +01:00
Michael Carlberg
e9d88d3173 fix(cmake): Check compiler version 2016-12-22 00:40:45 +01:00
Michael Carlberg
bc9b9f0d12 refactor: Cleanup 2016-12-21 23:22:02 +01:00
Michael Carlberg
b417c9f812 feat(github): New module
Module used to query the GitHub API for information.
Currently only supports notification count.

Ref #84
2016-12-19 22:12:31 +01:00
Michael Carlberg
698c494068 refactor(cmake): Split memcheck command into summary/full 2016-12-14 15:11:37 +01:00
Michael Carlberg
060d198b8e feat(cmake): Valgrind memcheck command 2016-12-14 11:01:44 +01:00
Michael Carlberg
a43309df9f cmake: Installation paths 2016-11-30 18:22:10 +01:00
Michael Carlberg
6aba583c3e refactor(build): Rename X extension flags 2016-11-30 12:48:13 +01:00
Michael Carlberg
608519363d feat(xkeyboard): New module
New module that uses the X keyboard extension
to show keyboard layout and indicators.

Ref #84, #200
2016-11-30 10:08:44 +01:00
Michael Carlberg
4fb7c98455 build: Optional X extensions 2016-11-26 15:42:48 +01:00
Michael Carlberg
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
Michael Carlberg
0128014d44 fix(cmake): Tidy and format commands 2016-11-25 14:17:57 +01:00
Michael Carlberg
9fdc22843b refactor: Cleanup rendering 2016-11-25 04:42:27 +01:00
Michael Carlberg
c1162960cc fix(battery): Try several value files
Fixes #177
2016-11-21 08:30:25 +01:00
Michael Carlberg
c6d85b2b92 refactor: Optimize build 2016-11-20 23:04:31 +01:00
Michael Carlberg
38f9ba81cd feat(battery): Estimated time remaining
Adds a new token %time% that will display an
estimate of the remaining time until fully
charged/discharged
2016-11-19 15:42:31 +01:00
Michael Carlberg
fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
Michael Carlberg
489f3ce480 wip: Inter-process messaging 2016-11-13 19:05:30 +01:00
Michael Carlberg
2314b57bce fix(cmake): Default module flags based on libs 2016-11-12 17:25:44 +01:00
Michael Carlberg
05c318e97b feat(config): Generate config based on build 2016-11-12 13:07:05 +01:00
NBonaparte
a06b38f534 feat(temperature): Added temp module and examples 2016-11-10 22:54:07 -08:00
Michael Carlberg
869c5fe718 refactor: Code cleanup 2016-11-04 19:21:56 +01:00
Michael Carlberg
74a04ded80 fix(build): Add missing files 2016-11-03 13:06:33 +01:00
Michael Carlberg
e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00
Michael Carlberg
9e22b3e693 refactor(cmake): Target libc++ 2016-10-25 01:46:35 +02:00
Michael Carlberg
86d2186f89 cmake: Commands for clang-[tidy|format] 2016-10-19 01:31:17 +02:00
Michael Carlberg
d359ab6057 refactor: Application rewrite 2016-10-10 14:52:57 +02:00
Michael Carlberg
8b7f2b7268 refactor: Replace X11 handling with xpp+xcb
xrandr 1.5 is no longer required for the monitor
handling to work

fixes jaagr/lemonbuddy#12
fixes jaagr/lemonbuddy#24
2016-06-24 00:22:33 +02:00
Michael Carlberg
dbd5e679db fix(build): Improved dependency checks 2016-05-24 04:06:29 +02:00
Michael Carlberg
eeefb3c610 init(git): Base commit 2016-05-19 20:23:45 +02:00