Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Repository files navigation

🌀 tmux-toggle-popup

A handy plugin to create toggleable popups.

tmux-toggle-popup.webm

Information

📦 Installation

Requirements

  • tmux >= 3.4 (not tested on earlier versions)
  • Bash >= 3.2.57

Note

This plugin has been tested on macOS's built-in Bash through GitHub Actions. However, if you are experiencing issues on macOS, please try upgrading your Bash to a newer version or open an issue.

With tmux Plugin Manager (recommended)

Add this plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'loichyan/tmux-toggle-popup'

Manual installation

Clone the repo:

git clone https://github.com/loichyan/tmux-toggle-popup ~/clone/path

Add this line to the bottom of .tmux.conf:

run ~/clone/path/toggle-popup.tmux

Reload tmux environment with: tmux source ~/.tmux.conf. You should now be able to use this plugin.

Nix (Home Manager)

config.programs.tmux = {
  enable = true;

  # ...

  plugins = with pkgs; [
    tmuxPlugins.tmux-toggle-popup
    # ...
  ];

  extraConfig = ''
    ...
    # popups
    bind C-t run "#{@popup-toggle} -Ed'##{pane_current_path}' -w75% -h75%"
    bind C-g run "#{@popup-toggle} -Ed'##{pane_current_path}' -w90% -h90% --name=lazygit lazygit"
    ...
  '';
};

🚗 Quick start

Create keybindings to toggle your default shell and lazygit:

bind -n M-t run "#{@popup-toggle} -w75% -h75% -Ed'##{pane_current_path}'"
bind -n M-g run "#{@popup-toggle} -w90% -h90% -Ed'##{pane_current_path}' --name=lazygit lazygit"
#                                                 ^^ This variable will be expanded during execution.
#                                                    Please see USAGE.md for more details.

# Turn on autostart to boost the first call of @popup-toggle.
set -g  @popup-autostart on
# If you prefer to share popups within the same project, regardless of which
# session you are working in, put the following setting to your `.tmux.conf`.
set -gF @popup-id-format '#{b:pane_current_path}/{popup_name}'

# If you are using tmux-continuum, make sure it is loaded before this plugin.
# This is only required when you enable @popup-autostart.
set -g @plugin 'tmux-plugins/tmux-continuum'
# Must be loaded after tmux-continuum, as the autostart of popup server can
# disable the autosave of tmux-continuum.
set -g @plugin 'loichyan/tmux-toggle-popup'

Tip

Whenever you update the .tmux.conf, remember to reload it in both your working session and the popup session; otherwise, keybinding or style changes may not reflect in popup sessions.

For more information please check out the usage.

⚖️ License

Licensed under either of

at your option.

About

🌀 A handy plugin to create toggleable popups

Topics

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.