Commit Graph

1804 Commits

Author SHA1 Message Date
Justin R. St-Amant
5cd7295a41
fix(menu) wrong spacing for left expansion (#1656)
* Fixed minor menu item-spacing issue

* Changes to menu-item spacing as requested

* refactor: Remove redundant else-if condition

Co-authored-by: patrick96 <p.ziegler96@gmail.com>
2020-05-16 23:19:12 +02:00
patrick96
4e9598f09b build: Update i3ipcpp submodule
Fixes a possible memory leak

Ref: polybar/i3ipcpp#10
2020-05-15 14:52:48 +02:00
patrick96
f7dd5041fb aur: Update PKGBUILD for 3.4.3 2020-05-15 14:52:37 +02:00
Jérôme BOULMIER
78b5f88c5f Fix gcc compilation 2020-05-14 22:45:40 +02:00
Jérôme BOULMIER
f016b99e08 Redirect process output to dev null 2020-05-08 23:24:29 +02:00
Jérôme BOULMIER
e9d2f022cd add command unit tests 2020-05-08 23:24:29 +02:00
Jérôme BOULMIER
5e5d8faf04 fix(command): broken pipe when ignoring output. 2020-05-08 23:24:29 +02:00
patrick96
92181fd237 build: Update xpp module
Fixes developer warnings in cmake 3.17+

Ref: polybar/xpp#24
Ref: polybar/xpp#25
2020-05-06 23:25:56 +02:00
patrick96
0dffca98cb xworkspaces: Remove desktop offset member 2020-05-01 18:46:02 +02:00
patrick96
7658c1b9f1 fix(xworkspaces): Assign desktops to correct viewport
Before the module would just try to evenly distribute desktops
(workspaces) among the viewports.

But since `_NET_DESKTOP_VIEWPORT` actually maps desktops to viewports,
we can use that information to assign workspaces to the right viewport.

Fixes #1849
Fixes #1764
2020-05-01 18:46:02 +02:00
Utkarsh Gupta
fc42da812a
doc: Add Debian installation instructions (#2072)
* Add installation instructions for polybar on Debian

Closes: #1054

* Add instructions for stable backports
2020-04-24 22:45:56 +02:00
patrick96
b2613fa269 logger: Use notices for config file and fonts
It is useful for people to see what config file polybar loaded.

For debugging font issues people almost always need to check what fonts
polybar loaded, for that they need to run polybar with info logging. Now
this information is always provided. This requires an update in the font
wiki page.
2020-04-22 00:38:31 +02:00
patrick96
3f60561ae3 logger: Downgrade some warning messages
A warning implies something went wrong and (possibly) the user should do
something about it. However, warnings are not always used this way.

For example:

* When a fallback value for a `${..}` reference is used, this shouldn't
  produce a warning (or notice) since using fallbacks is not something
  bad.
* pulse telling you that it uses the default sink because no sink was
  specified also does not warrant a warning (even notice may be too
  high).
* Whenever polybar shuts down it produces a "Termination signal
  received..." warning. Since there isn't a more proper way to shut down
  polybar, it should not produce a warning. Same argument for a
  `screenchange-reload`
2020-04-22 00:38:31 +02:00
patrick96
cae3848030 logger: Add default logging level 'notice'
Between info and warning. Should be for things the user should be aware
of but not imply anything has to be done about it.
2020-04-22 00:38:31 +02:00
patrick96
ecbe77bbda fix(monitor): Reload when any monitor changes
Before it would only reload if the size changed and even that was
reliable since the method relied on the order of the monitor list.

Now if the monitor list differs in any way (pos, dimension, primary,
output, name) a reload is issued
2020-04-21 23:59:01 +02:00
patrick96
18fc64f881 monitor: Remove sort in get_monitors
The lambda returns the wrong values and sorting isn't really necessary
2020-04-21 23:59:01 +02:00
patrick96
fbbb5922da doc: Reword -m and -M description 2020-04-21 23:59:01 +02:00
patrick96
33b68ec7cb fix(randr): Undefined behavior when removing clones
Because of how monitors are removed inside the loop and depending on the
monitor order a cloned monitor may be assigned a width of 0 but is never
actually removed resulting in polybar saying the bar is out of bounds

Fixes #1794
2020-04-21 23:59:01 +02:00
patrick96
9f7363c9ee bash: Remove tabs 2020-04-21 23:59:01 +02:00
patrick96
52000c194a fix(xrandr): Fetch cloned monitors where possible
Removing monitors is not really necessary when selecting the monitor
where to render the bar or choosing the backlight. Since both monitors
occupy the same coordinates rendering can be done on both and it's
better to give people felxibility for the backlight.

Fixes #1191
2020-04-21 23:59:01 +02:00
patrick96
2edd8275ff Add -M CLI argument to display cloned monitors
Works the same as -m but doesn't purge cloned monitors
2020-04-21 23:59:01 +02:00
patrick96
cc36350849 xrandr: Allow not to purge cloned monitors 2020-04-21 23:59:01 +02:00
patrick96
b5e7078d93 fix(monitor): Remove realloc from get_monitors
Premature optimization that tried to cache monitors but the cache did
not take into account the parameter values.

The call `get_monitors(..., ..., false, true);` would get all connected
and unconncected monitors a subsequent call
`get_monitors(..., ..., true, false);` would get back the same list of
monitors even though it requested only connected monitors.

Additionally `get_monitors` is never called periodically so the
optimization really didn't help much.
2020-04-21 23:59:01 +02:00
Jan Palus
61dfe739d5 net: allow shortening of linespeed to Gbit/s 2020-04-14 01:32:21 +02:00
Lucas Araújo
15496bfb4a
Update: Using another way to authenticate github module (#2029)
The github module only authenticate by query string, and this method is deprecated:
https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api/#authenticating-using-query-parameters


There is no reason to remove it before the method stop working, so I've made possible to the user choose which authentication method he will use:

* The parameter token remain unchanged.
* If the parameter user is passed then the module will use the not deprecated method, passing user and token on the body of the requisition. Otherwise the module will use the deprecated method.

Co-authored-by: Lucas <araujo.lucasvale@gmail.com>

Fixes #2002
2020-03-26 12:50:42 +01:00
patrick96
15e79b09d3 fix(iconset): Try exact match before fuzzy match
If an exact match was possible, fuzzy matching could still return a
non-exact match if it appeared before the exact match in the list of
icons.

Fixes #2041
2020-03-19 20:52:41 +01:00
patrick96
3f7eb1b2aa test(iconset): Add failing fuzzy match test
Ref: #2041
2020-03-19 20:52:41 +01:00
patrick96
853ea994bb build: Update xpp submodule
Fixes #2031

Ref: polybar/xpp#22
Ref: polybar/xpp#23
2020-03-11 09:46:26 +01:00
Lucas Araújo
512c519f25
config: Check if config path exists (#2026)
Closes: #2016

* update: Checks if the configuration file exists

* Update: Removing the logic of the config file search from main.cpp
2020-03-01 22:03:17 +01:00
patrick96
f02fb67020 travis: Add jsoncpp dependency 2020-02-22 18:02:13 +01:00
patrick96
6975c0ec26 build: Update i3ipcpp submodule
With this we no longer distribute the jsoncpp 1.7.7 source with polybar.
It is possible that polybar will no longer build on older systems that
have an ancient version of jsoncpp (>= 5 years).

Ref: polybar/i3ipcpp#9
2020-02-22 18:02:13 +01:00
patrick96
fab8437ff1 doc: Write syntax definition in polybar.5 2020-02-21 16:17:12 +01:00
patrick96
0b713047aa doc: Allow custom SPHINX_BUILD 2020-02-21 16:17:12 +01:00
patrick96
0276d11fd9 config_parser: Improve message for invalid names 2020-02-21 16:17:12 +01:00
Patrick Ziegler
5a695c7065
doc: Update links to https (#2012) 2020-02-21 15:39:39 +01:00
Cooper Pierce
683cfc0738
feat(github): offline label (#1825)
Adds `format-offline` and `label-offline`

* feat(github): offline label & fixes

* Clear label if there are no notifications and empty-notifications = false

* clang-format

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
2020-02-21 13:58:23 +01:00
patrick96
8d2b0d2747 build: Update xpp submodule
Ref: polybar/xpp#21
2020-02-08 17:37:15 +01:00
patrick96
8d07f2aa23 build: Update xpp submodule
PR #1683 downgraded the xpp submodule
2020-01-31 07:12:21 +01:00
patrick96
3854fc91b5 fix(xworkspaces): Show _NET_NUMBER_OF_DESKTOPS desktops
In the case where _NET_NUMBER_OF_DESKTOPS > |_NET_DESKTOP_NAMES|
the last branch of the get_desktop_names method would return a vector
with _NET_NUMBER_OF_DESKTOPS + 1 elements because we iterate until
_NET_NUMBER_OF_DESKTOPS + 1.

Fixes #1983
2020-01-24 16:56:38 +01:00
Jérôme BOULMIER
51f9f35599 cleanup(logger): use universal references to avoid useless copies 2020-01-24 16:32:26 +01:00
Jérôme BOULMIER
982a22cd62 use steady clock instead of system clock 2020-01-23 23:45:56 +01:00
Jérôme BOULMIER
e6e010e45b fix(battery): animation framerate 2020-01-23 23:45:56 +01:00
Christoph Schiessl
d3844c40b6 refactor(battery): simplify animation subthread 2020-01-23 23:45:56 +01:00
patrick96
4ef2bd5575 fix(test): Gtest compilation failure
In master gtest fails to build with the error

/home/travis/build/polybar/polybar/build/googletest-src/googlemock/include/gmock/gmock-more-actions.h:138:1: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
 ACTION_P(ReturnPointee, pointer) { return *pointer; }

We had a lot of failed builds because gtest often breaks stuff in
master. From now on we will just use a release tag. Whenever there is a
new release, we manually update this file.

Ref: google/googletest#2678
2020-01-22 00:33:07 +01:00
Artem Polishchuk
34bb35ca96 Add Fedora installation instructions (#1976) 2020-01-20 11:36:28 +01:00
Gus Caplan
068bf5a311 feat(backlight): Add enable-scroll (#1957)
* backlight: enable changing via scroll

* squash! feedback

* Update src/modules/backlight.cpp

Co-Authored-By: Jérôme BOULMIER <jerome.boulmier@outlook.fr>

Co-authored-by: Jérôme BOULMIER <jerome.boulmier@outlook.fr>
2020-01-15 16:32:17 +01:00
patrick96
0dbcb28a2c fix(net): Query IP addresses for tun/ tap devices
Before tuntap devices would never call the generic `network::query`
method and just return true.

Fixes #1986
2020-01-12 15:03:18 +01:00
patrick96
e43ba9bd3a controller: Stop printing errors for non-unique modules
Functionality-wise reverts the changes from #1534

In #1907 we have decided to allow the same module to appear multiple
times (and deliver actions to all matching modules). But since that PR
will likely take longer to get merged, I want to remove the error from
polybar because the message it prints isn't really true anymore.
2020-01-12 13:08:45 +01:00
Nicholas Baron
8db9c89e0b build: Add -j to build.sh (#1961)
* Added -j and --jobs as command line options

* Added parallelizing option to the set_build_opts function

* Aligned parallel option to the previous options
2020-01-07 16:35:48 +01:00
patrick96
98187debfb font: Show context in unmatched character warning
As suggested by @kronn.

This is a slightly modified patch introduced by @ayosec in their repo
for packaging polybar .deb packages.

Ref: https://github.com/ayosec/polybar-debian
Ref: https://github.com/ayosec/polybar-debian/blob/master/patches/0001-Show-full-contents-when-an-unmatched-character-is-fo.patch
2020-01-07 16:28:07 +01:00