1
0
Fork 0
mirror of synced 2024-11-18 07:25:34 -05:00
This commit is contained in:
Gregory Pakosz 2024-11-10 21:41:35 +01:00
parent 4e7302cdff
commit 9c5f1915c4

View file

@ -605,7 +605,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# battery_status="$battery_status_charging" # battery_status="$battery_status_charging"
# fi # fi
# #
# tmux set -g '@battery_status' "$battery_status" # tmux set -g '@battery_status' "$battery_status" >/dev/null 2>/dev/null
# } # }
# #
# _pane_info() { # _pane_info() {
@ -1609,11 +1609,38 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# fi # fi
# mkdir -p "$TMUX_PLUGIN_MANAGER_PATH" # mkdir -p "$TMUX_PLUGIN_MANAGER_PATH"
# #
# __discover_plugins() { # __discover_plugins() (
# probe_socket="$(dirname "$TMUX_SOCKET")/tmux-discover-plugins-$$" # TMUX_SOCKET="$(dirname "$TMUX_SOCKET")/tmux-discover-plugins-$$"
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null new-session -dE \; set-hook -g after-set-option 'set -gFa @all_plugins "#{?#{m:*#{@plugin},#{@all_plugins}},,#{@plugin} }"' \; source "$1" \; show -gqv @all_plugins \; kill-session 2>/dev/null # tmux -f /dev/null start-server \; set-option exit-empty off
# rm -f "$probe_socket" # ___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$/\2/g or die' 2>/dev/null); then
# next_files=$(tmux -f /dev/null \
# set -g @current_file "$current_file" \; \
# display -pF "$next_files")
# # shellcheck disable=SC2086
# _IFS="$IFS"
# IFS=
# ___discover_plugins $next_files
# fi
# done << EOF
# $(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 -f /dev/null kill-server
# rm -rf "$TMUX_SOCKET"
# printf '%s\n' "$discovered_plugins"
# )
#
# tpm_plugins=$(tmux show -gvq '@tpm_plugins' 2>/dev/null) # tpm_plugins=$(tmux show -gvq '@tpm_plugins' 2>/dev/null)
# tpm_plugins=$(cat << EOF | tr ' ' '\n' | awk '/^\s*$/ {next;}; !seen[$0]++ { gsub(/^[ \t]+/,"",$0); gsub(/[ \t]+$/,"",$0); print $0 }' # tpm_plugins=$(cat << EOF | tr ' ' '\n' | awk '/^\s*$/ {next;}; !seen[$0]++ { gsub(/^[ \t]+/,"",$0); gsub(/[ \t]+$/,"",$0); print $0 }'
# $tpm_plugins # $tpm_plugins