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

@@ -10,7 +10,6 @@ from collections import deque
from .config import defaults, load_config
from .config_utils import resolve_config
from .constants import appname, defconf, is_macos, is_wayland, str_version
from .layout import all_layouts
CONFIG_HELP = '''\
Specify a path to the configuration file(s) to use. All configuration files are
@@ -71,12 +70,6 @@ condition=not is_macos
Detach from the controlling terminal, if any
--window-layout
type=choices
choices={window_layout_choices}
The window layout to use on startup.
--session
Path to a file containing the startup |_ session| (tabs, windows, layout, programs).
See the README file for details and an example.
@@ -488,8 +481,8 @@ def parse_cmdline(oc, disabled, args=None):
def options_spec():
if not hasattr(options_spec, 'ans'):
options_spec.ans = OPTIONS.format(
appname=appname, config_help=CONFIG_HELP.format(appname=appname, conf_name=appname),
window_layout_choices=', '.join(all_layouts)
appname=appname, config_help=CONFIG_HELP.format(appname=appname, conf_name=appname)
)
return options_spec.ans