Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bind): support options in @sessionx-bind #127

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ You can change it by adding this line with your desired key:
# I recommend using `o` if not already in use, for least key strokes when launching
set -g @sessionx-bind '<mykey>'
```
### Root Binding
If you want to open sessionx without the prefix (e.g. `Alt-o`),
you can do so by including `-n` in `@sessionx-bind`:
```bash
# M- gets interpreted as "hold Alt" here
set -g @sessionx-bind '-n M-o'
```

### Additional configuration options:

Expand Down
2 changes: 1 addition & 1 deletion sessionx.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ tmux_option_or_fallback() {
fi
echo "$option_value"
}
tmux bind-key "$(tmux_option_or_fallback "@sessionx-bind" "O")" run-shell "$CURRENT_DIR/scripts/sessionx.sh"
tmux bind-key $(tmux_option_or_fallback "@sessionx-bind" "O") run-shell "$CURRENT_DIR/scripts/sessionx.sh"