Originally the size function returned the scaled `size` property for
scalable fonts and the non-scaled `pixelsize` property for non-scalable
fonts. This caused lots of issues when that property was 0 (empty bars,
characters not drawn without warning, see references at the bottom).
This behavior was mostly observed on debian where `size` is set to 0 if
`pixelsize` is set.
We now try to use both properties for both types, but prefering `size`
for scalable fonts and `pixelsize` for non-scalable ones.
This behavior doesn't break existing correct behavior but now never
returns 0. It will always try to fall back to the other property or to
some fallback value if both properties are 0.
I originally thought this could also make font patterns more expressive
by being able to specify the size of scalable fonts directly in pixels
like so:
Unifont:size=0:pixelsize=20
or to scale non-scalable fonts by forcing polybar to fall back to the
`size` property (which is always scaled):
Wuncon Siji:pixelsize=0:size=20
But how these two patterns are matched by `fc-match` depends both on the
font and on the distro/fontconfig setup.
Ref #706
Ref #1450
Ref #1257
I don't know the original intention behind this but it clutters up debug
traces and basically makes ccache useless.
The only benefit it has, giving version info in stacktraces, is kind of
void since we already ask for version information on github issues.
Previously, when volume was in close proximity to n_max_volume, a larger
increase would not do anything. After this patch, volume is set to
m_max_volume in such scenarios. If the volume already is at
n_max_volume, we mirror the old behavior and emit a warning.
So, for example, consider m_max_volume was 100%, but the volume prior
to the increase was 96%. An increase of 5% would do nothing (emit a
warning, even) instead of setting the volume to 100%.
Note that this might happen even if the volume is at 95% according to
%percentage% due to rounding errors.
Displays real percentage instead of being set to 100 if percentage > full-at
* battery: added percentage_raw token, which ignores full-at
* battery: current_percentage returns raw, added clamping function instead
* battery: clamp percentage used by build()
Made clamp_percentage() const to allow its usage inside build()
* battery: read and return percentage in one line
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.
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
Fixes compilation under GCC 9
The default copy constructor implicit generation is deprecated by C++ standard.
The window& operator=(const xcb_window_t win); operator seems to be useless.
Fixes#1728
Ref jaagr/xpp#16
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
rtd scans the project for a conf.py file so we cannot name it conf.py.in
unless we get rtd to run cmake before building.
The easier option is to have doc/conf.py be the file used by rtd and all
other builds use cmake to first configure it.
This also moves the doc generation completely into cmake (no more
Makefile).
To generate the docs the project needs to first be configured and then
`make doc` can be run.
The approach used is leaned on the cmake's project own use of Sphinx:
Utilities/Sphinx/CMakeLists.txt
We need to have the version string available in multiple places not just
the source code. It is now hardcoded in the root CMakeLists.txt and all
files that need it will be configured with cmake.
This also removed the unecessary duality of GIT_TAG and APP_VERSION and
GIT_TAG_NAMESPACE and APP_VERSION_NAMESPACE.
This allows us to also have the manual as part of the generated html
documentation.
The syntax is also easier to use.
Right now the man page installed on the system is not replaced with the
rst file, this will come in a later step