A simple script to facilitate launching new or split tmux windows in specific working directories, instead of:
<prefix> + c
cd /path/to/working/directory
Clone this repository locally:
git clone https://github.com/pbnj/tmux-launcher </clone/path/to/tmux-launcher>Then add the following to your .tmux.conf:
if-shell " [ -d </clone/path/to/tmux-launcher> ] " run-shell "</clone/path/to/tmux-launcher>/tmux_launcher.tmux"
Reload tmux:
tmux source-file ~/.tmux.confTo launch a split window:
<prefix> + t
# fzf selections are opened in split (horizontal) windows
# like ' <prefix> + " ' then ' cd /path/to/working/directory '
To launch a new window:
<prefix> + C-t
# fzf selections are opened in new windows
# like ' <prefix> + c ' then ' cd /path/to/working/directory '
You may configure options following the tmux syntax:
set -g <key> <value>
The available options and their default values are:
@tmux-launcher-splitw-bind=t@tmux-launcher-neww-bind=C-t@tmux-launcher-dir=${HOME}
- junegunn/fzf for the command-line fuzzy finder utility.