omerxx / tmux-floax

The missing floating pane for Tmux
GNU General Public License v3.0
366 stars 21 forks source link

FloaX - Floating panes in Tmux!

⚠️ WARNING: This plugin is expermintal and still in early development stages. This message will be removed as soon as it's ready to be used in production.

image

Install πŸ’»

Add this to your .tmux.conf and run Ctrl-I for TPM to install the plugin.

set -g @plugin 'omerxx/tmux-floax'

Using the internal menu πŸ“ƒ

The menu (set with @floax-bind-menu and defaults to <prefix>+P) will appear when running a floating pane. When triggered from a non floating window, the only option currently is to pop the window out to the floating pane. Unless disabled, the same keys are also bound to the root table (can be used without Tmux prefix) only when using the floating pane. The options are also listed in the title (unless it was configured differently). Standard menu options (followed by their hotkey):

Configure βš™οΈ

The default binding for this plugin is <prefix>+p (and <prefix>+P for the internal menu) You can change it by adding this line with your desired key:

set -g @floax-bind '<mykey>'

Root Binding

If you want to toggle floax without <prefix> (e.g. Alt+p), you can do so by prepending -n:

# M- means "hold Meta/Alt"
set -g @floax-bind '-n M-p'

Additional configuration options:

# Setting the main key to toggle the floating pane on and off
set -g @floax-bind '<my-key>'

# When the pane is toggled, using this bind pops a menu with additional options
# such as resize, fullscreen, resetting to defaults and more.
set -g @floax-bind-menu 'P'

# The default width and height of the floating pane
set -g @floax-width '80%'
set -g @floax-height '80%'

# The border color can be changed, these are the colors supported by Tmux:
# black, red, green, yellow, blue, magenta, cyan, white
set -g @floax-border-color 'magenta'

# The text color can also be changed, by default it's blue 
# to distinguish from the main window
# Optional colors are as shown above in @floax-border-color
set -g @floax-text-color 'blue'

# By default when floax sees a change in session path 
# it'll change the floating pane's path
# You can disable this by setting it to false
# You could also "cd -" when the pane is toggled to go back
set -g @floax-change-path 'true'

# The default session name of the floating pane is 'scratch'
# You can modify the session name with this option:
set -g @floax-session-name 'some-other-session-name'

Known issues 🐞