Introduce "--add" for marking windows.
In order to keep compatibility to before allowing multiple marks on a window, we introduce a flag "--add" that must be set to put more than one mark on a window. The default, which is also available as "--replace", keeps the old behavior of overwriting a mark when setting a new one. fixes #2014
This commit is contained in:
@ -115,10 +115,10 @@ void cmd_workspace_back_and_forth(I3_CMD);
|
||||
void cmd_workspace_name(I3_CMD, const char *name);
|
||||
|
||||
/**
|
||||
* Implementation of 'mark [--toggle] <mark>'
|
||||
* Implementation of 'mark [--add|--replace] [--toggle] <mark>'
|
||||
*
|
||||
*/
|
||||
void cmd_mark(I3_CMD, const char *mark, const char *toggle);
|
||||
void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle);
|
||||
|
||||
/**
|
||||
* Implementation of 'unmark [mark]'
|
||||
|
@ -158,13 +158,13 @@ bool con_has_mark(Con *con, const char *mark);
|
||||
* Otherwise, the mark is assigned to the container.
|
||||
*
|
||||
*/
|
||||
void con_mark_toggle(Con *con, const char *mark);
|
||||
void con_mark_toggle(Con *con, const char *mark, mark_mode_t mode);
|
||||
|
||||
/**
|
||||
* Assigns a mark to the container.
|
||||
*
|
||||
*/
|
||||
void con_mark(Con *con, const char *mark);
|
||||
void con_mark(Con *con, const char *mark, mark_mode_t mode);
|
||||
|
||||
/**
|
||||
* If mark is NULL, this removes all existing marks.
|
||||
|
@ -75,6 +75,9 @@ typedef enum { ADJ_NONE = 0,
|
||||
ADJ_UPPER_SCREEN_EDGE = (1 << 2),
|
||||
ADJ_LOWER_SCREEN_EDGE = (1 << 4) } adjacent_t;
|
||||
|
||||
typedef enum { MM_REPLACE,
|
||||
MM_ADD } mark_mode_t;
|
||||
|
||||
/**
|
||||
* Container layouts. See Con::layout.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user