kill
Kill the focused window.
- send_to DESKTOP_NAME
+ send_to DESKTOP_NAME [--follow]
Send the focused window to the given desktop.
- send_to_monitor MONITOR_NAME
+ send_to_monitor MONITOR_NAME [--follow]
Send the focused window to the given monitor.
use DESKTOP_NAME
.BI kill
Kill the focused window.
.TP
-.BI send_to " DESKTOP_NAME"
+.BI send_to " DESKTOP_NAME [--follow]"
Send the focused window to the given desktop.
.TP
-.BI send_to_monitor " MONITOR_NAME"
+.BI send_to_monitor " MONITOR_NAME [--follow]"
Send the focused window to the given monitor.
.TP
.BI use " DESKTOP_NAME"
if (m != NULL && m != mon) {
transfer_node(mon, mon->desk, m, m->desk, mon->desk->focus);
arrange(m, m->desk);
+ char *arg = strtok(NULL, TOK_SEP);
+ send_option_t opt;
+ if (parse_send_option(arg, &opt) && opt == SEND_OPTION_FOLLOW)
+ select_monitor(m);
}
}
} else if (strcmp(cmd, "send_to") == 0) {
transfer_node(mon, mon->desk, loc.monitor, loc.desktop, mon->desk->focus);
if (mon != loc.monitor && loc.monitor->desk == loc.desktop)
arrange(loc.monitor, loc.desktop);
+ char *arg = strtok(NULL, TOK_SEP);
+ send_option_t opt;
+ if (parse_send_option(arg, &opt) && opt == SEND_OPTION_FOLLOW) {
+ select_monitor(loc.monitor);
+ select_desktop(loc.desktop);
+ }
}
}
} else if (strcmp(cmd, "rename_monitor") == 0) {
return false;
}
+bool parse_send_option(char *s, send_option_t *o)
+{
+ if (s == NULL) {
+ *o = SEND_OPTION_DONT_FOLLOW;
+ return true;
+ } else if (strcmp(s, "--follow") == 0) {
+ *o = SEND_OPTION_FOLLOW;
+ return true;
+ }
+ return false;
+}
+
bool parse_rotate(char *s, rotate_t *r)
{
if (strcmp(s, "clockwise") == 0) {
bool parse_cycle_direction(char *, cycle_dir_t *);
bool parse_circulate_direction(char *, circulate_dir_t *);
bool parse_list_option(char *, list_option_t *);
+bool parse_send_option(char *, send_option_t *);
bool parse_skip_client(char *, skip_client_t *);
bool parse_skip_desktop(char *, skip_desktop_t *);
bool parse_rotate(char *, rotate_t *);