fix: removed configs

some configs from tmuxinator not yet supported so will remove them for now until we can support it
This commit is contained in:
raj 2023-10-22 17:18:11 +05:30
parent 5d19efea47
commit ba3420bc91
2 changed files with 13 additions and 15 deletions

View File

@ -23,20 +23,13 @@ type Window struct {
} }
type Configuration struct { type Configuration struct {
SessionName string `yaml:"name"` SessionName string `yaml:"name"`
EditorCommand string `yaml:"editor"` EditorCommand string `yaml:"editor"`
WorkingDir string `yaml:"root"` WorkingDir string `yaml:"root"`
Windows []Window `yaml:"windows"` Windows []Window `yaml:"windows"`
LastOpened time.Time LastOpened time.Time
Attach bool `yaml:"attach"` Attach bool `yaml:"attach"`
StartupWindow string `yaml:"startup_window"` StartupWindow string `yaml:"startup_window"`
StartupPane int `yaml:"startup_pane"`
OnProjectStart string `yaml:"on_project_start"`
OnProjectFirstStart string `yaml:"on_project_first_start"`
OnProjectRestart string `yaml:"on_project_restart"`
OnProjectExit string `yaml:"on_project_exit"`
OnProjectStop string `yaml:"on_project_stop"`
SocketName string `yaml:"socket_name"`
} }
var configDir string var configDir string

View File

@ -98,7 +98,12 @@ func CreateTmuxSession(config *projectconfig.Configuration) error {
} }
// Select the initial window and switch to the session // Select the initial window and switch to the session
selectWindowCmd := exec.Command("tmux", "select-window", "-t", sessionName+":1") defaultWindow := sessionName + ":1"
if config.StartupWindow != "" {
defaultWindow = config.StartupWindow
}
selectWindowCmd := exec.Command("tmux", "select-window", "-t", defaultWindow)
if err := selectWindowCmd.Run(); err != nil { if err := selectWindowCmd.Run(); err != nil {
return err return err
} }