Commit Graph

1446 Commits

Author SHA1 Message Date
Patrick Ziegler
c3ef99b719
Release 3.3.0 (#1543)
### Breaking Changes:
None

### Changelog

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

In the `[settings]` section:
* `pseudo-transparency`

In `internal/cpu`:
* `ramp-coreload-spacing`, spacing between elements in `<ramp-coreload>` elements
* `%percentage-sum%` in `label`. Shows sum of all percentages

In `custom/script`:
* `double-click-left`
* `double-click-middle`
* `double-click-right`

In `internal/pulseaudio`:
* `interval`, volume increase and decrease steps in percentage points

In `internal/memory`:
* `bar-swap-used`
* `bar-swap-free`
* `ramp-swap-used`
* `ramp-swap-free`

**Deprecations**
* `tray-transparent` in the bar section is no longer used. The tray now always uses pseudo-transparency

**Features**
* volume: adjustable volume steps (#1364), see #1361
* memory: Add progress bars and ramps for swap (#1325)
* render: pseudo-transparency (always used in the tray)  (#595)
* cpu: 
    * Configurable spacing in between coreloads (#1472), see #1389
    * Non-normalized cpu load (#1517), see #1516
* script: Double click actions (#1442)
* net: Support for bridge interfaces (#1528), see #1522
* token: zero pad tokens when min-width value starts with a `0` (#1341), see #1332

**Fixes**
* config: Use font patterns detected on system in sample config (#1350)
* net: Disconnected module when SSID is only an emoji (#1371), see #1367
* tray: Tray overlapping with bar (#1392), see #591
* build: Several build errors (#1395, #1454, #1470, jaagr/xpp#12, #1493), see #1447, #1469, #750, #1492
* mpd: format-online-prefix not working (#1402), see #1399
* font: Crash for some font-patterns (#1451), see #1435
* script: 
    * Only `%counter%` or `%pid%` token usable, never both (#1456)
    * click actions with colons in them (#1457), see #984
* renderer: Bar locks up when xorg composite extension is disabled (#1430), see #1425
2018-12-23 21:36:30 +01:00
infokiller
bc9eddfcae fix(git): Don't ignore build.sh (#1545) 2018-12-12 21:27:46 +01:00
Sergey
cc8947ac01 feat(cpu): Add percentage-sum token (#1517)
Adds `%percentage-sum%` token to cpu label that contains the cumulative load of all cores.
2018-12-03 01:48:18 +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
patrick96
9725f8fb04 coverage: Allow small drops in coverage
Most PRs change code where no tests have been written so far and where
adding tests is difficult. Codecov fails all those PRs.

These values should be adjusted once we have better integrated testing
into our workflow and have written better testing infrastructure for
modules and very tightly coupled components
2018-11-30 11:55:31 -08:00
patrick96
6f88fe11a9 fix(man): Add correct date and version to manpage
The previous approach relied on manually updating the version and date
using a Makefile

This approach dynamically gathers the correct version from git and uses
the date of the latest commit in the branch
2018-11-30 11:50:40 -08:00
patrick96
669469f149 man: Remove manpages Makefile
Wasn't used in the build process
2018-11-30 11:50:40 -08:00
sunil
22af69545a feat(net): Support bridge interfaces (#1528)
Bridge interfaces don't provide linkspeed via ethtool but everything else works the same as with ethernet links.

Fixes #1522
2018-11-28 16:09:00 +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
f8e4a5932a refactor: Unescape action cmd before emitting 2018-11-16 18:12:26 -08:00
patrick96
38f551f884 test(parser): Add tests for parse_action_cmd 2018-11-16 18:12:26 -08:00
patrick96
18e2609f11 fix(builder): Escape all colons in action command
Fixes #984
2018-11-16 18:12:26 -08:00
Denis Kasak
fa693aecf8 feat(script): Add double-click to script module (#1442) 2018-11-16 16:06:04 +01:00
Matthew Treadwell
bf0b663549 Center logo and badges (#1420) 2018-11-11 15:18:36 +01:00
patrick96
6ca4f06785 doc: Convert @ to \ doxygen commands
Ref #1377
2018-11-04 19:28:27 -08:00
NBonaparte
07d35df538 fix(net): make sure WITH_LIBNL is defined before checking 2018-11-01 19:50:33 +01:00
patrick96
01f4957485 fix(font): Check FcNameParse return value
If FcNameParse returns NULL FcDefaultSubstitute segfaults

We log and throw an error here because the signal emitter swallows all
exceptions so if that exception was thrown, the bar would stop rendering
without any indication as to why.

Fixes #1435
2018-10-31 17:13:57 -07:00
patrick96
3c504bb913 fix(build): remove side-effects of iwlib.h
wireless_tools 29 redefines inline in iwlib.h as:
    #define inline inline __attribute__((always_inline))

which conflicts with POLYBAR_NS, which is defined as:

    #define POLYBAR_NS    \
      namespace polybar { \
        inline namespace APP_VERSION_NAMESPACE {

In version 30.pre9 this #define is moved into a source file and thus
cannot conflict.

The error only occurs when building with clang, so it seems gcc and
clang handle this differently

Fixes #1492
2018-10-31 17:00:13 -07:00
patrick96
152125dce9 git(xpp): Update submodule ref
This contains the fix for the xml proto file directory on exherbo

Fixes #750
2018-10-17 23:07:05 -07:00
patrick96
3b32f5899a fix: Move return value of parse_layout_symbol
Fixes #1469
2018-10-16 11:05:14 -07:00
Matthias Viehweger
5f23114cab Accept a locally existing build-directory (#1476)
A message is emitted and there the '--force' is still honored. However,
if people want to reuse the build-directory to reduce recompile-times,
this give them the rope they ask for.
2018-10-16 18:14:03 +02:00
Patrick Ziegler
b80023fd41
feat(cpu): Add ramp-coreload-spacing (#1472)
Resolves #1389
2018-10-16 01:11:05 +02:00
Patrick Ziegler
6d0cfbdfde Revert "feat(cpu): Add ramp-coreload-spacing (#1472)"
This reverts commit 06adef1055.
2018-10-16 01:01:11 +02:00
Ryan Geary
06adef1055 feat(cpu): Add ramp-coreload-spacing (#1472)
Resolves #1389
2018-10-16 00:59:45 +02:00
patrick96
abdd5f9233 fix(script): Avoid duplicate action tags for tailed
If a tailed command is used polybar would generate two action tags, one
with %counter% replaced and one with %pid% replaced, but never both

This is a bug that was introduced in #934
2018-10-08 21:38:25 -07:00
patrick96
13b0ee7454 tray: Properly deprecate tray-transparent 2018-10-04 15:52:03 +02:00
Benno Fünfstück
70807a5a9f fix(renderer): remove debug code, add comment 2018-10-04 15:52:03 +02:00
Benno Fünfstück
6237e2d419 fix(renderer): fix pseudo-transparency wrong compositing
The idea is that pseudo-transparency should behave like real transparency as
much as possible. To achieve this, we now render the bar the same way in both
cases. The only part where pseudo-transparency differs is at the very end, where
the rendered bar is captured and composited against the desktop background
image. This should ensure that both modes behave the same.
2018-10-04 15:52:03 +02:00
Benno Fünfstück
9a92772617 fix(renderer): default m_comp_bg to OVER if pseudo-transparent 2018-10-04 15:52:03 +02:00
Benno Fünfstück
b20ad041e9 docs(signal): document newly added signals 2018-10-04 15:52:03 +02:00
Benno Fünfstück
2d385150bd fix(background_manager): more cleanup in deactivate
This has no effects on bar behaviour, as `deactivate` is currently not used anywhere.
2018-10-04 15:52:03 +02:00
Benno Fünfstück
15b84dda07 docs(background_manager): add comments 2018-10-04 15:52:03 +02:00
Benno Fünfstück
4221da71bf fix(renderer): render transparent blocks correctly
This reverts some behaviour differences introduced by the pseudo-transparency
implementation. The new implementation is much closer to the
non-pseudo-transparent case and thus keeps original behaviour.

For the new method we simply fill the bar with the background image fetched from
the root window if in pseudo-transparent mode, otherwise we do nothing. This
means that everything will work as in the fully-transparent mode.
2018-10-04 15:52:03 +02:00
Benno Fünfstück
35aca5b368 fix(tray): correctly compute background for tray if bar pos != (0,0)
We need to use positions relative to the position of the bar for indexing into
the background image slice, but the code used absolute ones.

This worked fine as long as absolute positions are the same as relative
positions (this is the case for a bar located at (0,0), so if bottom = false).
But for bottom bars (where the bar position is not (0,0)) this was wrong which
caused the tray background to be black (out of bounds for the background slice).
2018-10-04 15:52:03 +02:00
Benno Fünfstück
eacf5ce5ba fix(tray): fix transparency after background manager changes
The systray only supports pseudo transparency (real transparency would require
much larger changes) so the real transparency should only be used for the bar itself.
2018-10-04 15:52:03 +02:00
Benno Fünfstück
061fe83b2f feat(background_manager): option to disable pseudo-transparency
This adds a new config option to select between pseudo transparency and real transparency.
2018-10-04 15:52:03 +02:00
Benno Fünfstück
59c0ccef50 fix(tray): remove tray-transparent option
This option is no longer necessary because the tray background color can now
simply be set to any (semi-)transparent color (just like the bar background).
2018-10-04 15:52:03 +02:00
Benno Fünfstück
66cf9b8b99 docs(renderer): fix stale comment 2018-10-04 15:52:03 +02:00
Benno Fünfstück
e4b0a5445f style(background_manager): use brace initialization 2018-10-04 15:52:03 +02:00
Benno Fünfstück
51d58e7518 fix(render): support stacked bars
We now take the bar position that the window manager gives us instead of trying
to calculate it ourselves. This is more correct when multiple bars are attached
to the same edge, as the window manager may move some of them in that
case (assuming override redirect is not enabled)
2018-10-04 15:52:03 +02:00
Benno Fünfstück
eb742e228b fix(render): correctly handle semi-transparency for borders
We need to fetch the outer area from the root window, not just the inner area
because we paint the background below the borders as well.

This has the nice effect of supporting semi-transparency for borders as well.
2018-10-04 15:52:03 +02:00
Benno Fünfstück
3de914abca feat(render): support pseudo-transparency
This adds pseudo-transparency for the background of the bar and the
background of the systray.
2018-10-04 15:52:03 +02:00
james9837
654c667698 fix(build): replace caddr_t with char* (#1454)
caddr_t isn't defined on all systems

Fixes #1447
2018-10-03 16:35:31 +02:00
Vasili Karaev
2fba443f56 fix(cpu): Replace %percentage-cores% normally (#1282) 2018-09-19 19:58:09 -07: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
patrick96
fbc5a9fb7f doc: List xcb-xkb as optional dependency 2018-09-17 23:22:27 -07:00
patrick96
b9777a48c5 readme: format dependencies 2018-09-17 23:22:27 -07:00
patrick96
6df18fc8b3 readme: Remove GetDeb mention
GetDeb.net has been offline for a month and isn't looking like coming
back up. Now there isn't even a DNS record anymore.
2018-09-16 20:21:10 -07:00
Roel Postelmans
11d66ee78d feat(mem): Add ramp and bar for swap (#1325)
Now all the tokens in the memory module also have ramp and bar counterparts.

These can be used exactly the same as `bar-used` and `ramp-used`, they are named `<bar-swap-used>`, `<bar-swap-free>`, `<ramp-swap-used>`, and `<ramp-swap-free>`
2018-09-14 20:42:04 +02:00
Vasili Karaev
a2ab4699ab refactor(temperature): Do not use 'm_' prefix with local variable 2018-09-04 14:07:22 -07:00