removed support for tmux < 2.6, resolves #698
This commit is contained in:
parent
7e00233465
commit
eca5fb621b
3 changed files with 5 additions and 44 deletions
19
.tmux.conf
19
.tmux.conf
|
@ -129,7 +129,6 @@ if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1'
|
|||
if -b 'command -v wl-copy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | wl-copy"'
|
||||
# copy to macOS clipboard
|
||||
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | pbcopy"'
|
||||
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | reattach-to-usernamespace pbcopy"'
|
||||
# copy to Windows clipboard
|
||||
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - | clip.exe"'
|
||||
if -b '[ -c /dev/clipboard ]' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - > /dev/clipboard"'
|
||||
|
@ -946,7 +945,6 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1'
|
||||
# command -v wl-copy > /dev/null 2>&1 && command='wl-copy'
|
||||
# command -v pbcopy > /dev/null 2>&1 && command='pbcopy'
|
||||
# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy'
|
||||
# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe'
|
||||
# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard'
|
||||
#
|
||||
|
@ -1649,25 +1647,12 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time \; run "sleep 3" \; kill-server'
|
||||
# return
|
||||
# fi
|
||||
# if [ "$_tmux_version" -lt 240 ]; then
|
||||
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.4+" \; set -u display-time \; run "sleep 3" \; kill-server'
|
||||
# if [ "$_tmux_version" -lt 260 ]; then
|
||||
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.6+" \; set -u display-time \; run "sleep 3" \; kill-server'
|
||||
# return
|
||||
# fi
|
||||
# fi
|
||||
#
|
||||
# # see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
|
||||
# if command -v reattach-to-user-namespace > /dev/null 2>&1; then
|
||||
# default_shell="$(tmux show -gv default-shell)"
|
||||
# case "$default_shell" in
|
||||
# *fish)
|
||||
# tmux set -g default-command "reattach-to-user-namespace -l $default_shell"
|
||||
# ;;
|
||||
# *sh)
|
||||
# tmux set -g default-command "exec $default_shell... 2> /dev/null & reattach-to-user-namespace -l $default_shell"
|
||||
# ;;
|
||||
# esac
|
||||
# fi
|
||||
#
|
||||
# case "$_uname_s" in
|
||||
# *CYGWIN*|*MSYS*)
|
||||
# # prevent Cygwin and MSYS2 from cd-ing into home directory when evaluating /etc/profile
|
||||
|
|
|
@ -344,12 +344,12 @@ tmux_conf_theme_clock_style="24"
|
|||
# - true
|
||||
# - false (default)
|
||||
# - disabled
|
||||
# on macOS, this requires installing reattach-to-user-namespace, see README.md
|
||||
# on Linux, this requires xsel, xclip or wl-copy
|
||||
tmux_conf_copy_to_os_clipboard=false
|
||||
|
||||
|
||||
# -- user customizations -------------------------------------------------------
|
||||
|
||||
# this is the place to override or undo settings
|
||||
|
||||
# increase history size
|
||||
|
|
28
README.md
28
README.md
|
@ -10,7 +10,7 @@ Installation
|
|||
|
||||
Requirements:
|
||||
|
||||
- tmux **`>= 2.4`** running inside Linux, Mac, OpenBSD, Cygwin or WSL
|
||||
- tmux **`>= 2.6`** running inside Linux, Mac, OpenBSD, Cygwin or WSL
|
||||
- awk, perl and sed
|
||||
- outside of tmux, `$TERM` must be set to `xterm-256color`
|
||||
|
||||
|
@ -120,22 +120,18 @@ Features
|
|||
- [maximize any pane to a new window with `<prefix> +`][maximize-pane]
|
||||
- SSH/Mosh aware username and hostname status line information
|
||||
- mouse mode toggle with `<prefix> m`
|
||||
- automatic usage of [`reattach-to-user-namespace`][reattach-to-user-namespace]
|
||||
if available
|
||||
- laptop battery status line information
|
||||
- uptime status line information
|
||||
- optional highlight of focused pane
|
||||
- configurable new windows and panes behavior (optionally retain current path)
|
||||
- SSH/Mosh aware split pane (reconnects to remote server)
|
||||
- copy to OS clipboard (needs [`reattach-to-user-namespace`][reattach-to-user-namespace]
|
||||
on macOS, `xsel`, `xclip`, or `wl-copy` on Linux)
|
||||
- copy to OS clipboard (needs `xsel`, `xclip`, or `wl-copy` on Linux)
|
||||
- support for 4-digit hexadecimal Unicode characters
|
||||
- [Facebook PathPicker][] integration if available
|
||||
- [Urlscan][] (preferred) or [Urlview][] integration if available
|
||||
|
||||
[Powerline]: https://github.com/Lokaltog/powerline
|
||||
[maximize-pane]: http://pempek.net/articles/2013/04/14/maximizing-tmux-pane-new-window/
|
||||
[reattach-to-user-namespace]: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
|
||||
[Facebook PathPicker]: https://facebook.github.io/PathPicker/
|
||||
[Urlview]: https://packages.debian.org/stable/misc/urlview
|
||||
[Urlscan]: https://github.com/firecat53/urlscan
|
||||
|
@ -338,26 +334,6 @@ See the sample `.local` customization file for instructions.
|
|||
|
||||
[TPM]: https://github.com/tmux-plugins/tpm
|
||||
|
||||
### Accessing the macOS clipboard from within tmux sessions (tmux `< 2.6`)
|
||||
|
||||
[Chris Johnsen created the `reattach-to-user-namespace`
|
||||
utility][reattach-to-user-namespace] that makes `pbcopy` and `pbpaste` work
|
||||
again within tmux.
|
||||
|
||||
To install `reattach-to-user-namespace`, use either [MacPorts][] or
|
||||
[Homebrew][]:
|
||||
|
||||
$ port install tmux-pasteboard
|
||||
|
||||
or
|
||||
|
||||
$ brew install reattach-to-user-namespace
|
||||
|
||||
Once installed, `reattach-to-usernamespace` will be automatically detected.
|
||||
|
||||
[MacPorts]: http://www.macports.org/
|
||||
[Homebrew]: http://brew.sh/
|
||||
|
||||
### Using the configuration under Cygwin within Mintty
|
||||
|
||||
**I don't recommend running this configuration with Cygwin anymore. Forking
|
||||
|
|
Loading…
Reference in a new issue