Added config key for default orientation of containers (new_container_orientation) and added support in randr.c for automatically changing the orientation when user does a xrandr rotate.
This commit is contained in:
committed by
Michael Stapelberg
parent
b484ed5f9d
commit
2f992f5c0e
@ -224,6 +224,10 @@ void parse_file(const char *f) {
|
||||
%token TOKCOLOR
|
||||
%token TOKARROW "→"
|
||||
%token TOKMODE "mode"
|
||||
%token TOK_ORIENTATION "new_container_orientation"
|
||||
%token TOK_HORIZ "horizontal"
|
||||
%token TOK_VERT "vertical"
|
||||
%token TOK_AUTO "auto"
|
||||
%token TOKNEWCONTAINER "new_container"
|
||||
%token TOKNEWWINDOW "new_window"
|
||||
%token TOK_NORMAL "normal"
|
||||
@ -249,6 +253,7 @@ line:
|
||||
bindline
|
||||
| mode
|
||||
| floating_modifier
|
||||
| orientation
|
||||
| new_container
|
||||
| new_window
|
||||
| focus_follows_mouse
|
||||
@ -373,6 +378,20 @@ floating_modifier:
|
||||
}
|
||||
;
|
||||
|
||||
orientation:
|
||||
TOK_ORIENTATION WHITESPACE direction
|
||||
{
|
||||
DLOG("New containers should start with split direction %d\n", $<number>3);
|
||||
config.default_orientation = $<number>3;
|
||||
}
|
||||
;
|
||||
|
||||
direction:
|
||||
TOK_HORIZ { $<number>$ = HORIZ; }
|
||||
| TOK_VERT { $<number>$ = VERT; }
|
||||
| TOK_AUTO { $<number>$ = NO_ORIENTATION; }
|
||||
;
|
||||
|
||||
new_container:
|
||||
TOKNEWCONTAINER WHITESPACE TOKCONTAINERMODE
|
||||
{
|
||||
|
Reference in New Issue
Block a user