Using CMAKE_INSTALL_SYSCONFDIR does respect CMAKE_INSTALL_PREFIX, but it
prefixes it to CMAKE_INSTALL_SYSCONFDIR, which results in the default
config being installed to /usr/etc/polybar/config.ini or
/usr/local/etc/polybar/config.ini
CMAKE_INSTALL_FULL_SYSCONFDIR gives an absolute path that respects the
prefix but does the right thing (uses /etc) if it is /usr
Ref: #2770
The module has a poll timeout because it needs to periodically check if
it is shutting down. Otherwise, it would be stuck polling and the bar
couldn't shut down until the script produces a new line.
However, this causes the bar to wake up intermittently (currently
~40/s) due to the 25ms timeout.
Bumping this to 250ms still gives us timely shut downs and caps the
number of wake ups to 4/s.
This is only a stop-gap solution, ideally the script runner is
integrated into the main event loop and uses its polling handles which
don't have to wake up to check for a shutdown.
Ref #1778
Ref #2337
In polybar-msg, the connection handle was captured as a reference to a
shared_ptr, but the shared_ptr went out of scope right after.
This probably always caused UB, but was only noticeable for two or more
instances.
* Return shared_ptr from eventloop
* Add -Wdeprecated-copy-dtor warning
Produces a warning if classes don't have explicit copy operations if
they have a user-defined constructor.
This helps us stick to the rule of 5 (kinda, no warnings for missing
move operators).
* Clean up eventloop
* Fix compiler warnings
* Fix fs_event_handle_t name
* Added format-x support for ipc_module, tested with demo config
* Certain cases not working
* Certain cases not working, build
* Changed label to output tag, Mixing of default formats wont work
* created changelog
The issue has been fixed in the linux kernel version 5.9 and above so we
are removing our workaround for this from polybar.
Users with older versions can still work around this by explicitly
setting `use-actual-brightness` to false, it is just not done by default
anymore.
Closes#2835
Ref https://bugzilla.kernel.org/show_bug.cgi?id=203905
Ref 69d9f4278d
* better fuzzy matching
Improved fuzzy matching so that it finds the longest matching icon instead of the first possible match
* Update CHANGELOG.md
* removed debug output
* added tests and improved fuzzy finder
- added return statements to the fuzzy finder
- added tests to check whether the fuzzy finder works.
* minor style changes
* minor change to iconset.cpp
* Delete tasks.json
The clangformat target updates all files in-place while the
clangformat-dryrun target prints an error message for each format-change
clang-format would apply.
The latter exits with a non-zero error code if there are any changes.
* Use m_connection.poll_for_event
* fix: Handle X events before polling for IO
Polling the XCB file descriptor for X events doesn't detect events that
are already in XCB's event queue but not yet handled.
If this happens, the eventloop polls for IO and the queued events wait
until another event arrives, causing some desyncs in the bar.
This can easily happen if something (e.g. a click event) triggers some
xcb calls, which as a consequence buffer some incoming events.
We "fix" this by adding a libuv prepare handle (which runs right before
polling for IO) that processes pending X events.
The background_manager used the root window depth for creating its
pixmaps, but when the root pixmap has a different depth, this causes the
copy_area_checked call to fail and crash the bar.
We now load the root pixmap before finding the visual and creating the
slice pixmaps.
Fixes#2798
If any rendered text uses a non-integer number of pixels (often emojis),
rendering of subsequent text blocks will start between pixels which
results in small gaps in the background and over/underline colors caused
by cairo only rendering at fractional-intensity in the beginning and end
pixel.
Simply rounding up text width can solve this.
Fixes#2785
* added kelvin option for module/temperature
* changelog for the changes i made
* fixed typos
* fixed the temperature conversion to be more precise
* Update CHANGELOG.md
Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
* changed the calculation of the different temperatures
it now uses float as a initial value and makes m_temp temp_k and temp_f by converting and rounding with std::round
* std::lround makes more sense to use than std::round
Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
Some distro's build infrastructure (e.g. gentoo) can use
CMAKE_INSTALL_PREFIX to install to a different location.
When the config path is hardcoded to /etc, CMAKE_INSTALL_PREFIX has no
effect.
Ref: https://bugs.gentoo.org/858797