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*:
--------------
bindsym Mod1+f fullscreen
# Toggle floating/tiling
-bindsym Mod1+t mode toggle
+bindsym Mod1+t floating toggle
--------------
=== Focusing/Moving containers
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
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; }
%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"
%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
| open
| fullscreen
| split
- | mode
+ | floating
| mark
| resize
| nop
| 'v' { $$ = 'v'; }
;
-mode:
- TOK_MODE window_mode
+floating:
+ TOK_FLOATING boolean
{
HANDLE_EMPTY_MATCH;
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);
}
;
-window_mode:
- TOK_FLOATING { $$ = TOK_FLOATING; }
- | TOK_TILING { $$ = TOK_TILING; }
- | TOK_TOGGLE { $$ = TOK_TOGGLE; }
+boolean:
+ TOK_ENABLE { $$ = TOK_ENABLE; }
+ | TOK_DISABLE { $$ = TOK_DISABLE; }
+ | TOK_TOGGLE { $$ = TOK_TOGGLE; }
;
border:
cmd "workspace $tmp";
cmd "open";
-cmd "mode toggle";
+cmd "floating toggle";
my $ws = get_ws($tmp);
is(@{$ws->{nodes}}, 0, 'no nodes on workspace');
# 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;
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;
#####################################################################
cmd 'nop setting floating';
cmd 'focus parent';
-cmd 'mode floating';
+cmd 'floating enable';
#####################################################################
# Get geometry of the first floating node (the split container)