Skip to content

A tmux session manager that brings together a collection of noice features to elevate your tmux experience.

License

Notifications You must be signed in to change notification settings

percygt/tmuxinoicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmuxinoicer

A tmux session manager that brings together a collection of noice features to elevate your tmux experience.

image

✨ Features

  • Integrations with fzf for fuzzy search
  • Supports directory, session and tree-mode preview
  • Supports directory-based session creation with find and zoxide integration

🛠️ Requirements

💻 Install

Installation with tpm

Add the following line to your .tmux.conf.

set -g @plugin 'percygt/tmuxinoicer'

Installation via nix overlay

Add tmuxinoicer as a flake input:

{
  inputs = {
    tmuxinoicer.url = "github:percygt/tmuxinoicer";
  };
  outputs = { tmuxinoicer, ... }: { };
}

Then, use the flake's overlay attribute:

{
  outputs = { tmuxinoicer, nixpkgs, ... }:
  let
    pkgs = import nixpkgs {
      system = "x86_64-linux";
      overlays = [ tmuxinoicer.overlays.default ];
    };
  in
    # You can now reference pkgs.tmuxPlugins.tmuxinoicer.
  { }
}

After that, tmuxinoicer can now be used as a normal tmux plugin within the nixpkgs.

⚙️ Customization

Variable Default value Description
@tmuxinoicer-bind "o" <prefix> then this key to trigger the plugin
@tmuxinoicer-window-mode "ctrl-w" keybind to display a list of windows for every session
@tmuxinoicer-tree-mode "ctrl-t" keybind to display the tree-mode preview
@tmuxinoicer-new-window "ctrl-e" keybind to display a list of directories in the current session
@tmuxinoicer-kill-session "alt-bspace" keybind to delete a session
@tmuxinoicer-rename "ctrl-r" keybind to rename either a session or the basename of a directory
@tmuxinoicer-back "ctrl-b" keybind to move back
@tmuxinoicer-default-window-mode "off" sets window-mode as the default result display for sessions
@tmuxinoicer-window-height "75%" fzf-tmux display height
@tmuxinoicer-window-width "90%" fzf-tmux display width
@tmuxinoicer-preview-location "right" fzf-tmux preview location
@tmuxinoicer-preview-ratio "60%" fzf-tmux preview ratio
@tmuxinoicer-color "pointer:9,spinner:92,marker:46,fg+:11" fzf-tmux color options
@tmuxinoicer-extras "find,zoxide" adds both find and zoxide to the result list
@tmuxinoicer-find-base "" comma-separated list of directories and their depths for searching directories based on rooters
@tmuxinoicer-find-rooters ".git" comma-separated list of rooters
@tmuxinoicer-zoxide-excludes "/nix" comma-separated list of paths you don't want in the zoxide result

Guide

Modify the list of default values above by setting the desired values in .tmux.conf.

set -g <variable> <value>

@tmuxinoicer-extras

find and zoxide are both enabled by default. If you want to display only find result.

set -g @tmuxinoicer-extras "find"

@tmuxinoicer-find-rooter

The result of find is based on the value of @tmuxinoicer-find-rooter. If the value is .git, it will search for directories that has .git directory in it. If you want the result to display all directories set this:

set -g @tmuxinoicer-find-rooters ""

@tmuxinoicer-find-base

@tmuxinoicer-find-base is a comma-separated list of directories and their depths to search for directories based on rooters.

Each element of the list is in the following format:

/path/to/dir[:<min depth>[:<max depth>]]
  • If you omit <min depth> and <max depth>, they are set to 0 and 0 respectively.
  • If you omit <max depth>, it is set to <min depth>. (means <min depth> is the exact depth)

If you omit the depth or explicitly set it to 0, the directory itself will be added as a project. In that case, you can add the directory as an input even if it contains no rooter.

For example, if you want to search for ghq repositories as an input:

set -ag @tmuxinoicer-find-base ,"$(ghq root):3"

For example, if you want to add ~/.config/nvim itself as an input:

set -ag @tmuxinoicer-find-base ,"${HOME}/.config/nvim"

🤗 Acknowledgements

I would like to express my sincere gratitude to the following projects and their contributors, as I have incorporated code snippets and inspiration from them into this project:

License

MIT

About

A tmux session manager that brings together a collection of noice features to elevate your tmux experience.

Topics

Resources

License

Stars

Watchers

Forks