Commit Graph

2016 Commits

Author SHA1 Message Date
Nolan Prochnau
8e46e54cb3
feat: Module Visibility (#2320)
Modules can now also be shown and hidden using ipc commands:

    $ polybar-msg [-p PID] cmd hide.mymodule # Hides module mymodule
    $ polybar-msg [-p PID] cmd show.mymodule # Shows module mymodule
    $ polybar-msg [-p PID] cmd toggle.mymodule # Toggles visibility of mymodule

* Hopefully implement visibility checking

* Implement hide command

* Implement `show` and `toggle` commands

* Refactor and add some logging

* Run style checks and update CHANGELOG

* Get around unused parameter warnings

* Change `set_visible` to return nothing

* Make errors more informative

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Update bar when changing module visibility

- Called in the module to maintain dependence on the signal emitter
- Update CHANGELOG to make changes more verbose

* wrong var

* Update include/modules/unsupported.hpp

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
2020-12-27 16:05:26 +01:00
patrick96
e30d2c4c1f Remove tag compaction "optimizations"
The intention was to remove tags that won't have an effect and join
together consecutive tags.
However the patterns used can just as well appear in regular text, so
this can replace characters inside user defined text and not just
formatting tags.

Fixes #2331
2020-12-25 00:33:32 +01:00
patrick96
b49f325e1e doc: Add language to code-blocks 2020-12-24 12:46:02 +01:00
patrick96
6479ebc83f ci: Make sphinx warnings errors 2020-12-24 12:46:02 +01:00
patrick96
bb70b7c743 Cleanup 2020-12-24 02:20:38 +01:00
patrick96
17f4dfd342 cmake: Use lists 2020-12-24 02:20:38 +01:00
patrick96
3c51a1d955 cmake: Remove empty files 2020-12-24 02:20:38 +01:00
patrick96
74903d49a7 cmake: Mark checklib variables as advanced 2020-12-24 02:20:38 +01:00
patrick96
64e246e734 cmake: Add option to enable/disable shell files 2020-12-24 02:20:38 +01:00
patrick96
9d47b83697 cmake: Add option to enable/disable sample config 2020-12-24 02:20:38 +01:00
patrick96
ddfec6fc8f build: Add option to enable/disable html/manpages 2020-12-24 02:20:38 +01:00
patrick96
c3fbd1e3e8 ci: Add job for polybar-msg 2020-12-24 02:20:38 +01:00
patrick96
923d9ae061 Add cmake files for configuring individual targets
This makes the code a bit less messy. We barely need if(BUILD_...)
guards inside the cmake files, just the root CMakeLists.txt.
2020-12-24 02:20:38 +01:00
patrick96
20c88ca977 ci: Use libnl 2020-12-24 02:20:38 +01:00
patrick96
c24a6999a4 refactor(cmake): Allow targets to be enabled individually
Each major target of polybar can now be enabled/disabled while
configuring (even polybar itself).

The cmake code specific to each target will only run if the target is
enabled.

This allows us to for example just build the documentation without
having to run all the cmake code related to compilation or having the
polybar dependencies installed (other than sphinx).
2020-12-24 02:20:38 +01:00
patrick96
771154742c cmake: Use CMAKE_CXX_COMPILER_LAUNCHER for ccache 2020-12-24 02:20:38 +01:00
patrick96
16b2970bd7 build: Bump cmake version to 3.5.0
This includes the changes from polybar/xpp#30 which also updates the
minimum cmake version in the xpp submodule
2020-12-24 02:20:38 +01:00
Patrick Ziegler
7d1b265ef4
Update PKGBUILD for 3.5.3 (#2327) 2020-12-23 17:56:48 +01:00
Kamui
89a723a4d9
feat(config): Try to load config.ini (#2324)
* Added .ini extension check to default config

* Added change to changelog and man page

* Added change to changelog and man page

* removed .vscode folder

* removed new lines in changelog
2020-12-23 17:52:30 +01:00
patrick96
218911c463
Merge remote-tracking branch 'origin/hotfix/3.5.3' 2020-12-23 17:42:12 +01:00
patrick96
64649a1e47
Release 3.5.3 2020-12-23 17:36:20 +01:00
Patrick Ziegler
eee22cb351 Create FUNDING.yml 2020-12-23 17:27:36 +01:00
patrick96
1dc8d2f30e cmake: Make xrandr and xcomposite required
They were required before, but could technically be deactived (the
compilation would fail, but configuration was possible).

The WITH_XRANDR and WITH_XCOMPOSITE now no longer appear in the cmake
part. It still appears in the source code, but is always set to 1

Fixes #1536
2020-12-22 00:37:07 +01:00
patrick96
374716d329 cmake: Remove unused variables 2020-12-22 00:37:07 +01:00
patrick96
dc8d7fd0e0 Add documentation 2020-12-22 00:37:07 +01:00
patrick96
fd2edfdc08 cmake: Display package versions in summary 2020-12-22 00:37:07 +01:00
patrick96
84da909b47 Fix FindXcb not doing version checks for components
Version checks for FindXcb only make sense if all components have the
same version or only a single component is specified
2020-12-22 00:37:07 +01:00
patrick96
ade8b40b36 cmake: Fix find_package_handle_standard_args warning 2020-12-22 00:37:07 +01:00
patrick96
4f2a145f4f cmake: Update list of source files 2020-12-22 00:37:07 +01:00
Jérôme BOULMIER
cb0aeacbf2 refactoring find packages 2020-12-22 00:37:07 +01:00
Jérôme BOULMIER
b143e43491 enhancement(cmake): remove all mentions of "dirs" variable 2020-12-22 00:37:07 +01:00
Jérôme BOULMIER
cb47512871 feat(cmake): removing warnings in dependencies. 2020-12-22 00:37:07 +01:00
Jérôme BOULMIER
cb728ac7c4 fix(cmake): restoring output directory 2020-12-22 00:37:07 +01:00
Jérôme BOULMIER
bb5cf0113e fix(x11): Don't include composite when disabled 2020-12-22 00:37:07 +01:00
Jérôme BOULMIER
31fafa86f7 feat(cmake): removing globs and using imported targets 2020-12-22 00:37:07 +01:00
Patrick Ziegler
9d52408cad
Add links to polybar collective (#2318) 2020-12-21 16:27:04 +01:00
Patrick Ziegler
35f3d7a2cb
readme: Add downloads badge (#2317) 2020-12-19 23:24:23 +01:00
Nolan Prochnau
0d2838fcd5
feat(xkeyboard): Add variant support to layout label (#2163)
* Add variant support to xkeyboard layout label

Solves #316

* Run style checks, I guess?

* Add comment

* Return nothing if there is no variant

* Update CHANGELOG
2020-12-19 18:22:27 +01:00
Patrick Ziegler
33e691301d
fix(config): Don't treat an empty value as invalid (#2315)
An empty color value in the config should be treated as if no color was
specified (explicitly). This is the same behavior as before.
2020-12-18 23:33:03 +01:00
Filip Banák
6f13fe93a3
xkeyboard: Fix indicator spacing (#2306)
* Fix xkeyboard module spacing between the layout and indicators when indicators are empty.

* Simplify the empty label check.

* Remove permanently enabled SCROLL_LOCK, sorry.

* Another mistake.

* Update src/modules/xkeyboard.cpp

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Update src/modules/xkeyboard.cpp

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Update.

* Fix xkeyboard module spacing between the layout and indicators, when indicators are empty. And fix the spacing between indicators when some are empty.

* Add issue #2292 to fixed.

* Update CHANGELOG.md

Co-authored-by: Filip Banák <6111455-Filip62@users.noreply.gitlab.com>
Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
2020-12-17 20:49:10 +01:00
Patrick Ziegler
fd556525a8
New Tag Parser (#2303)
* refactor(color): Use enum class for color type

* Add testcases for tag parser

* Make tag parser a pull-style parser

Being able to parse single elements at a time gives us more fine-grained
error messages, we can also parse as much as possible and only stop
after an exception.

* fix(color): Parser did not check for invalid chars

* tag parser: First full implementation

* tag parser: Fix remaining failing tests

* tag parser: Replace old parser

* tag parser: Treat alignment as formatting tag

Makes the structure less complex and the alignment tags really are
formatting tags, they are structurally no different from the %{R} tag.

* tag parser: Cleanup type definitions

All type definitions for tags now live in tags/types.hpp, the parser.hpp
only contains the definitions necessary for actually calling the parser,
this shouldn't be included in many places (only places that actually do
parsing). But many places need the definitions for the tags themselves.

* Rename components/parser to tags/dispatch

* tag parser: Cleanup

* Add changelog
2020-12-17 20:37:28 +01:00
Patrick Ziegler
1bf89e8b76
fix(docs): Support out-of-tree builds (#2312)
Searching up from the conf.py only works if it is inside the repository
and not for out-of-tree builds (because conf.py gets configured in the
build directory).
2020-12-17 14:02:48 +01:00
Patrick Ziegler
cec463e830
doc: Don't use git for checking version number (#2311)
If git is not available (and it doesn't have to be when building from a
source archive) building the documentation fails because we use
`git rev-parse` to determine whether a certain version is unreleased.

We now use the version.txt file to do this check

This uses the packaging library, but this should not introduce a new
dependency because sphinx depends on setuptools which also depends on
that library.

Fixes #2309
2020-12-17 05:12:09 +01:00
Patrick Ziegler
c07cc09a5f
doc: Add changelog to CONTRIBUTING.md TOC (#2310) 2020-12-17 02:17:56 +01:00
Patrick Ziegler
d63bf294b7
Adopt "keep a changelog" (#2308)
* Adopt keep a changelog

Ref: https://keepachangelog.com/en/1.0.0/

* Add changelog to release and contributing docs

* Use H2 for automatically added Download section

The individual changelog subsections use H3 and the changelog section
uses H2, so the Download section should use the same heading

* Add already present changes to changelog

* Mention changelog issue references in CONTRIBUTING.md
2020-12-16 16:04:10 +01:00
patrick96
680bb2d5e4 codecov: Disable pull request annotations
Codecov would add code comments (annotations) to PR diffs whenever a
line was not covered by tests. This isn't really useful to us right now
and just produces noise.
2020-12-16 00:06:10 +01:00
patrick96
433a313782 codecov: Recursively ignore test and lib folder
It seems that tests/* and lib/* don't actually exclude all the files in
codecov
2020-12-15 01:47:32 +01:00
patrick96
6afe6581e1 aur: Update PKGBUILD for 3.5.2 release 2020-12-14 11:10:27 +01:00
patrick96
4d2bdaa0bd
Merge branch 'hotfix/3.5.2' 2020-12-14 10:53:13 +01:00
patrick96
3eda8832b9
Release 3.5.2
Changelog

**Fixes**

Legacy action name support was accidentally broken in 3.5.1 (#2296), see #2299
2020-12-14 10:45:29 +01:00