Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules/hyprland/workspace: ignore empty window-rewrite #3407

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions man/waybar-hyprland-workspaces.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Addressed by *hyprland/workspaces*
Regex rules to map window class to an icon or preferred method of representation for a workspace's window.
Keys are the rules, while the values are the methods of representation. Values may use the placeholders {class} and {title} to use the window's original class and/or title respectively.
Rules may specify `class<...>`, `title<...>`, or both in order to fine-tune the matching.
You may assign an empty value to a rule to have it ignored from generating any representation in workspaces.

*window-rewrite-default*:
typeof: string ++
Expand Down
6 changes: 5 additions & 1 deletion src/modules/hyprland/workspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ void Workspace::initializeWindowMap(const Json::Value &clients_data) {

void Workspace::insertWindow(WindowCreationPayload create_window_paylod) {
if (!create_window_paylod.isEmpty(m_workspaceManager)) {
m_windowMap[create_window_paylod.getAddress()] = create_window_paylod.repr(m_workspaceManager);
auto repr = create_window_paylod.repr(m_workspaceManager);

if (!repr.empty()) {
m_windowMap[create_window_paylod.getAddress()] = repr;
}
}
};

Expand Down
Loading