fix: lint

This commit is contained in:
Alex
2025-06-22 10:01:36 +02:00
parent f27df33280
commit ee91d18ad9
8 changed files with 50 additions and 55 deletions

View File

@ -66,9 +66,10 @@ auto Language::update() -> void {
void Language::onEvent(const std::string& ev) {
std::lock_guard<std::mutex> lg(mutex_);
std::string kbName(begin(ev) + ev.find_last_of('>') + 1, begin(ev) + ev.find_first_of(','));
// Last comma before variants parenthesis, eg:
// activelayout>>micro-star-int'l-co.,-ltd.-msi-gk50-elite-gaming-keyboard,English (US, intl., with dead keys)
// activelayout>>micro-star-int'l-co.,-ltd.-msi-gk50-elite-gaming-keyboard,English (US, intl.,
// with dead keys)
std::string beforParenthesis(begin(ev), begin(ev) + ev.find_last_of('('));
auto layoutName = ev.substr(beforParenthesis.find_last_of(',') + 1);

View File

@ -791,25 +791,21 @@ void Workspaces::sortSpecialCentered() {
size_t center = normalWorkspaces.size() / 2;
m_workspaces.insert(m_workspaces.end(),
std::make_move_iterator(normalWorkspaces.begin()),
m_workspaces.insert(m_workspaces.end(), std::make_move_iterator(normalWorkspaces.begin()),
std::make_move_iterator(normalWorkspaces.begin() + center));
m_workspaces.insert(m_workspaces.end(),
std::make_move_iterator(specialWorkspaces.begin()),
m_workspaces.insert(m_workspaces.end(), std::make_move_iterator(specialWorkspaces.begin()),
std::make_move_iterator(specialWorkspaces.end()));
m_workspaces.insert(m_workspaces.end(),
std::make_move_iterator(normalWorkspaces.begin() + center),
std::make_move_iterator(normalWorkspaces.end()));
m_workspaces.insert(m_workspaces.end(),
std::make_move_iterator(hiddenWorkspaces.begin()),
m_workspaces.insert(m_workspaces.end(), std::make_move_iterator(hiddenWorkspaces.begin()),
std::make_move_iterator(hiddenWorkspaces.end()));
}
void Workspaces::sortWorkspaces() {
std::ranges::sort( //
m_workspaces, [&](std::unique_ptr<Workspace> &a, std::unique_ptr<Workspace> &b) {
// Helper comparisons