Skip to main content

ranger_tmux

Tmux integration for ranger

Install

To install this plugin, clone the respository into ranger's plugins folder:

pip install git+https://github.com/joouha/ranger_tmux
python -m ranger_tmux install

Features

  • Open files from ranger in a new tmux window or pane
  • Make your terminal track ranger's directory
  • Make ranger track your terminal's directory
  • Set tmux window title to show ranger is running
  • Drop down file-manager in your tmux session
  • Easily split a ranger pane to launch a shell in the current folder

Other pane tracking & syncing

This plugin enables syncing of the current working directory between ranger and other tmux panes in the same window.

The pane to be used for syncing or tracking is determined in the following order:

  1. A marked pane;
  2. The currently selected pane;
  3. The last selected pane;
  4. The next pane.

Ranger will only sync its working directory to another pane if the process running in another pane does not have any child processes. This prevents ranger typing cd commands if you have launched a text editor from the shell in the other pane.

Drop-down ranger

When installing the plugin, you will be asked if you want to install a key-binding in ~/.tmux.conf for drop-down ranger. This allows you to toggle ranger in a drop-down tmux pane in the current window. This can be run manually by running python -m ranger_tmux.drop in a tmux session.

The key binding can be installed by running python -m ranger_tmux --tmux install, or by running the :install_tmux_dropdown_shortcut command in ranger (or typing the xh shortcut). The default key-binding installed is prefix, backspace, but this can be changed by editing the lines added to ~/.tmux.conf.

Shortcut keys

Key Sequence Command
xc Change the current working directory in the other pane to the directory in ranger
xd Change ranger's current directory to the directory of the other pane
xs Toggle syncing of ranger's current directory to the other pane
xt Toggle tracking of the other pane's working directory to tmux
xw Toggle opening files in a new tmux window
xi Toggle setting the tmux window's title to "ranger" when ranger is running
xe Open the selected file with rifle in a new tmux window
x| Split ranger's current tmux pane vertially
x- Split ranger's current tmux pane horizontally
xh Adds the dropdown shortcut to ~/.tmux.conf

Settings

This plugin adds several settings to ranger:

Setting Type Default Meaning
tmux_cwd_sync bool False When True, ranger's current directory is synced to the other pane
tmux_cwd_track bool False When True, ranger's current directory tracks the other pane
tmux_cwd_track_interval float 0.5 Time between checks of the directory of the other pane when tracking
tmux_open_in_window bool True When True, files opened with ranger will open in a new tmux window
tmux_set_title bool True When True, the tumx window will be renamed to "ranger" when ranger is running
tmux_dropdown_percent int 60 The height of the pane created when the drop-down tmux key-binding is installed and used
tmux_dropdown_animate bool True When True, dropped-down ranger will grow / shrink when summoned
tmux_dropdown_duration float 100 Drop-down animation time in miliseconds

The default values can be modified by setting them in ~/.config/ranger/rc.conf, e.g.:

set tmux_cwd_sync true
set tmux_cwd_track true
set tmux_set_title true
set tmux_open_in_window true
set tmux_dropdown_percent 60

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ranger_tmux-1.0.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ranger_tmux-1.0.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file ranger_tmux-1.0.1.tar.gz.

File metadata

  • Download URL: ranger_tmux-1.0.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for ranger_tmux-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ea1bb4319b80a45459663f29488ea722a424963d533ef679524946332756c6c1
MD5 c606bc5adf47ee57464247e6fc9ecbeb
BLAKE2b-256 9a94f950b024e211e41410255a4511c036bd11573e849e7dced78f02aaa29249

See more details on using hashes here.

File details

Details for the file ranger_tmux-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ranger_tmux-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for ranger_tmux-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 daac29d3d8179a686ee64429e59e4105c7c1062f3eee765a5d05c8b299a6f0fd
MD5 a0e2f685eb3e59785cc1c2fc4c0b64b9
BLAKE2b-256 87c2e400a11fe1b4b2ba29cac195cecaa4126694c5d4e0ec3ac99cb17f541c90

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

This release

1.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page