• Stars
    star
    571
  • Rank 78,127 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 9 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Plugin that highlights when you press tmux prefix key

Tmux prefix highlight

NOTE: This project is no longer in active development. Bugs and features requests won't get implemented by the project maintainers. We still welcome discussions and community pull requests, though.


Plugin that highlights when you press tmux prefix key. Inspired by this thread on stackoverflow.

Many thanks to @obxhdx for showing me this trick.

Prefix off: prefix_off

Prefix on: prefix_on

Usage

Just add #{prefix_highlight} to your left/right status bar.

set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'

The plugin can also be configured to show when copy mode is active; see the Configurations section for details.

Installation with Tmux Plugin Manager (recommended)

Add plugin to the list of TPM plugins:

set -g @plugin 'tmux-plugins/tmux-prefix-highlight'

Press prefix + I to install it.

Manual Installation

Clone the repo:

$ git clone https://github.com/tmux-plugins/tmux-prefix-highlight.git ~/clone/path

Add this line to your .tmux.conf:

run-shell ~/clone/path/prefix_highlight.tmux

Reload TMUX environment with:

$ tmux source-file ~/.tmux.conf

Configurations

The colors used for the prefix highlight can be configured:

set -g @prefix_highlight_fg 'white' # default is 'colour231'
set -g @prefix_highlight_bg 'blue'  # default is 'colour04'

The plugin can also be configured to show when copy or synchronized panes mode is active. If enabled, the #{prefix_highlight} token will be replaced with the string Copy when copy mode is enabled and Sync for synchronized panes. The style for copy and sync mode can be configured as a comma-separated list of colors and attributes:

set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow'
set -g @prefix_highlight_show_sync_mode 'on'
set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow'

The prefix, copy and sync prompts can also be configured:

set -g @prefix_highlight_prefix_prompt 'Wait'
set -g @prefix_highlight_copy_prompt 'Copy'
set -g @prefix_highlight_sync_prompt 'Sync'

Additionally, the plugin can be configured to attach optional affixes to the value contained in #{prefix_highlight}. (e.g. < ^B >)

set -g @prefix_highlight_output_prefix '< '
set -g @prefix_highlight_output_suffix ' >'

The empty (shown when prefix is off) prompt and attribute can be configured, It is useful for aligning segments.

set -g @prefix_highlight_empty_prompt '        '          # default is '' (empty char)
set -g @prefix_highlight_empty_attr 'fg=default,bg=green' # default is 'fg=default,bg=default'

Defaultly, empty prompt can't be attached optional affixes. If you want attach affixes on empty prompt, config @prefix_highlight_empty_has_affixes to on.

set -g @prefix_highlight_empty_has_affixes 'on' # default is 'off'
set -g @prefix_highlight_empty_prompt 'Tmux'
set -g @prefix_highlight_output_prefix '< '
set -g @prefix_highlight_output_suffix ' >'

License

MIT

More Repositories

1

tpm

Tmux Plugin Manager
Shell
12,082
star
2

tmux-resurrect

Persists tmux environment across system restarts.
Shell
11,249
star
3

tmux-continuum

Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
Shell
3,263
star
4

tmux-yank

Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin.
Shell
2,682
star
5

tmux-sensible

basic tmux settings everyone can agree on
Shell
1,756
star
6

list

A list of tmux plugins.
1,201
star
7

tmux-copycat

A plugin that enhances tmux search
Shell
1,103
star
8

tmux-logging

Easy logging and screen capturing for Tmux.
Shell
1,034
star
9

tmux-pain-control

standard pane key-bindings for tmux
Shell
755
star
10

tmux-open

Tmux key bindings for quick opening of a highlighted file or url
Shell
631
star
11

tmux-sidebar

A sidebar with the directory tree for the current path. Tries to make tmux more IDE like.
Shell
536
star
12

tmux-battery

Plug and play battery percentage and icon indicator for Tmux.
Shell
499
star
13

tmux-cpu

Plug and play cpu percentage and icon indicator for Tmux.
Shell
433
star
14

tmux-sessionist

Lightweight tmux utils for manipulating sessions
Shell
412
star
15

vim-tmux-focus-events

Make terminal vim and tmux work better together.
Vim Script
348
star
16

vim-tmux

vim plugin for tmux.conf
Vim Script
333
star
17

tmux-fpp

Quickly open any path on your terminal window in your $EDITOR of choice!
Shell
308
star
18

tmux-urlview

Quickly open any url on your terminal window!
Shell
266
star
19

tmux-online-status

Tmux plugin that displays online status of your computer.
Shell
169
star
20

tmux-example-plugin

Example Tmux plugin that actually demonstrates how to build plugins for Tmux. The accompanying tutorial is here: https://github.com/tmux-plugins/tpm/blob/master/HOW_TO_PLUGIN.md
Shell
45
star
21

tmux-cowboy

Kill hanging processes fast
Shell
37
star
22

tmux-maildir-counter

Plugin that counts files on a specific mail directory
Shell
32
star
23

tmux-test

A small framework for isolated testing of tmux plugins.
Shell
16
star
24

language-tmux

Atom language support for Tmux config file
CoffeeScript
10
star
25

tmux-newsboat

Display newsboat counters in tmux status line.
Shell
10
star