Skip to content
Open
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
7 changes: 6 additions & 1 deletion man/waybar-wlr-taskbar.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ Addressed by *wlr/taskbar*
default: false ++
If set to true, always reorder the tasks in the taskbar so that the currently active one is first. Otherwise don't reorder.

*active-last*: ++
typeof: bool ++
default: false ++
If set to true, always reorder the tasks in the taskbar so that the currently active one is last. Otherwise don't reorder.

*sort-by-app-id*: ++
typeof: bool ++
default: false ++
If set to true, group tasks by their app_id. Cannot be used with 'active-first'.
If set to true, group tasks by their app_id. Cannot be used with 'active-first' or 'active-last'.

*on-click*: ++
typeof: string ++
Expand Down
5 changes: 4 additions & 1 deletion src/modules/wlr/taskbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,11 @@ void Task::handle_done() {
button.get_style_context()->remove_class("fullscreen");
}

if (config_["active-first"].isBool() && config_["active-first"].asBool() && active())
if (config_["active-first"].isBool() && config_["active-first"].asBool() && active()) {
tbar_->move_button(button, 0);
} else if (config_["active-last"].isBool() && config_["active-last"].asBool() && active()) {
tbar_->move_button(button, -1);
}

tbar_->dp.emit();
}
Expand Down