All Projects → sainnhe → Tmux Fzf

sainnhe / Tmux Fzf

Licence: other
Use fzf to manage your tmux work environment!

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Tmux Fzf

Tmux 1password
🔑 Access your 1Password login items within tmux!
Stars: ✭ 167 (-37.22%)
Mutual labels:  fzf, tmux
nvim configration
Neovim diy develop enviroment.This project integrates neovim tmux zsh and some very useful plugs of them including YouCompleteMe FZF auto pairs nerdtree ncm2 and so on.
Stars: ✭ 22 (-91.73%)
Mutual labels:  tmux, fzf
Black Void Zsh
🔮 Awesome, Customable Zsh Starter Kit 🌠🌠
Stars: ✭ 206 (-22.56%)
Mutual labels:  fzf, tmux
Dotfiles
Workstation configuration, provisioning and tools
Stars: ✭ 67 (-74.81%)
Mutual labels:  fzf, tmux
dotfiles
i3, Vim, Bash, Ruby, Typescript & React, Elixir, Golang & more!
Stars: ✭ 22 (-91.73%)
Mutual labels:  tmux, fzf
Fzf
🌸 A command-line fuzzy finder
Stars: ✭ 40,965 (+15300.38%)
Mutual labels:  fzf, tmux
dotfiles
No description or website provided.
Stars: ✭ 20 (-92.48%)
Mutual labels:  tmux, fzf
Tmux Fzf Url
🚀 Quickly open urls on your terminal screen!
Stars: ✭ 227 (-14.66%)
Mutual labels:  fzf, tmux
dotfiles
mac OS, Arch Linux, and Debian/Ubuntu
Stars: ✭ 286 (+7.52%)
Mutual labels:  tmux, fzf
dotstow
dotfiles managed with stow
Stars: ✭ 60 (-77.44%)
Mutual labels:  tmux, fzf
Dotfiles
My dotfiles 🚀. Includes configs for neovim, tmux, zsh, alacritty and more.
Stars: ✭ 47 (-82.33%)
Mutual labels:  fzf, tmux
tmuxjump.vim
A plugin to open file from file paths printed in sibling tmux pane
Stars: ✭ 50 (-81.2%)
Mutual labels:  tmux, fzf
Fzf Tab
Replace zsh's default completion selection menu with fzf!
Stars: ✭ 761 (+186.09%)
Mutual labels:  fzf, tmux
Dots
Personal *nix configuration files
Stars: ✭ 136 (-48.87%)
Mutual labels:  fzf, tmux
Jarvis
Dotfiles for a powerful, web development-focused environment powered by Neovim, iTerm2, tmux, and zsh
Stars: ✭ 617 (+131.95%)
Mutual labels:  fzf, tmux
tmuxinator-fzf-start
Uses fzf to provide a selection list for starting tmuxinator projects
Stars: ✭ 31 (-88.35%)
Mutual labels:  tmux, fzf
dotfiles
shell, git, vim, tmux .etc dotfiles, managed via gnu stow
Stars: ✭ 20 (-92.48%)
Mutual labels:  tmux, fzf
viconf
My (n)Vim config files
Stars: ✭ 18 (-93.23%)
Mutual labels:  tmux, fzf
config-public
Linux/WSL config to optimize ergonomics, security, and productivity: vim/neovim, zsh, tmux, i3, emacs, vscode, ipython, jupyter, ranger, fzf, kitty, xkb, selfquant, firejail, systemd, etc
Stars: ✭ 14 (-94.74%)
Mutual labels:  tmux
dotfiles
My dotfiles
Stars: ✭ 16 (-93.98%)
Mutual labels:  tmux

demo

Features

  • Manage sessions (attach, detach*, rename, kill*).
  • Manage windows (switch, link, move, swap, rename, kill*).
  • Manage panes (switch, break, join*, swap, layout, kill*, resize).
  • Preview sessions, windows and panes.
  • Multiple selection (support for actions marked by *).
  • Search commands and append to command prompt.
  • Search key bindings and execute.
  • Search clipboard history and paste to current window.
  • Process management.
  • User menu.

Installation

Requirements

Note: Please use this command to check whether tmux is able to find fzf #1: tmux run-shell -b 'command -v fzf'

Install via TPM

Add this line to your ~/.tmux.conf

set -g @plugin 'sainnhe/tmux-fzf'

Reload configuration, then press prefix + I.

Usage

To launch tmux-fzf, press prefix + F (Shift+F).

This plugin supports multiple selection for some actions, you can press TAB and Shift-TAB to mark multiple items.

