- `remove_desktop DESKTOP_NAME ...` — Remove the given desktops.
-- `send_desktop_to MONITOR_NAME` — Send the current desktop to the given monitor.
+- `send_desktop_to MONITOR_NAME [--follow]` — Send the current desktop to the given monitor.
- `cycle_monitor next|prev` — Select the next or previous monitor.
.BI remove_desktop " DESKTOP_NAME ..."
Remove the given desktops.
.TP
-.BI send_desktop_to " MONITOR_NAME"
+.BI send_desktop_to " MONITOR_NAME [--follow]"
Send the current desktop to the given monitor.
.TP
.BI cycle_monitor " next|prev"
char *name = strtok(NULL, TOK_SEP);
if (name != NULL) {
monitor_t *m = find_monitor(name);
- if (m != NULL) {
- desktop_hide(mon->desk);
- transfer_desktop(mon, m, mon->desk);
+ if (m != NULL && m != mon) {
+ desktop_t *d = mon->desk;
+ desktop_hide(d);
+ transfer_desktop(mon, m, d);
desktop_show(mon->desk);
- update_current();
+ char *opt = strtok(NULL, TOK_SEP);
+ send_option_t o;
+ if (parse_send_option(opt, &o) && o == SEND_OPTION_FOLLOW)
+ focus_node(m, d, d->focus);
+ else
+ update_current();
}
}
return;