Implement the possibility to set a workspace open clients automatically in floating mode

Use "wwt" (with workspace: toggle floating) in your configuration file
This commit is contained in:
Michael Stapelberg
2009-06-19 13:20:10 +02:00
parent 4135aaad7c
commit 5c48444b4e
3 changed files with 32 additions and 16 deletions

View File

@ -854,8 +854,31 @@ void parse_command(xcb_connection_t *conn, const char *command) {
return;
}
enum { WITH_WINDOW, WITH_CONTAINER, WITH_WORKSPACE } with = WITH_WINDOW;
/* Is it a <with>? */
if (command[0] == 'w') {
command++;
/* TODO: implement */
if (command[0] == 'c') {
with = WITH_CONTAINER;
command++;
} else if (command[0] == 'w') {
with = WITH_WORKSPACE;
command++;
} else {
LOG("not yet implemented.\n");
return;
}
}
/* Is it 't' for toggle tiling/floating? */
if (command[0] == 't') {
if (with == WITH_WORKSPACE) {
c_ws->auto_float = !c_ws->auto_float;
LOG("autofloat is now %d\n", c_ws->auto_float);
return;
}
if (last_focused == NULL) {
LOG("Cannot toggle tiling/floating: workspace empty\n");
return;
@ -873,21 +896,6 @@ void parse_command(xcb_connection_t *conn, const char *command) {
return;
}
enum { WITH_WINDOW, WITH_CONTAINER } with = WITH_WINDOW;
/* Is it a <with>? */
if (command[0] == 'w') {
command++;
/* TODO: implement */
if (command[0] == 'c') {
with = WITH_CONTAINER;
command++;
} else {
LOG("not yet implemented.\n");
return;
}
}
/* Its a normal <cmd> */
char *rest = NULL;
enum { ACTION_FOCUS, ACTION_MOVE, ACTION_SNAP } action = ACTION_FOCUS;