Compare commits
3 commits
b1ed8fd77c
...
1073957ab0
Author | SHA1 | Date | |
---|---|---|---|
|
1073957ab0 | ||
|
2e419db5d9 | ||
|
2b8d83f806 |
1 changed files with 60 additions and 8 deletions
68
.tmux.conf
68
.tmux.conf
|
@ -134,6 +134,21 @@ if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "\"\$TMUX_PROGRAM\"
|
|||
if -b '[ -c /dev/clipboard ]' 'bind y run -b "\"\$TMUX_PROGRAM\" \${TMUX_SOCKET:+-S \"\$TMUX_SOCKET\"} save-buffer - > /dev/clipboard"'
|
||||
|
||||
|
||||
# -- Mouse and Key Bindings -------------------------------------------------
|
||||
|
||||
# Enable mouse support
|
||||
setw -g mouse on
|
||||
|
||||
# Set tmux mode-keys to vi for vi-style key bindings
|
||||
setw -g mode-keys vi
|
||||
|
||||
# Left-click (MouseDown1Pane) to copy to clipboard
|
||||
bind -Tcopy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "tmux save-buffer - | xclip -i -selection clipboard && tmux display-message 'Copied to clipboard'"
|
||||
|
||||
# Right-click (MouseDown3Pane) to copy to clipboard
|
||||
bind -Tcopy-mode-vi MouseDown3Pane send-keys -X copy-pipe-and-cancel "tmux save-buffer - | xclip -i -selection clipboard && tmux display-message 'Copied to clipboard'"
|
||||
|
||||
|
||||
# -- buffers -------------------------------------------------------------------
|
||||
|
||||
bind b list-buffers # list paste buffers
|
||||
|
@ -164,6 +179,8 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# # exit the script if any statement returns a non-true return value
|
||||
# set -e
|
||||
#
|
||||
# unset SHELL
|
||||
#
|
||||
# unset GREP_OPTIONS
|
||||
# export LC_NUMERIC=C
|
||||
# # shellcheck disable=SC3041
|
||||
|
@ -603,7 +620,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# battery_status="$battery_status_charging"
|
||||
# fi
|
||||
#
|
||||
# tmux set -g '@battery_status' "$battery_status"
|
||||
# tmux set -g '@battery_status' "$battery_status" >/dev/null 2>/dev/null
|
||||
# }
|
||||
#
|
||||
# _pane_info() {
|
||||
|
@ -916,7 +933,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# if _is_true "$tmux_conf_preserve_stock_bindings"; then
|
||||
# probe_socket="$(dirname "$TMUX_SOCKET")/tmux-stock-bindings-$$"
|
||||
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null list-keys >> "$cfg"
|
||||
# rm -f "%probe_socket"
|
||||
# rm -f "$probe_socket"
|
||||
# fi
|
||||
#
|
||||
# # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the
|
||||
|
@ -1619,8 +1636,48 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# fi
|
||||
# mkdir -p "$TMUX_PLUGIN_MANAGER_PATH"
|
||||
#
|
||||
# __discover_plugins() (
|
||||
# probe_socket="$(dirname "$TMUX_SOCKET")/tmux-discover-plugins-$$"
|
||||
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null start-server \; set-option exit-empty off
|
||||
# ___discover_plugins() {
|
||||
# depth=$((${depth:-0} + 1))
|
||||
# IFS=${_IFS:-$IFS}
|
||||
# [ "$depth" -le 100 ] || return
|
||||
# for current_file in "$@"; do
|
||||
# current_file="$(cd "${current_file%/*}" 2>/dev/null && pwd)/${current_file##*/}" || continue
|
||||
# while IFS= read -r line; do
|
||||
# if plugin=$(printf '%s\n' "$line" | perl -s -n -E 'print if s/^set-option\s+-g\s+\@plugin\s+//g or die' 2>/dev/null); then
|
||||
# discovered_plugins="${discovered_plugins}${discovered_plugins:+ }${plugin}"
|
||||
# elif next_files=$(printf '%s\n' "$line" | perl -s -n -E 's/(?<!\@)current_file/\@current_file/g ; print if s/^source(?:-file)?(?:\s+-[qF]+)*\s*(.+?)$/\1/g or die' 2>/dev/null); then
|
||||
# next_files=$(TMUX_SOCKET="$probe_socket" tmux -f /dev/null \
|
||||
# set -g @current_file "$current_file" \; \
|
||||
# display -pF "$next_files")
|
||||
#
|
||||
# _IFS="$IFS"
|
||||
# IFS=$(printf '\n\nx')
|
||||
# IFS=${IFS%?}
|
||||
# # we don't want quoting here as we want wildcard expansion
|
||||
# # shellcheck disable=SC2046
|
||||
# ___discover_plugins $(printf '%s\n' "$next_files" | xargs printf '%s\n\n')
|
||||
# fi
|
||||
# done << EOF
|
||||
# $(TMUX_SOCKET="$probe_socket" tmux -f /dev/null source -nvq "$current_file" | perl -s -n -E 'print if s/^$current_file:\d+:\s*(set-option\s+-g\s+\@plugin\s+|source-file)/\1/g' -- -current_file="$current_file")
|
||||
# EOF
|
||||
# done
|
||||
# }
|
||||
# ___discover_plugins "$@"
|
||||
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null kill-server
|
||||
# rm -rf "$probe_socket"
|
||||
# printf '%s\n' "$discovered_plugins"
|
||||
# )
|
||||
#
|
||||
# tpm_plugins=$(tmux show -gvq '@tpm_plugins' 2>/dev/null)
|
||||
# if [ -z "$(tmux show -gv '@plugin' 2>/dev/null)" ] && [ -z "$tpm_plugins" ]; then
|
||||
# tpm_plugins=$(cat << EOF | tr ' ' '\n' | awk '/^\s*$/ {next;}; !seen[$0]++ { gsub(/^[ \t]+/,"",$0); gsub(/[ \t]+$/,"",$0); print $0 }'
|
||||
# $tpm_plugins
|
||||
# $(__discover_plugins "$TMUX_CONF_LOCAL")
|
||||
# EOF
|
||||
# )
|
||||
# if [ -z "$tpm_plugins" ]; then
|
||||
# if _is_true "$tmux_conf_uninstall_plugins_on_reload" && [ -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then
|
||||
# tmux display 'Uninstalling tpm and plugins...'
|
||||
# tmux set-environment -gu TMUX_PLUGIN_MANAGER_PATH
|
||||
|
@ -1629,11 +1686,6 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
|
|||
# fi
|
||||
# else
|
||||
# if [ "$(command tmux display -p '#{pid} #{version} #{socket_path}')" = "$("$TMUX_PROGRAM" display -p '#{pid} #{version} #{socket_path}')" ]; then
|
||||
# tpm_plugins=$(cat << EOF | tr ' ' '\n' | awk '/^\s*$/ {next;}; !seen[$0]++ { gsub(/^[ \t]+/,"",$0); gsub(/[ \t]+$/,"",$0); print $0 }'
|
||||
# $tpm_plugins
|
||||
# $(awk '/^[ \t]*set(-option)?.*[ \t]@plugin[ \t]/ { gsub(/'\''/, ""); gsub(/'\"'/, ""); print $NF }' "$TMUX_CONF_LOCAL" 2>/dev/null)
|
||||
# EOF
|
||||
# )
|
||||
# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH"
|
||||
# tmux set -g '@tpm_plugins' "$tpm_plugins"
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue