Skip to content
Open
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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ You can customize the layouts directory used by Tmuxifier by setting
export TMUXIFIER_LAYOUT_PATH="$HOME/.tmux-layouts"
```

### Custom Templates Path

You can customize the templates directory that are used for creating new window and session layouts
`$TMUXIFIER_TEMPLATE_PATH`.

```bash
export TMUXIFIER_TEMPLATE_PATH="$HOME/.tmux-templates"
```

Then place `session.sh` and `window.sh` in the new directory.
Check [templates](https://github.com/jimeh/tmuxifier/tree/master/templates) directory to see the default templates.

### Disable Shell-Completion

Tmuxifier comes with shell-completion for bash, zsh, tcsh, and fish. If for any
Expand Down
4 changes: 3 additions & 1 deletion libexec/tmuxifier-new-session
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x

TMUXIFIER_TEMPLATE_PATH=${TMUXIFIER_TEMPLATE_PATH:="$TMUXIFIER/templates"}

# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"

Expand All @@ -28,7 +30,7 @@ fi

layout_name="$1"
layout_file="$TMUXIFIER_LAYOUT_PATH/${layout_name}.session.sh"
template="$TMUXIFIER/templates/session.sh"
template="$TMUXIFIER_TEMPLATE_PATH/session.sh"

if [ ! -f "$template" ]; then
echo "tmuxifier: session layout template not found: $template" >&2
Expand Down
4 changes: 3 additions & 1 deletion libexec/tmuxifier-new-window
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
set -e
[ -n "$TMUXIFIER_DEBUG" ] && set -x

TMUXIFIER_TEMPLATE_PATH=${TMUXIFIER_TEMPLATE_PATH:="$TMUXIFIER/templates"}

# Load internal utility functions.
source "$TMUXIFIER/lib/util.sh"

Expand All @@ -28,7 +30,7 @@ fi

layout_name="$1"
layout_file="$TMUXIFIER_LAYOUT_PATH/${layout_name}.window.sh"
template="$TMUXIFIER/templates/window.sh"
template="$TMUXIFIER_TEMPLATE_PATH/window.sh"

if [ ! -f "$template" ]; then
echo "tmuxifier: window layout template not found: $template" >&2
Expand Down