Open a picker to choose pane. Meanwhile, show current command and work directory for each pane.
You can use git
or curl
to install it.
git clone https://github.com/adoyle-h/tmux-choose-pane.git .
# Add tmux-choose-pane to PATH
sudo ln -s "$PWD/tmux-choose-pane/tmux-choose-pane" /usr/local/bin/
curl -LO 'https://raw.githubusercontent.com/adoyle-h/tmux-choose-pane/master/tmux-choose-pane'
chmod +x ./tmux-choose-pane
sudo mv ./tmux-choose-pane /usr/local/bin/
Before calling tmux-choose-pane
, you should set pane-border-format
option in your .tmux.conf
file.
For example,
## Pane
set -g pane-base-index 1
set -g pane-border-status off
set -g pane-border-style 'bg=black fg=#4C4C4E italics'
set -g pane-active-border-style 'bg=black fg=#428FFF italics bold'
set -g pane-border-format '≺ #{pane_current_command} #{?pane_title,#{pane_title},#{pane_current_path}} ≻'
# The default pane title is hostname, change it to empty
set-hook -g after-new-window 'selectp -T ""'
set-hook -g after-new-session 'selectp -T ""'
set-hook -g after-split-window 'selectp -T ""'
# Press '-' to choose pane
bind - run-shell tmux-choose-pane
You can change these tmux options and key-bindings for your needs.
Just call tmux-choose-pane
to trigger the picker.
And tmux-choose-pane -h
to print usage.
Usage: [<ENV_OPTS>] tmux-choose-pane
ENV_OPTS:
border_bg=#19191A The background color of pane-border-style
border_fg=#A2A2A2 The background color of pane-border-style
active_border_bg=#081A33 The background color of pane-active-border-style
active_border_fg=#428FFF The front color of pane-active-border-style
pane_border_status=top Turn pane border status lines off or set their position. Values: off | top | bottom
display_time=10000 Display duration in milliseconds
Please read ./docs/CONTRIBUTING.md before opening new Issue/Discussion/PR and posting any comments.
Copyright 2023 ADoyle ([email protected]) Some Rights Reserved. The project is licensed under the Apache License Version 2.0.
Read the LICENSE file for the specific language governing permissions and limitations under the License.
Read the NOTICE file distributed with this work for additional information regarding copyright ownership.