Skip to content

Two scripts to create tmux sessions quickly based on a directory.

Notifications You must be signed in to change notification settings

Aapok0/tmux-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Tmux, zoxide and fzf integration scripts

tmuxz

The script takes a keyword, that you would normally use to move to a directory with zoxide and uses it to either attach or create a tmux session. If session with the directory's name already exists you either attach to it or switch to it from your current session. If a session with that name doesn't exist yet, a new one is created and either attached or switched to.

tmuxf

Same as tmuxz, but you don't give any keyword. The script opens a fuzzy finder (fzf) window for all directories in zoxide database. Write in the field to narrow down and choose the directory you want. The rest of it works the same way as tmuxz.

How to use

  1. Install the required command line tools: tmux, zoxide and fzf
  2. Clone this repository
  3. Add the script to path in one of the following ways:
# Move the scripts to a bin directory in path variable (for example /usr/local/bin)
sudo mv /path/to/tmuxz /usr/local/bin/
sudo mv /path/to/tmuxf /usr/local/bin/

# Make symbolic links of the scripts to a bin directory in path variable (for example /usr/local/bin)
sudo ln -sT /absolute/path/to/tmuxz /usr/local/bin/tmuxz
sudp ln -sT /absolute/path/to/tmuxf /usr/local/bin/tmuxf

# Add the scripts' path to path variable with
export PATH="/path/to/script-directory:$PATH"
  1. Then call either script with:
tmuxz <directory-keyword>
tmuxf

About

Two scripts to create tmux sessions quickly based on a directory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages