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"
[]
# Time to wait for tmux to stabilize before sending commands (ms)
= 1000
# Delay between keys and minor actions (ms)
= 100
# Delay after major actions like Enter or C-c (ms)
= 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. If omitted, panes share the available space equally.
[[]]
= "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
You can use special operators in the exec list to control command execution:
@run <command>: Executes the command in the pane with several environment variables set:SEELA_SESSION_PATH: Absolute path to the project.SEELA_SESSION_NAME: Name of the tmux session.SEELA_WINDOW_NAME: Name of the current window.SEELA_PANE_ID: Unique ID of the current pane.
@confirm <command>: Prompts for confirmation (Run "command"? [Y/n]) before executing.@wait <seconds>: Pauses execution for the specified number of seconds.@wait-milli <ms>(alias@wait-ms): Pauses execution for the specified number of milliseconds.@send-key <key>(alias@sk): Sends a raw key or key sequence to the pane (e.g.,Enter,Space,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.
TODO
- Implement TOML config loading (
src/config.rs) - Recursive project discovery (look for
.gitfolders) -
fzfintegration for project selection - Basic tmux session opening
- Complex window/pane layout support
- Different layouts based on project paths
- Custom and inbuilt types and layout based on the type