mirror of
https://github.com/polybar/polybar.git
synced 2026-03-30 03:56:22 +00:00
feat(conf): Option to always show urgent workspaces in i3 (#2378)
When `pin-workspaces` is set to true using `show-urgent` will show urgent workspaces on the bar even when the workspace is not associated with the current monitor.
This commit is contained in:
@ -16,10 +16,10 @@ namespace i3_util {
|
||||
/**
|
||||
* Get all workspaces for given output
|
||||
*/
|
||||
vector<shared_ptr<workspace_t>> workspaces(const connection_t& conn, const string& output) {
|
||||
vector<shared_ptr<workspace_t>> workspaces(const connection_t& conn, const string& output, const bool show_urgent) {
|
||||
vector<shared_ptr<workspace_t>> result;
|
||||
for (auto&& ws : conn.get_workspaces()) {
|
||||
if (output.empty() || ws->output == output) {
|
||||
if (output.empty() || ws->output == output || (show_urgent && ws->urgent)) {
|
||||
result.emplace_back(forward<decltype(ws)>(ws));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user