diff --git a/README.md b/README.md index d30d870..e919781 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ was sent beforehand: ## Messages -The syntax for the client is `bspc COMMAND ARGUMENTS...`. +The syntax for the client is `bspc COMMAND ARGUMENTS ...`. The following messages are handled: @@ -80,69 +80,69 @@ The following messages are handled: set SETTING VALUE Set the value of the given setting. - dump - Output the internal representation of the window tree. - - list_monitors [--quiet] - Perform a dump of each monitor. - - list [--quiet] - Perform a dump of each desktop for the current monitor. - - windows - Return the list of managed windows (i.e. their identifiers). - close Close the focused window. kill Kill the focused window. - presel DIR - Switch to manual mode and select the splitting direction. + list + Output the internal representation of the window tree. - ratio VALUE - Set the splitting ratio of the focused window. + list_desktops [--quiet] + Perform a dump of each desktop for the current monitor. + + list_monitors [--quiet] + Perform a dump of each monitor. + + list_windows + Return the list of managed windows (i.e. their identifiers). + + presel left|right|up|down + Switch to manual mode and select the splitting direction. cancel Switch to automatic mode. - focus DIR + ratio VALUE + Set the splitting ratio of the focused window. + + focus left|right|up|down Focus the neighbor node situated in the given direction. - shift DIR + shift left|right|up|down Focus the neighbor node situated in the given direction. - push DIR + push left|right|up|down Push the fence located in the given direction. - pull DIR + pull left|right|up|down Pull the fence located in the given direction. + cycle next|prev [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ] + Focus the next or previous window in the list of leaves. + nearest older|newer [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ] Focus the nearest leaf matching the given constraints. - cycle CYC [--skip-floating|--skip-tiled|--skip-class-equal|--skip-class-differ] - Focus the next or previous window in the list of leaves. - - rotate ROT + rotate clockwise|counter_clockwise|full_cycle Rotate the tree of the current desktop. - magnetise COR + magnetise top_left|top_right|bottom_left|bottom_right Move all the fences toward the given corner. - send_to_monitor MONITOR_NAME - Send the focused window to the given monitor. - send_to DESKTOP_NAME Send the focused window to the given desktop. - use_monitor MONITOR_NAME - Select the given monitor. + send_to_monitor MONITOR_NAME + Send the focused window to the given monitor. use DESKTOP_NAME Select the given desktop. + use_monitor MONITOR_NAME + Select the given monitor. + alternate Alternate between the current and the last focused window. @@ -152,26 +152,26 @@ The following messages are handled: alternate_monitor Alternate between the current and the last focused monitor. - add_in MONITOR_NAME DESKTOP_NAME ... - Make new desktops with the given names in the given monitor. - add DESKTOP_NAME ... Make new desktops with the given names. + add_in MONITOR_NAME DESKTOP_NAME ... + Make new desktops with the given names in the given monitor. + rename_monitor CURRENT_NAME NEW_NAME Rename the monitor named CURRENT_NAME to NEW_NAME. rename CURRENT_NAME NEW_NAME Rename the desktop named CURRENT_NAME to NEW_NAME. - cycle_monitor CYC + cycle_monitor next|prev Select the next or previous monitor. - cycle_desktop CYC [--skip-free|--skip-occupied] + cycle_desktop next|prev [--skip-free|--skip-occupied] Select the next or previous desktop. - layout LYT - Set the layout of the current desktop to LYT. + layout monocle|tiled + Set the layout of the current desktop. cycle_layout Cycle the layout of the current desktop. @@ -197,14 +197,6 @@ The following messages are handled: reload Reload the autostart file and the default settings. -Where - - DIR = left|right|up|down - CYC = next|prev - ROT = clockwise|counter_clockwise|full_cycle - COR = top_left|top_right|bottom_left|bottom_right - LYT = monocle|tiled - ## Settings Colors are either [X color names](http://en.wikipedia.org/wiki/X11_color_names) or '#RRGGBB', booleans are 'true' or 'false'. @@ -288,4 +280,3 @@ libxcb, xcb-util, xcb-util-wm. make make install - diff --git a/messages.c b/messages.c index 5ce56ba..edd5e9f 100644 --- a/messages.c +++ b/messages.c @@ -27,7 +27,7 @@ void process_message(char *msg, char *rsp) char *value = strtok(NULL, TOKEN_SEP); set_setting(name, value, rsp); return; - } else if (strcmp(cmd, "dump") == 0) { + } else if (strcmp(cmd, "list") == 0) { dump_tree(mon->desk, mon->desk->root, rsp, 0); return; } else if (strcmp(cmd, "list_monitors") == 0) { @@ -36,13 +36,13 @@ void process_message(char *msg, char *rsp) if (parse_list_option(arg, &opt)) list_monitors(opt, rsp); return; - } else if (strcmp(cmd, "list") == 0) { + } else if (strcmp(cmd, "list_desktops") == 0) { char *arg = strtok(NULL, TOKEN_SEP); list_option_t opt; if (parse_list_option(arg, &opt)) list_desktops(mon, opt, 0, rsp); return; - } else if (strcmp(cmd, "windows") == 0) { + } else if (strcmp(cmd, "list_windows") == 0) { list_windows(rsp); return; } else if (strcmp(cmd, "close") == 0) {