Add an option to set the window title

Fixes #201
This commit is contained in:
Kovid Goyal
2017-11-30 16:42:55 +05:30
parent cada4a8ca8
commit a0702f4a97
3 changed files with 13 additions and 2 deletions

View File

@@ -100,7 +100,11 @@ def create_session(opts, args=None, special_window=None):
ans.tabs[-1].layout = current_layout
if special_window is None:
cmd = args.args if args and args.args else [shell_path]
ans.add_window(cmd)
if args.title:
from kitty.tabs import SpecialWindow
ans.add_window(SpecialWindow(cmd, override_title=args.title))
else:
ans.add_window(cmd)
else:
ans.add_special_window(special_window)
return ans