Commit Graph

1749 Commits

Author SHA1 Message Date
patrick96
fe7dc28b07 Update PKGBUILDs for 3.4.0 2019-07-24 20:57:39 +02:00
patrick96
91652736ae Release 3.4.0
Breaking Changes:

* In the `internal/memory` module all of the megabyte values no longer have decimal places (#1606).

Changelog

**New Config Options**
The following config options were added:

In the `[bar/*]` section:

* `monitor-exact`, use exact name matching for monitors otherwise ignore dashes.

In formats:

* `format-NAME-font` to set the font for that format (same as `label-NAME-font`)

In `internal/bspwm`:

* `label-marked` for the new `marked` node flag introduced in baskerville/bspwm@d0138af

In `internal/xkeyboard`:

* `label-indicator-(on|off)` is used once for every indicator (caps lock, etc.), supports `%name%` and `%icon%`
* `label-indicator-(on|off)-(capslock|numlock|scrolllock)` overwrites `label-indicator-(on|off)` for the given indicator
* `layout-icon-*` is a list that maps layout names to icons to be used with the `%icon%` token in `label-layout`
* `indicator-icon-*` is a list that maps indicator names to icons to be used with the `%icon%` token in `label-indicator-*`

In `internal/temperature`:

* `base-temperature` is the counterpart to `warn-temperature` and controls the lower bound for the ramp.

**Deprecations**

* xkeyboard: `label-indicator` is deprecated in favor of the new `label-indicator-on`

**Features**

* bar:
    * make exact monitor matching configurable (#1533), see #1532
    * `border-size` now supports the same mixed percentage/pixel sizes as `width` and `height` (#1592), see #1567
    * Use primary monitor if no monitor is specified (#1426), #1412
* bspwm: Support for the new `marked` node flag. (#1557), see #1552
* format: Formats now support the `-font` property just as labels (#1602), see #19
* network: Support for all tokens in all labels (#1597)
* xkeyboard: Indicator names can be customized. Also adds icon mappings for layouts and indicators (#1559, #1048), see #1558
* temperature: The ramp now starts at `base-temperature` instead of 0°C (#1706), see #1703
* battery: `%percentage_raw%` token that displays the real percentage regardless of `full-at` (#1756), see #1753

**Fixes**

* network: Display `N/A` when no IPv4 address can be found (#1597)
* xworkspaces: Properly handle when desktops are removed from `_NET_DESKTOP_NAMES` (#1713), see #1710
* backlight: Read the right brightness value (#1689), see #1180
* pulseaudio: Allow volume increase when it is close to the maximum. Before it did not allow that when adding `interval` would go over the max. (#1765)
* i3: fix workspace change for workspaces with special characters in the name  (#1798), see #1797
* font: Characters no longer vanish when the `size` or `pixelsize` property is 0 (#1646)
* build:
    * Compilation error under gcc9 (#1729), see #1728
    * Compilation no longer fails when new flags are introduced that produce new warnings (#1735)
2019-07-24 15:42:04 +02:00
Patrick Ziegler
f0c65e6cf0
fix(config): Allow empty string as ref fallback (#1831) 2019-07-01 23:33:01 +02:00
Rune Morling
43556b5d92 cmake: Use GNUInstallDirs (#1818)
* Use GNUInstallDirs instead of hardcoded paths

This change should be a no-op in the normal case and at the same time make it
easier to customise polybar builds on systems with special needs.

* Avoid creating /usr/share/doc/polybar/polybar/*

* Include GNUInstallDirs for the doc target itself

* cmake: Don't try to set CMAKE_INSTALL_* variables

Since we include GNUInstallDirs all these variables are already set

* cmake: Print install directories in summary

* fix(cmake): Make doc-only work like normal build

This is kind of a dirty hack to force CMAKE_INSTALL_DOCDIR to use
`polybar` as the project name when only polybar-doc is built.

Maybe it is wiser at some point to be able to do a doc only build (and
install) that can be done from the top level project. Then we would also
not need to include GNUInstallDirs here
2019-06-24 18:08:59 +02:00
Brice Waegeneire
0740382851 fix(msg): use stdout when exiting with code 0 2019-06-19 16:09:56 +02:00
Jérôme BOULMIER
c650513b67 fix(i3): Surround ws names with quotes (#1798)
Fixes #1797
2019-06-04 23:34:16 +02:00
patrick96
5be532c51b refactor(font): More robust font size calculation
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
2019-06-03 00:49:48 +02:00
patrick96
a3e2e51ac9 build: remove xdamage extension
Unused

Ref: #1730
2019-06-03 00:46:12 +02:00
patrick96
38af08d29a build: remove xsync extension
Unused

Ref: #1730
2019-06-03 00:46:12 +02:00
patrick96
6ff2b2b37f build: remove xrender extension
Some build recipes (exherbo, sourcemage) for some reason enable this
even though it doesn't do anything any only causes compilation issues.

Ref: #1730
2019-06-03 00:46:12 +02:00
patrick96
2b0bf463b1 config: Remove bspwm variable references
This confuses lots of people when removing the bspwm module from the
sample config and trying to use the i3 module
2019-06-02 15:36:26 +02:00
patrick96
7724c4dccb rtd: Use provided version string on rtd
@APP_VERSION@ isn't available on rtd because it doesn't configure the
entire project
2019-05-17 17:03:51 +02:00
Jérôme BOULMIER
28b8877edc cleanup(cmake): remove useless variables (#1767)
They also caused a cmake warning when compiling with debug symbols
2019-05-17 16:51:16 +02:00
patrick96
e1e28f09f3 refactor(build): Remove version number namespace
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.
2019-05-17 16:49:47 +02:00
Sebastian Graf
cb75857ff6 pulse: Set volume to max when the increase was too huge (#1765)
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.
2019-05-14 22:06:14 +02:00
Roberto Santalla
b2b73b5d91 feat(battery): add %percentage_raw% token (#1756)
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
2019-05-14 15:01:54 +02:00
patrick96
65e72fd71e travis: Build documentation 2019-05-10 08:14:02 +02:00
patrick96
4c0117528e build: Allow doc to build as its own project
We can now build the docs without having to have installed all
dependencies for polybar.
2019-05-10 08:14:02 +02:00
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
37a7ad9c44 migration: Update submodule URLs 2019-05-08 12:20:33 +02:00
patrick96
4cc836fa66 migration: Update URLs
jaagr/polybar -> polybar/polybar

Travis changed their url for new projects to travis-ci.com
2019-05-08 12:20:33 +02:00
Sergi Jimenez
9f7840c7d6 fix(build): Uninitialized local variable (#1759)
Fixes #1758
2019-05-05 22:09:03 +02:00
patrick96
f1061e1217 doc: add rtd badge 2019-04-24 08:11:27 +02:00
patrick96
01b326c10f move shell completion to contrib folder
Now the doc folder is exclusively for documentation
2019-04-24 08:11:27 +02:00
patrick96
bfaeb71cb8 build: create config even when docs are disabled
Fixes #1733
2019-04-24 08:11:27 +02:00
patrick96
f68a5e6ccf build: Add build type specific flags to -vvv 2019-04-24 08:11:13 +02:00
patrick96
d5112c9b66 git: Remove include .gitignore
The settings.hpp file is now generated in the build folder and doesn't
need to be included in the gitignore

Ref #1726
2019-04-08 09:01:48 +02:00
patrick96
0ab9fcdc38 refactor: Remove all mentions of icon_t
Is exactly the same label_t
2019-04-08 09:01:48 +02:00
patrick96
148d46b65b build: Remove Makefile from root
Does basically the same as build.sh
2019-04-08 09:01:48 +02:00
patrick96
d1fe97b90f git: Clean up gitignore
Each directory is responsible for ignoring files
2019-04-08 09:01:48 +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
Kazufumi NOTO
7414e98008 feat(temp): Configurable lower bound for ramp (#1706)
Similar to warn-temperature, temps below `base-temperature` will use the first ramp icon.

Closes #1703
2019-04-07 18:36:09 +02:00
Jérôme BOULMIER
fca4151f36 fix(window): remove useless operator= and add default copy cstr (#1729)
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
2019-04-07 17:32:55 +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
7d0c6300f6 cmake: put version string into version.txt 2019-04-05 23:43:37 +02:00
patrick96
72db0538e1 doc: Add copyright 2019-04-05 23:43:37 +02:00
patrick96
bbdcbee068 doc: Make conf.py work on readthedocs
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.
2019-04-05 23:43:37 +02:00
patrick96
3111bee143 doc: Remove sphinx theme from readme
For local previews the sphinx_rtd_theme is not used, only in read the
docs.
2019-04-05 23:43:37 +02:00
patrick96
aec34c11f1 aur: Add python-sphinx to polybar-git makedepends
Not yet to 'polybar' package that will be done in the next release
2019-04-05 23:43:37 +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
1ed8ddd251 travis: Disable doc generation
Travis doesn't have sphinx installed by default and it's also the wrong
version for our documentation
2019-04-05 23:43:37 +02:00
patrick96
a1cccef251 refactor(doc): Use default theme for local builds
The sphinx_rtd_theme takes up about 7.8MB because it includes a lot of
fonts. The default theme only takes 600KB
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
243a6a84a6 refactor(cmake): Use exit code of git describe 2019-04-05 23:43:37 +02:00
patrick96
2c42bae09f refactor(doc): Use cmake APP_VERSION in conf.py
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
2019-04-05 23:43:37 +02:00
patrick96
fc2d2db76f refactor(cmake): Determine version in cmake
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.
2019-04-05 23:43:37 +02:00
patrick96
800d24c92f doc: Add readme with local preview instructions 2019-04-05 23:43:37 +02:00