mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
Support window title
This commit is contained in:
@@ -482,6 +482,9 @@ func main(_ *cli.Command, opts *Options, args []string) (rc int, err error) {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
if opts.Title != "" {
|
||||
lp.SetWindowTitle(opts.Title)
|
||||
}
|
||||
return handler.OnInitialize()
|
||||
}
|
||||
lp.OnResize = func(old, new_size loop.ScreenSize) (err error) {
|
||||
|
||||
@@ -25,18 +25,6 @@ usage = '[directory to start choosing files in]'
|
||||
|
||||
|
||||
OPTIONS = '''
|
||||
--override -o
|
||||
type=list
|
||||
Override individual configuration options, can be specified multiple times.
|
||||
Syntax: :italic:`name=value`.
|
||||
|
||||
|
||||
--config
|
||||
type=list
|
||||
completion=type:file ext:conf group:"Config files" kwds:none,NONE
|
||||
{config_help}
|
||||
|
||||
|
||||
--mode
|
||||
type=choices
|
||||
choices=file,files,save-file,dir,save-dir,dirs,save-files
|
||||
@@ -52,6 +40,22 @@ A suggested name when picking a save file.
|
||||
Path to an existing file to use as the save file.
|
||||
|
||||
|
||||
--title
|
||||
Window title to use for this chooser
|
||||
|
||||
|
||||
--override -o
|
||||
type=list
|
||||
Override individual configuration options, can be specified multiple times.
|
||||
Syntax: :italic:`name=value`.
|
||||
|
||||
|
||||
--config
|
||||
type=list
|
||||
completion=type:file ext:conf group:"Config files" kwds:none,NONE
|
||||
{config_help}
|
||||
|
||||
|
||||
--write-output-to
|
||||
Path to a file to which the output is written in addition to STDOUT.
|
||||
|
||||
|
||||
@@ -748,6 +748,9 @@ func (self *Portal) run_file_chooser(cfd ChooseFilesData) (response uint32, resu
|
||||
if cfd.SuggestedSaveFilePath != "" {
|
||||
args = append(args, `--suggested-save-file-path`, cfd.SuggestedSaveFilePath)
|
||||
}
|
||||
if cfd.Title != "" {
|
||||
args = append(args, "--title", cfd.Title)
|
||||
}
|
||||
args = append(args, "--write-pid-to", pid_path)
|
||||
cmd := exec.Command(utils.KittyExe(), args...)
|
||||
cmd.Dir = cfd.Cwd
|
||||
|
||||
Reference in New Issue
Block a user