1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-10-27 05:23:39 -04:00
Commit graph

25 commits

Author SHA1 Message Date
the
698b96d17b
feat(backlight): add use-actual-brightness option (#2380)
* add use-actual-brightness option

* added to changelog

* added to changelog 2

* added to changelog 3
2021-02-16 10:02:33 +01:00
zappolowski
99900323b7
feat(conf): Option to always show urgent workspaces in i3 (#2378)
When `pin-workspaces` is set to true using `show-urgent` will show
urgent workspaces on the bar even when the workspace is not associated
with the current monitor.
2021-02-15 21:31:34 +01:00
tchici
c676d7e6f5
add reverse-scroll option for xworkspaces module (#2365)
* add reverse-scroll option for xworkspaces module

* move use of reverse-scroll option to when producing scroll action

* documented xworkspaces reverse-scroll option in changelog
2021-01-28 10:11:33 +01:00
Filip Banák
4ded401aab
Add initial support for an escape character (#2361)
Add a config parser method which, for now, deals only with escaping the
literal backslash character and logs an error message to inform the user
of the coming change.

The error message includes a properly escaped value for the user.

As a result of introducing an escape character('\'):

  - Warn the user of any unescaped backslashes, as they will not be
    treated as a literal character in the future

  - For now, still treat a single backslash as a literal character

  - Treat two consecutive backslashes as a single properly escaped
    literal backslash

Also:
  - Add documentation about the escape character to polybar(5) manpage
  - Add info about the escape character to changelog
  - Add testcases for ParseLineKeyTest
  - Add new test ParseEscapedValueTest

Resolves: First step in #2354

Improve value parsing

 - Take value arg in as an rvalue reference and move parsed value back
 - Remove unnecessary if statement
 - Rename function
 - Improve error message
 - Improve function description
 - Format

Add escape character documentation to manpages

Add information about the escape character to the polybar(5) manpage.

Add info about the esacape character to changelog

Add test cases for ParseLineKeyTest

Fix ParseLineKeyTest test cases

Also make config parser method parse_escaped_value private.

Add tests for escaped_value_parser method

Also remove unsued include statement

Simplify parse_escaped_value in config_parser

Remove unnecessary escaped value generation, so we do not have to keep
track of index differences.

Fix ParseEscapedValueTest test cases

Fix parse_escaped_value

Add more test cases for ParseLineKeyTest

Update CHANGELOG.md

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

Adress review

 - Adjust documentation
 - Small code changes

Improve parse_escaped_value

Add initial support for an escape character

Add a config parser method which, for now, deals only with escaping the
literal backslash character and logs an error message to inform the user
of the coming change.

The error message includes a properly escaped value for the user.

As a result of introducing an escape character('\'):

 - Warn the user of any unescaped backslashes, as they will not be
   treated as a literal character in the future

 - For now, still treat a single backslash as a literal character

 - Treat two consecutive backslashes as a single properly escaped
   literal backslash

Resolves: First step in #2354

Improve value parsing

 - Take value arg in as an rvalue reference and move parsed value back
 - Remove unnecessary if statement
 - Rename function
 - Improve error message
 - Improve function description
 - Format

Add info about the esacape character to changelog

Add test cases for ParseLineKeyTest

Fix ParseLineKeyTest test cases

Also make config parser method parse_escaped_value private.

Add tests for escaped_value_parser method

Also remove unsued include statement

Simplify parse_escaped_value in config_parser

Remove unnecessary escaped value generation, so we do not have to keep
track of index differences.

Fix ParseEscapedValueTest test cases

Add more test cases for ParseLineKeyTest

Adress review

 - Adjust documentation
 - Small code changes

Remove duplicate testcase from ParseLineKeyTest

Add initial support for an escape character

Add a config parser method which, for now, deals only with escaping the
literal backslash character and logs an error message to inform the user
of the coming change.

The error message includes a properly escaped value for the user.

As a result of introducing an escape character('\'):

 - Warn the user of any unescaped backslashes, as they will not be
   treated as a literal character in the future

 - For now, still treat a single backslash as a literal character

 - Treat two consecutive backslashes as a single properly escaped
   literal backslash

Resolves: First step in #2354

Improve value parsing

 - Take value arg in as an rvalue reference and move parsed value back
 - Remove unnecessary if statement
 - Rename function
 - Improve error message
 - Improve function description
 - Format

Fix ParseLineKeyTest test cases

Also make config parser method parse_escaped_value private.

Remove duplicate testcase from ParseLineKeyTest
2021-01-26 19:16:29 +01:00
patrick96
74dcb4649d
Merge branch 'hotfix/3.5.4' 2021-01-07 13:52:28 +01:00
patrick96
fdc670a9dd
Release 3.5.4 2021-01-07 13:44:30 +01:00
Bruno Cooper
7521da900f
Add support for %nwin% in xworkspaces label (#2329)
%nwin% tells the number of windows in a workspace
2021-01-04 10:17:27 +01:00
devsnek
f7c2d83ef2
feat(net): interface discovery (#2025) 2021-01-03 11:48:15 +01:00
Nolan Prochnau
eb302f96ff
Add config option for visiblity (#2320 cont'd) (#2342)
* Add option

* Undo my havoc on the example config

* Update CHANGELOG
2021-01-03 02:43:50 +01:00
Patrick Ziegler
412f4c723f
feat(xworkspaces): Persistent urgent hint (#2340)
* add urgent hint

* feat(xworkspaces): Fully implement urgency hint

Co-authored-by: Jérôme BOULMIER <jerome.boulmier@outlook.fr>
2020-12-31 15:49:39 +01:00
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
bb70b7c743 Cleanup 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
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
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
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
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
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
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