You can bind a key to preselect an action. See #6 for more information.

Most actions don't need to be explained, but there are some actions that might need to be explained here.

link & move window

You can use link action to link a window from another session to current session.

launch tmux-fzf -> window -> link -> select a window in another session

And you can use kill action to unlink or kill current window.

kill actually use tmux unlink-window -k instead of tmux kill-window. The main difference between unlink-window -k and kill-window is that kill-window will kill current window and all other windows linked to it, while unlink-window -k will only kill current window.

The logic of the unlink -k action is a bit like hard link in unix/linux. If the current window only exists in one session, then kill; if the current window exists in multiple sessions, then unlink.

Btw, if you want to bind a key to kill current window, I would recommend unlink-window -k instead of kill.

move action is similar to link, except the window at source window is moved to destination.

break & join pane

break action will break source pane off from its containing window to make it the only pane in destination window.

launch tmux-fzf -> pane -> break -> select source pane

join action is like split-window, but instead of splitting destination pane and creating a new pane, it will split it and move source pane to the current window. This can be used to reverse break-pane.

launch tmux-fzf -> pane -> join -> select source pane(s)

user menu

You can add a custom menu to quickly execute some commands.

This feature is not enabled by default. To enable it, add something like this to ~/.tmux.conf

TMUX_FZF_MENU=\
"foo\necho 'Hello!'\n"\
"bar\nls ~\n"\
"sh\nsh ~/test.sh\n"

When you launch tmux-fzf, an extra item named menu will appear. Selecting this item will produce this.

There will be 3 items to select from: foo, bar and sh.

When you select foo, tmux will execute echo 'Hello!'.

When you select bar, tmux will execute ls ~.

When you select sh, tmux will execute sh ~/test.sh.

Note:

  • foo and echo 'hello' are separated by \n in TMUX_FZF_MENU, and you need to add another \n after echo 'hello'.
  • DO NOT add additional white spaces/tabs at the beginning of each line.
  • Commands are executed using tmux -c, so please make sure tmux -c "your command" makes sense.

popup window

Popup window is a new feature introduced in tmux 3.2 (hasn't been released yet). To enable it, you'll need to compile and install the latest development version of tmux/tmux.

For arch linux users, there is a package available in AUR: tmux-git

This feature is automatically enabled in the version >= 3.2, but you can disable it using $TMUX_FZF_OPTIONS, see fzf behavior.

Customization

key binding

For example, to use prefix + C-f (Ctrl+F), add this line to your ~/.tmux.conf

TMUX_FZF_LAUNCH_KEY="C-f"

fzf behavior

This plugin will read fzf environment variables, so you can customize the behavior of fzf such as prompt and color by setting those variables.

For more information, check official page of fzf.

In addition, this plugin supports options of fzf-tmux command which is provided by fzf, you can customize them by adding something like this to ~/.tmux.conf

# Default value in version < 3.2
TMUX_FZF_OPTIONS=""

# Default value in version >= 3.2
TMUX_FZF_OPTIONS="-p -w 62% -h 38%"

To list all available fzf-tmux options, execute fzf-tmux --help in your shell.

preview

Preview is enabled by default, to hide it, add something like this to your ~/.tmux.conf:

TMUX_FZF_PREVIEW=0

Then the preview window will be hidden until toggle-preview is triggered.

order

To customize the order of the items, add something like this to your ~/.tmux.conf:

TMUX_FZF_ORDER="session|window|pane|command|keybinding"

format

For some reasons, you may want to customize format of panes, windows, sessions listed in fzf. There are three variables to complete this work:

TMUX_FZF_PANE_FORMAT TMUX_FZF_WINDOW_FORMAT TMUX_FZF_SESSION_FORMAT

For example, tmux list-panes -a doesn't show running program and window name by default. If you want to show running program and window name, add something like this to ~/.tmux.conf

TMUX_FZF_PANE_FORMAT="[#{window_name}] #{pane_current_command}  [#{pane_width}x#{pane_height}] [history #{history_size}/#{history_limit}, #{history_bytes} bytes] #{?pane_active,[active],[inactive]}"

Similarly, TMUX_FZF_WINDOW_FORMAT and TMUX_FZF_SESSION_FORMAT can also be handled in this way.

For more information, check "FORMATS" section in tmux manual.

FAQ

  • Q: What's your status line configuration?
  • A: See this article.
  • Q: What's the color scheme used in the screenshot?
  • A: Gruvbox Material

More plugins

License

The code of /scripts/.fzf-tmux is copied from junegunn/fzf which is licensed under MIT.

Other code is distributed under MIT && Anti-996.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].