Allow specifying the width of the tall window in the Tall layout as a percentage of available space

Also remove the --window-layout option as it was redundant. Same effect
can be achieved using -o enabled_layouts=some_layout,*
This commit is contained in:
Kovid Goyal
2018-05-16 14:02:58 +05:30
parent b59d1bda8b
commit 3fdf47c535
6 changed files with 82 additions and 35 deletions

View File

@@ -110,12 +110,7 @@ def create_session(opts, args=None, special_window=None, cwd_from=None, respect_
with open(args.session) as f:
return parse_session(f.read(), opts)
ans = Session()
if args and args.window_layout:
if args.window_layout not in opts.enabled_layouts:
opts.enabled_layouts.insert(0, args.window_layout)
current_layout = args.window_layout
else:
current_layout = opts.enabled_layouts[0] if opts.enabled_layouts else 'tall'
current_layout = opts.enabled_layouts[0] if opts.enabled_layouts else 'tall'
ans.add_tab(opts)
ans.tabs[-1].layout = current_layout
if special_window is None: