joshmedeski / sesh

Smart session manager for the terminal
MIT License
410 stars 16 forks source link

Session Config #86

Closed joshmedeski closed 3 months ago

joshmedeski commented 3 months ago

What would you like sesh to do?

Add the ability to configure a session:

[[startup_scripts]]
session_path = "~/c/joshmedeski.com"
script_path = "~/.config/sesh/scripts/node_dev"

Becomes...

[[session]]
path = "~/c/joshmedeski.com"
name = "👨‍🏫 joshmedeski.com"
# startup_script or startup_command is allowed
startup_script = "~/.config/sesh/scripts/node_dev"
startup_command="nvim ./src/index.ts"

Note, this will work great alongside #84. Furthermore, we could detect a sesh.toml file in the session path to determine these same config options, possibly allowing paths to be relative.

[[session]]
path = "./src/content/posts"
name = "✍️ posts (joshmedeski.com)"
startup_command="nvim +GoToFile"

However, this could slow down all session start times as it would need to scan the file structure every time.