Skip to content

Commit

Permalink
readme: remove startup script instances
Browse files Browse the repository at this point in the history
As startup script was dropped, the readme is now updated to drop any references
  • Loading branch information
rubiin authored and joshmedeski committed Aug 23, 2024
1 parent 475b396 commit e370363
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,13 @@ The default session can be configured to run a command when connecting to a sess
startup_command = "nvim -c ':Telescope find_files'"
```

You can also use the `startup_script` property to run a script when connecting to a session.

```toml
[default_session]
startup_script = "nvim -c ':Telescope find_files'"
```

**Note:** To learn how to write startup scripts, see the [startup script section](#startup-script).

### Session Configuration

A startup script is a script that is run when a session is created. It is useful for setting up your environment for a given project. For example, you may want to run `npm run dev` to automatically start a dev server.
A startup command is a command that is run when a session is created. It is useful for setting up your environment for a given project. For example, you may want to run `npm run dev` to automatically start a dev server.

**Note:** If you use the `--command/-c` flag, then the startup script will not be run.

I like to use a script that opens nvim on session startup:
I like to use a command that opens nvim on session startup:

```toml
[[session]]
Expand All @@ -207,17 +198,6 @@ Session configurations will load by default if no flags are provided (the return
sesh list -c
```

### Startup Script

A startup script is a simple shell script that is run when a session is created. It is useful for setting up your environment for a given project. For example, you may want to run `npm run dev` to automatically start a dev server and open neovim in a split pane.

```sh
#!/usr/bin/env bash
tmux split-window -v -p 30 "npm run dev"
tmux select-pane -t :.+
tmux send-keys "nvim" Enter
```

Set the file as an executable and it will be run when you connect to the specified session.

## Background (the "t" script)
Expand Down

0 comments on commit e370363

Please sign in to comment.