seela
A tmux session manager. Lets you fuzzy-find your projects, and handles the window/pane layout based on your config.
Installation
You can install seela directly from crates.io:
Make sure that your cargo bin directory (usually ~/.cargo/bin) is in your PATH.
Build from source
If you prefer to build from source:
Usage
Run the binary
Or specify a custom config path:
Tmux Integration
You can use seela in tmux like this
bind g display-popup -w 80% -h 80% -E "seela"
Configuration
seela looks for a config file in the following order:
--configflag$SEELA_CONFIG_HOME/config.toml$XDG_CONFIG_HOME/seela/config.toml~/.config/seela/config.toml
Example config.toml:
[]
= ["~/projects", "~/work"]
= ["~/projects/archive"]
= ["~/special-project"]
[]
= true
= "tree -C -L 2 {}"
= "--height 40% --layout=reverse"
[]
= 700
= 60
= 200
[!TIP] If your
execcommands are not running correctly (e.g., being sent before the shell is ready), try increasing the values in the[tmux]section. Different operating systems, shells, and hardware may require different timings to ensure commands are processed correctly.
Layout Configuration
You can configure your tmux session's layout. Based on the path of the project or its type.
Default Session
default_session is for projects that do not match any path or type.
[]
= ["editor", "terminal"]
= "editor"
Custom Sessions
You can also define custom_sessions
Which can match a project based on the path or type.
The projects will math the session based on this order:
- Exact Path
- Type Match
- Partial Path Match (The closest match will be chosen)
- Default Session
[[]]
= "Rust Development"
= ["rust"] # Match projects of type 'rust'
= ["editor", "bacon"]
= "editor"
[[]]
= "Web Development"
= ["~/projects/web"] # Match by path prefix
= ["web"] # OR match by project type
= ["editor", "server", "logs"]
Project Types
You can define your types like this.
[[]]
= "rust"
= ["Cargo.toml"]
[[]]
= "web"
= ["tsconfig.json", "package.json", "node_modules"]
Window Layouts
[[]]
= "editor"
[[]]
= ["nvim"]
Deeply Nested Panes
The panes are nest-able Use split = "vertical" for side-by-side panes
and split = "horizontal" for top-to-bottom panes.
The split property on a "parent" pane tells seela how to lay out its
"children". You can use the ratio property (a float) to define proportional
sizes for panes. By default each pane takes 50%.
[[]]
= "dev"
[[]]
= "vertical" # The children below will be side-by-side
[[]]
= ["nvim"]
= 0.7 # 70% width
[[]]
= "horizontal"
= 0.3 # 30% width
[[]]
= ["ls -la"]
= 0.4 # 40% height of the 30% width
[[]]
= ["git status"]
= 0.6 # 60% height of the 30% width
Special operators
These can be used anywhere in an exec list:
@run <script>— runs with the following environment variables set:SEELA_SESSION_PATHSEELA_SESSION_NAMESEELA_WINDOW_NAMESEELA_PANE_ID
Supports ~ and paths relative to the config file. Example:
#!/bin/env bash
[[]]
= ["@run ~/scripts/notify.sh"]
@confirm <command>— promptsRun "command"? [Y/n]before running.@wait <seconds>— pauses for the given number of seconds.@wait-milli <ms>/@wait-ms <ms>— pauses for milliseconds.@send-key <key>/@sk <key>— sends a raw key to the pane (e.g.Enter,C-c,C-l).
[!NOTE] All panes need to be initialized before you you are attached to the session. This means using high
@waitwill make the app just stall for that period.
Example using several operators together:
[[]]
= "dev"
[[]]
= [
"@run ~/scripts/setup.sh",
"@confirm cargo build --release",
"@sk C-l",
]