+ move_fence(mon->desk->focus, d, m);
+ }
+ }
+ } else if (strcmp(cmd, "drop_to_monitor") == 0) {
+ char *dir = strtok(NULL, TOK_SEP);
+ if (dir != NULL) {
+ cycle_dir_t d;
+ if (parse_cycle_direction(dir, &d)) {
+ monitor_t *m;
+ if (d == CYCLE_NEXT)
+ m = ((mon->next == NULL ? mon_head : mon->next));
+ else
+ m = ((mon->prev == NULL ? mon_tail : mon->prev));
+ transfer_node(mon, mon->desk, m, m->desk, mon->desk->focus);
+ arrange(m, m->desk);
+ char *opt = strtok(NULL, TOK_SEP);
+ send_option_t o;
+ if (parse_send_option(opt, &o) && o == SEND_OPTION_FOLLOW)
+ select_monitor(m);
+ }
+ }
+ } else if (strcmp(cmd, "send_to_monitor") == 0) {
+ char *name = strtok(NULL, TOK_SEP);
+ if (name != NULL) {
+ monitor_t *m = find_monitor(name);
+ if (m != NULL && m != mon) {
+ transfer_node(mon, mon->desk, m, m->desk, mon->desk->focus);
+ arrange(m, m->desk);
+ char *opt = strtok(NULL, TOK_SEP);
+ send_option_t o;
+ if (parse_send_option(opt, &o) && o == SEND_OPTION_FOLLOW)
+ select_monitor(m);
+ }
+ }
+ } else if (strcmp(cmd, "drop_to") == 0) {
+ char *dir = strtok(NULL, TOK_SEP);
+ if (dir != NULL) {
+ cycle_dir_t c;
+ if (parse_cycle_direction(dir, &c)) {
+ desktop_t *d;
+ if (c == CYCLE_NEXT)
+ d = ((mon->desk->next == NULL ? mon->desk_head : mon->desk->next));
+ else
+ d = ((mon->desk->prev == NULL ? mon->desk_tail : mon->desk->prev));
+ transfer_node(mon, mon->desk, mon, d, mon->desk->focus);
+ char *opt = strtok(NULL, TOK_SEP);
+ send_option_t o;
+ if (parse_send_option(opt, &o) && o == SEND_OPTION_FOLLOW)
+ select_desktop(d);