CONFIG BREAK: rename 'mode floating/tiling' to 'floating enable/disable'
The three different variants now: floating enable floating disable floating toggle
This commit is contained in:
parent
9bbb37bb55
commit
bd49c80d5f
@ -611,8 +611,8 @@ focus_follows_mouse no
|
||||
To change the layout of the current container to stacking, use +layout
|
||||
stacking+, for default use +layout default+ and for tabbed, use +layout
|
||||
tabbed+. To make the current client (!) fullscreen, use +fullscreen+, to make
|
||||
it floating (or tiling again) use +mode floating+ respectively +mode tiling+
|
||||
(or +mode toggle+):
|
||||
it floating (or tiling again) use +floating enable+ respectively +floating disable+
|
||||
(or +floating toggle+):
|
||||
|
||||
*Examples*:
|
||||
--------------
|
||||
@ -624,7 +624,7 @@ bindsym Mod1+w layout tabbed
|
||||
bindsym Mod1+f fullscreen
|
||||
|
||||
# Toggle floating/tiling
|
||||
bindsym Mod1+t mode toggle
|
||||
bindsym Mod1+t floating toggle
|
||||
--------------
|
||||
|
||||
=== Focusing/Moving containers
|
||||
|
@ -38,7 +38,7 @@ bindsym Mod1+w layout tabbed
|
||||
bindsym Mod1+l layout default
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym Mod1+Shift+space mode toggle
|
||||
bindsym Mod1+Shift+space floating toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym Mod1+u focus parent
|
||||
|
@ -140,6 +140,13 @@ nop { WS_STRING; return TOK_NOP; }
|
||||
restore { WS_STRING; return TOK_RESTORE; }
|
||||
mark { WS_STRING; return TOK_MARK; }
|
||||
|
||||
enable { return TOK_ENABLE; }
|
||||
true { return TOK_ENABLE; }
|
||||
yes { return TOK_ENABLE; }
|
||||
disable { return TOK_DISABLE; }
|
||||
false { return TOK_DISABLE; }
|
||||
no { return TOK_DISABLE; }
|
||||
|
||||
class { BEGIN(WANT_QSTRING); return TOK_CLASS; }
|
||||
id { BEGIN(WANT_QSTRING); return TOK_ID; }
|
||||
con_id { BEGIN(WANT_QSTRING); return TOK_CON_ID; }
|
||||
|
@ -135,6 +135,8 @@ char *parse_cmd(const char *new) {
|
||||
%token TOK_MODE "mode"
|
||||
%token TOK_TILING "tiling"
|
||||
%token TOK_FLOATING "floating"
|
||||
%token TOK_ENABLE "enable"
|
||||
%token TOK_DISABLE "disable"
|
||||
%token TOK_WORKSPACE "workspace"
|
||||
%token TOK_TOGGLE "toggle"
|
||||
%token TOK_FOCUS "focus"
|
||||
@ -170,7 +172,7 @@ char *parse_cmd(const char *new) {
|
||||
|
||||
%type <number> direction
|
||||
%type <number> level
|
||||
%type <number> window_mode
|
||||
%type <number> boolean
|
||||
%type <number> border_style
|
||||
%type <number> layout_mode
|
||||
%type <number> resize_px
|
||||
@ -345,7 +347,7 @@ operation:
|
||||
| open
|
||||
| fullscreen
|
||||
| split
|
||||
| mode
|
||||
| floating
|
||||
| mark
|
||||
| resize
|
||||
| nop
|
||||
@ -541,8 +543,8 @@ direction:
|
||||
| 'v' { $$ = 'v'; }
|
||||
;
|
||||
|
||||
mode:
|
||||
TOK_MODE window_mode
|
||||
floating:
|
||||
TOK_FLOATING boolean
|
||||
{
|
||||
HANDLE_EMPTY_MATCH;
|
||||
|
||||
@ -554,7 +556,7 @@ mode:
|
||||
toggle_floating_mode(current->con, false);
|
||||
} else {
|
||||
printf("should switch mode to %s\n", ($2 == TOK_FLOATING ? "floating" : "tiling"));
|
||||
if ($2 == TOK_FLOATING) {
|
||||
if ($2 == TOK_ENABLE) {
|
||||
floating_enable(current->con, false);
|
||||
} else {
|
||||
floating_disable(current->con, false);
|
||||
@ -566,9 +568,9 @@ mode:
|
||||
}
|
||||
;
|
||||
|
||||
window_mode:
|
||||
TOK_FLOATING { $$ = TOK_FLOATING; }
|
||||
| TOK_TILING { $$ = TOK_TILING; }
|
||||
boolean:
|
||||
TOK_ENABLE { $$ = TOK_ENABLE; }
|
||||
| TOK_DISABLE { $$ = TOK_DISABLE; }
|
||||
| TOK_TOGGLE { $$ = TOK_TOGGLE; }
|
||||
;
|
||||
|
||||
|
@ -47,7 +47,7 @@ $tmp2 = get_unused_workspace();
|
||||
cmd "workspace $tmp";
|
||||
|
||||
cmd "open";
|
||||
cmd "mode toggle";
|
||||
cmd "floating toggle";
|
||||
|
||||
my $ws = get_ws($tmp);
|
||||
is(@{$ws->{nodes}}, 0, 'no nodes on workspace');
|
||||
|
@ -54,10 +54,10 @@ is(@{$nodes->[1]->{nodes}}, 2, 'two windows in split con');
|
||||
# 2: make it tiling, see where it ends up
|
||||
#############################################################################
|
||||
|
||||
cmd 'mode toggle';
|
||||
cmd 'floating toggle';
|
||||
|
||||
my ($nodes, $focus) = get_ws_content($tmp);
|
||||
|
||||
is(@{$nodes->[1]->{nodes}}, 3, 'three windows in split con after mode toggle');
|
||||
is(@{$nodes->[1]->{nodes}}, 3, 'three windows in split con after floating toggle');
|
||||
|
||||
done_testing;
|
||||
|
@ -29,7 +29,7 @@ ok($window->mapped, 'Window is mapped');
|
||||
cmp_ok($absolute->{width}, '>', 400, 'i3 raised the width');
|
||||
cmp_ok($absolute->{height}, '>', 150, 'i3 raised the height');
|
||||
|
||||
cmd 'mode toggle';
|
||||
cmd 'floating toggle';
|
||||
sleep 0.25;
|
||||
|
||||
($absolute, $top) = $window->rect;
|
||||
|
@ -49,7 +49,7 @@ sleep 0.25;
|
||||
#####################################################################
|
||||
cmd 'nop setting floating';
|
||||
cmd 'focus parent';
|
||||
cmd 'mode floating';
|
||||
cmd 'floating enable';
|
||||
|
||||
#####################################################################
|
||||
# Get geometry of the first floating node (the split container)
|
||||
|
Loading…
Reference in New Issue
Block a user