} else if (strcmp(cmd, "list_windows") == 0) {
list_windows(rsp);
return;
+ } else if (strcmp(cmd, "list_history") == 0) {
+ char *name = strtok(NULL, TOK_SEP);
+ if (name != NULL) {
+ desktop_location_t loc;
+ if (locate_desktop(name, &loc))
+ list_history(loc.desktop, rsp);
+ } else {
+ list_history(mon->desk, rsp);
+ }
+ return;
} else if (strcmp(cmd, "list_rules") == 0) {
list_rules(rsp);
return;
swap_nodes(mon->desk->focus, n);
}
} else {
- swap_nodes(mon->desk->focus, mon->desk->last_focus);
+ swap_nodes(mon->desk->focus, history_get(mon->desk->history, 1));
}
} else if (strcmp(cmd, "alternate") == 0) {
- focus_node(mon, mon->desk, mon->desk->last_focus, true);
+ focus_node(mon, mon->desk, history_get(mon->desk->history, 1), true);
return;
} else if (strcmp(cmd, "alternate_desktop") == 0) {
select_desktop(mon->last_desk);