Merge pull request #2496 from Airblader/feature-917

Implement 'swap' command.
This commit is contained in:
Michael Stapelberg
2017-05-15 21:35:10 +02:00
committed by GitHub
13 changed files with 791 additions and 46 deletions

View File

@ -290,6 +290,12 @@ void cmd_move_scratchpad(I3_CMD);
*/
void cmd_scratchpad_show(I3_CMD);
/**
* Implementation of 'swap [container] [with] id|con_id|mark <arg>'.
*
*/
void cmd_swap(I3_CMD, const char *mode, const char *arg);
/**
* Implementation of 'title_format <format>'
*

View File

@ -139,6 +139,12 @@ Con *con_inside_floating(Con *con);
*/
bool con_inside_focused(Con *con);
/**
* Checks if the container has the given parent as an actual parent.
*
*/
bool con_has_parent(Con *con, Con *parent);
/**
* Returns the container with the given client window ID or NULL if no such
* container exists.
@ -461,3 +467,9 @@ void con_force_split_parents_redraw(Con *con);
*
*/
i3String *con_parse_title_format(Con *con);
/**
* Swaps the two containers.
*
*/
bool con_swap(Con *first, Con *second);

View File

@ -157,3 +157,10 @@ void start_nagbar(pid_t *nagbar_pid, char *argv[]);
*
*/
void kill_nagbar(pid_t *nagbar_pid, bool wait_for_it);
/**
* Converts a string into a long using strtol().
* This is a convenience wrapper checking the parsing result. It returns true
* if the number could be parsed.
*/
bool parse_long(const char *str, long *out, int base);