Commit Graph

2268 Commits

Author SHA1 Message Date
patrick96
aebdb5328a fix(backlight): Poll if necessary
The `backlight` file seems to not receive modification events for
inotify (it does receive other events though).
These other events still trigger an update, but the value read is still
the old value because the events arrive just slightly before the file is
updated.

The new `poll-interval` setting will inject an event every X seconds to
force an update.
If the actual_brightness file is used, the interval is set to 0 and thus
turned off.

This does not add any more wakeups to the module, the inotify modules
wake up every second anyway and during that time, the interval is
checked.

Fixes #2835
2023-10-21 20:32:11 +02:00
patrick96
278584fa27 feat(doc): Add rtd search extension
Provides real-time search on readthedocs

Ref: https://readthedocs-sphinx-search.readthedocs.io
2023-10-08 21:24:37 +02:00
patrick96
19e8d53320 doc: Explicitly specify sphinx rtd theme dependency
Since August 7, 2023, readthedocs will not install the rtd theme by
default anymore.

Ref: https://blog.readthedocs.com/python-core-requirements-changed/
2023-10-08 21:16:21 +02:00
patrick96
c9752598a5 fix(bspwm): Restack against topmost root window.
The ewmh strategy has to be dropped because the
`_NET_SUPPORTING_WM_CHECK` window may (at least in bspwm) appear
anywhere in the window stack.

To fix the overlapping monitors issue in #2873, we simply restack
against the topmost of these root windows.

Fixes #2972
Fixes #2873 (again)
2023-10-08 21:04:29 +02:00
patrick96
1bfe117c5d Document recommendations for nerd fonts 2023-09-30 19:32:48 +02:00
patrick96
16102c258a alsa: include asoundlib.h instead of all alsa headers
In alsa 1.2.10, the `alsa/control.h` header cannot be included on its
own because it does not include all symbols it uses.

We are basically duplicating asoundlib.h anyway and there is even a
macro variable to switch to it.

