mirror of https://github.com/polybar/polybar.git
Compare commits
7 Commits
5547516e64
...
de5ddc1a48
Author | SHA1 | Date |
---|---|---|
Isak05 | de5ddc1a48 | |
Isak05 | c49c8f3926 | |
patrick96 | ab583b08cd | |
patrick96 | c8f7dc1c14 | |
Patrick Ziegler | 020699724f | |
Patrick Ziegler | 8e04f15ed6 | |
patrick96 | 0ed669f049 |
23
.clang-tidy
23
.clang-tidy
|
@ -32,20 +32,15 @@ Checks: '
|
|||
'
|
||||
|
||||
CheckOptions:
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.ClassConstantCase
|
||||
value: UPPER_CASE
|
||||
- key: readability-identifier-naming.ClassMethodCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.MemberCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.ProtectedMemberPrefix
|
||||
value: 'm_'
|
||||
- key: readability-identifier-naming.PrivateMemberPrefix
|
||||
value: 'm_'
|
||||
cppcoreguidelines-avoid-do-while.IgnoreMacros: true
|
||||
modernize-loop-convert.NamingStyle: lower_case
|
||||
readability-identifier-naming.ClassCase: lower_case
|
||||
readability-identifier-naming.ClassConstantCase: UPPER_CASE
|
||||
readability-identifier-naming.ClassMethodCase: lower_case
|
||||
readability-identifier-naming.MemberCase: lower_case
|
||||
readability-identifier-naming.ProtectedMemberPrefix: 'm_'
|
||||
readability-identifier-naming.PrivateMemberPrefix: 'm_'
|
||||
|
||||
HeaderFilterRegex: ''
|
||||
WarningsAsErrors: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
|
|
|
@ -9,6 +9,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- `custom/script`: When a script with `tail = true` received multiple lines quickly, only the first would get displayed ([`#3117`](https://github.com/polybar/polybar/issues/3117), [`#3119`](https://github.com/polybar/polybar/pull/3119)) by [@Isak05](https://github.com/Isak05)
|
||||
- Token min-length calculations would behave differently when non-ASCII characters appear in the token ([`#3074`](https://github.com/polybar/polybar/issues/3074), [`#3087`](https://github.com/polybar/polybar/pull/3087)) by [@nklloyd](https://github.com/nklloyd)
|
||||
- i3: Fix duplicated rendering for non-full-width bars ([`#3091`](https://github.com/polybar/polybar/pull/3091), [`#3060`](https://github.com/polybar/polybar/issues/3060))
|
||||
- `internal/backlight`: Module could display the literal `%percentage%` token if the backlight reports a value of 0 at startup ([`#3081`](https://github.com/polybar/polybar/pull/3081)) by [@unclechu](https://github.com/unclechu)
|
||||
- `internal/tray`: Fix crash during restarting, when tray icons were not removed proberly ([`#3111`](https://github.com/polybar/polybar/issues/3111), [`#3112`](https://github.com/polybar/polybar/pull/3112))
|
||||
|
||||
## [3.7.1] - 2023-11-27
|
||||
### Build
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
sphinx~=7.2.6
|
||||
sphinx-rtd-theme~=2.0.0rc2
|
||||
sphinx-notfound-page~=1.0.0
|
||||
readthedocs-sphinx-search~=0.3.1
|
||||
readthedocs-sphinx-search~=0.3.2
|
||||
|
|
|
@ -67,7 +67,12 @@ namespace modules {
|
|||
brightness_handle m_val;
|
||||
brightness_handle m_max;
|
||||
|
||||
int m_percentage = 0;
|
||||
/**
|
||||
* Initial value set to a negative number so that any value read from the backlight file triggers an update during
|
||||
* the first read.
|
||||
* Otherwise, tokens may not be replaced
|
||||
*/
|
||||
int m_percentage = -1;
|
||||
|
||||
chrono::duration<double> m_interval{};
|
||||
chrono::steady_clock::time_point m_lastpoll;
|
||||
|
|
|
@ -86,14 +86,6 @@ renderer::renderer(connection& conn, signal_emitter& sig, const config& conf, co
|
|||
{
|
||||
m_pixmap = m_connection.generate_id();
|
||||
m_connection.create_pixmap(m_depth, m_pixmap, m_window, m_bar.size.w, m_bar.size.h);
|
||||
|
||||
uint32_t configure_mask = 0;
|
||||
std::array<uint32_t, 32> configure_values{};
|
||||
xcb_params_cw_t configure_params{};
|
||||
|
||||
XCB_AUX_ADD_PARAM(&configure_mask, &configure_params, back_pixmap, m_pixmap);
|
||||
connection::pack_values(configure_mask, &configure_params, configure_values);
|
||||
m_connection.change_window_attributes_checked(m_window, configure_mask, configure_values.data());
|
||||
}
|
||||
|
||||
m_log.trace("renderer: Allocate graphic contexts");
|
||||
|
@ -372,8 +364,8 @@ void renderer::flush() {
|
|||
highlight_clickable_areas();
|
||||
|
||||
m_surface->flush();
|
||||
// Clear entire window so that the new pixmap is shown
|
||||
m_connection.clear_area(0, m_window, 0, 0, m_bar.size.w, m_bar.size.h);
|
||||
// Copy pixmap onto the window
|
||||
m_connection.copy_area(m_pixmap, m_window, m_gcontext, 0, 0, 0, 0, m_bar.size.w, m_bar.size.h);
|
||||
m_connection.flush();
|
||||
|
||||
if (!m_snapshot_dst.empty()) {
|
||||
|
|
|
@ -82,14 +82,15 @@ namespace drawtypes {
|
|||
|
||||
for (auto&& tok : m_tokens) {
|
||||
string repl{replacement};
|
||||
size_t len = string_util::char_len(repl);
|
||||
if (token == tok.token) {
|
||||
if (tok.max != 0_z && string_util::char_len(repl) > tok.max) {
|
||||
if (tok.max != 0_z && len > tok.max) {
|
||||
repl = string_util::utf8_truncate(std::move(repl), tok.max) + tok.suffix;
|
||||
} else if (tok.min != 0_z && repl.length() < tok.min) {
|
||||
} else if (tok.min != 0_z && len < tok.min) {
|
||||
if (tok.rpadding) {
|
||||
repl.append(tok.min - repl.length(), ' ');
|
||||
repl.append(tok.min - len, ' ');
|
||||
} else {
|
||||
repl.insert(0_z, tok.min - repl.length(), tok.zpad ? '0' : ' ');
|
||||
repl.insert(0_z, tok.min - len, tok.zpad ? '0' : ' ');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -502,7 +502,8 @@ void manager::remove_client(const client& c) {
|
|||
void manager::remove_client(xcb_window_t win) {
|
||||
auto old_size = m_clients.size();
|
||||
m_clients.erase(
|
||||
std::remove_if(m_clients.begin(), m_clients.end(), [win](const auto& client) { return client->match(win); }));
|
||||
std::remove_if(m_clients.begin(), m_clients.end(), [win](const auto& client) { return client->match(win); }),
|
||||
m_clients.end());
|
||||
|
||||
if (old_size != m_clients.size()) {
|
||||
reconfigure();
|
||||
|
@ -518,7 +519,8 @@ void manager::remove_client(xcb_window_t win) {
|
|||
*/
|
||||
void manager::clean_clients() {
|
||||
m_clients.erase(
|
||||
std::remove_if(m_clients.begin(), m_clients.end(), [](const auto& client) { return client.get() == nullptr; }));
|
||||
std::remove_if(m_clients.begin(), m_clients.end(), [](const auto& client) { return client.get() == nullptr; }),
|
||||
m_clients.end());
|
||||
}
|
||||
|
||||
bool manager::change_visibility(bool visible) {
|
||||
|
|
Loading…
Reference in New Issue