Ref: #3009
Ref: https://github.com/alsa-project/alsa-lib/issues/348
2023-09-28 19:30:49 +02:00
patrick96
53661e995a doc: Fix FreeBSD link 2023-08-20 11:59:43 +02:00
patrick96
1043354aec tray: Deprecate all legacy tray settings 2023-08-06 15:26:28 +02:00
patrick96
97ce1f6e7a Add inactive tray module to default config
Replaces the commented out `tray-position`
2023-08-06 15:26:28 +02:00
dvermd
b754790642
Cleanup base::tags (#2991) 2023-07-06 09:46:33 +02:00
Andrew Tran
c747599ef5
fix(tray): check for visibility when docking (#2973)
Fixes #2968
2023-06-13 11:25:36 +02:00
Vincent Bernat
2cd0809a46
fix(randr): avoid querying hardware to get current configuration (#2470)
When using `get_screen_resources`, XRandR will query the hardware to
detect any change. This takes some time.
`get_screen_resources_current` uses the cached information and is
pretty fast.

In my case, the information is always already present in cache because
it was set by the program that did configure the screens (autorandr in
my case, but this applies to most frontends). As polybar is not used
to configure stuff, I think this is fine. There should be something
configuring the screen before polybar is able to use it.

However, maybe some people are using `polybar --list-monitors` just
after plugging a screen. It won't display the new screen in this case.
So, maybe this is not a good idea. It makes polybar starts
faster (500ms faster in my case when there are 3 screens plugged).
Also, I did this change because running `polybar --list-monitor` in
parallel with starting `polybar` (in a for loop for example), I get
some curious bug where my screens disappear and reappear. I don't need
this change as this was easy to fix by avoiding the parallel access to
XRandR properties, but maybe this would avoid other people running
into the same problem.

Your take!
2023-05-18 11:29:30 +02:00
dvermd
06a3de0b89
Refactor config::dereference* (#2963)
* Refactor config::dereference*

* move config::deprecated* implementation to cpp file

* config: move more functions implementation to cpp file
2023-05-18 09:47:45 +02:00
patrick96
ea3eb6eaa4 ci: Update ubuntu version 2023-05-15 14:44:50 +02:00
patrick96
4d1bba2c4e Add changelog 2023-05-15 14:44:50 +02:00
patrick96
2c23f7a87f restack: Make bspwm first try ewmh strategy 2023-05-15 14:44:50 +02:00
patrick96
4f9f07eefd restack: Add ewmh restacking strategy
Positions the bar window above the _NET_SUPPORTING_WM_CHECK window

The generic restacking strategy now first tries the ewmh strategy, the
the bottom strategy.
2023-05-15 14:44:50 +02:00
patrick96
b11a2ff653 restack: Add bottom restacking strategy
For now this is the same as the generic one
2023-05-15 14:44:50 +02:00
patrick96
59acb4150b Clean up restacking code
Restacking algorithms now only need to provide the sibling window and
stacking mode.
2023-05-15 14:44:50 +02:00
patrick96
76c7ee3bf6 Introduce restacking utilities
Aim is to clean up restacking logic and remove some duplicated code
2023-05-15 14:44:50 +02:00
patrick96
f78ec80df3 Add changelog entry 2023-05-10 17:06:00 +02:00
patrick96
425d4dc338 Cleanup 2023-05-10 17:06:00 +02:00
patrick96
32c78aa63a Cleanup ucs4_to_utf8 2023-05-10 17:06:00 +02:00
patrick96
40bc8c7955 Test utf8_to_ucs4 error correction 2023-05-10 17:06:00 +02:00
patrick96
5b1fae4fc1 Make utf8_to_ucs4 take a string reference 2023-05-10 17:06:00 +02:00
patrick96
5e5a0a7c4d Make unicode_charlist a vector 2023-05-10 17:06:00 +02:00
patrick96
c86519f077 test: utf8_to_ucs4 with invalid strings 2023-05-10 17:06:00 +02:00
patrick96
3a27e891d2 fix(renderer): Drop strings with invalid UTF8 2023-05-10 17:06:00 +02:00
patrick96
63443f82d5 Refactor utf8_to_ucs4 2023-05-10 17:06:00 +02:00
patrick96
270c0a340c Add tests for utf8_to_ucs4 2023-05-10 17:06:00 +02:00
patrick96
71c65447f8 Move utf8 conversion code to string utils 2023-05-10 17:06:00 +02:00
patrick96
6e716296ff Formatting 2023-05-10 17:06:00 +02:00
patrick96
d74a4fab77 i3: Better error reporting when connection fails
Prints the output and exit code of 'i3 --get-socketpath' if it fails and
prints the socket path if the connection fails.

Ref polybar/i3ipcpp#13
Ref #2942
2023-05-10 09:42:05 +02:00
dvermd
f5169abde2
Remove unsupported.hpp (#2956)
* Remove unsupported.hpp

* Rename names.hpp to types.hpp

* Replace macro by function

* Add missing cassert include in controller.cpp
2023-05-08 19:36:12 +02:00
Patrick Ziegler
031a29332a
doc: Use readthedocs config file (#2957)
This is the recommended way to configure the project instead of using
the website.

It should also help fix readthedocs/readthedocs.org#10290
2023-05-08 19:13:02 +02:00
dvermd
0caa30683c
Remove config singleton (#2951)
* Remove unused function

* Refactor deprecation warning

* Modules take config as parameter instead of using the singleton

* Bar take config as parameter instead of using the singleton

* Renderer take config as parameter instead of using the singleton

* Legacy Tray Manager take config as parameter instead of using the singleton

* Screen take config as parameter instead of using the singleton

* Controller take config as parameter instead of using the singleton

* Remove the config singleton

* Apply review suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

* Apply style suggestion

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

---------

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
2023-05-01 14:58:52 +02:00
patrick96
61f0e9dd5d fix(tray): Vertically center in inner bar area
The tray should be vertically centered in the inner area of the bar.
Unequal top and bottom borders should not affect the alignment relative
to other text.

Fixes #2950
2023-04-29 14:45:01 +02:00
patrick96
7bc673b8f2 fix(doc): %s in extlinks caption before sphinx 4.0
There is no way to support extlinks with a custom caption in both sphinx
< 4 and >= 4 at the same time without implementing different behavior
per version.
2023-04-20 01:24:02 +02:00
patrick96
89ca0255f1 doc: Fix extlinks %s substitution in caption
Substitutions in the caption are only supported in version 4 of
sphinx.
However, RTD uses sphinx 1.8.6

Just letting it append the value seems to work in both 1.8.6 and newer
versions.
2023-04-18 15:48:38 +02:00
patrick96
cf802ad431 doc: Mention errors and warnings in migration guide 2023-04-18 15:48:38 +02:00
patrick96
dbac7d8ae8 doc: Finish tray migration guide 2023-04-18 15:48:38 +02:00
patrick96
fcef90be24 doc: Start tray migration guide 2023-04-18 15:48:38 +02:00
patrick96
6148bb7f14 doc: Add empty migration page 2023-04-18 15:48:38 +02:00
patrick96
30bb1584fc doc: Add page about default config 2023-04-18 15:48:38 +02:00
patrick96
f3c911991c doc: Document custom directive in python script 2023-04-18 15:48:38 +02:00
patrick96
44b5f87884 doc: Use issue directive to link to issue 2023-04-18 15:48:38 +02:00
patrick96
006e971dad doc: Add module links 2023-04-18 15:48:38 +02:00
patrick96
6e0cff97ff doc(tray): Add type at the beginning 2023-04-18 15:48:38 +02:00
patrick96
fc422b1107 doc: Style external links in RTD theme 2023-04-18 15:48:38 +02:00
patrick96
81684a6c9d doc: Show version in alabaster theme (local builds) 2023-04-18 15:48:38 +02:00