1
0
Fork 0
mirror of synced 2024-12-04 14:45:38 -05:00

Compare commits

...

7 commits

Author SHA1 Message Date
Gregory Pakosz
a75fdbb2da fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 10:23:20 +01:00
Gregory Pakosz
394e06a4cb fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 10:17:01 +01:00
Gregory Pakosz
a0cc261f45 fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 10:11:45 +01:00
Gregory Pakosz
fd3dde9bcd fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 09:37:32 +01:00
Gregory Pakosz
d33cd121e9 fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 09:32:28 +01:00
Gregory Pakosz
a7c9177443 fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 09:29:09 +01:00
Gregory Pakosz
9149b2e89f fixup! added support for configuration files in the following locations: - ~/.tmux.conf and ~/.tmux.conf.local - $XDG_CONFIG_HOME/tmux/tmux.conf and $XDG_CONFIG_HOME/tmux/tmux.conf.local - ~/.config/tmux/tmux.conf and ~/.config/tmux/tmux.conf.local 2023-01-09 09:10:24 +01:00

View file

@ -143,7 +143,7 @@ bind P choose-buffer # choose which buffer to paste from
# -- 8< ------------------------------------------------------------------------
%if #{==:#{TMUX_EXECUTABLE},}
run 'tmux set-environment -g TMUX_EXECUTABLE $(lsof -b -w -a -d txt -p #{pid} -Fn 2>/dev/null | perl -n -e "do {print; last } if s/^n((?:.(?!dylib$|so$))+)$/\1/g" || printf tmux)'
run 'tmux set-environment -g TMUX_EXECUTABLE $(lsof -b -w -a -d txt -p #{pid} -Fn 2>/dev/null | perl -n -e "if (s/^n((?:.(?!dylib$|so$))+)$/\1/g) { print; exit } } exit 1; {" || readlink "/proc/#{pid}/exe" || printf tmux)'
%endif
%if #{==:#{TMUX_CONF},}
run 'tmux set-environment -g TMUX_CONF $(for conf in "$HOME/.tmux.conf" "$XDG_CONFIG_HOME/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"; do [ -f "$conf" ] && printf "%s" "$conf" && break; done)'
@ -175,9 +175,13 @@ run 'cut -c3- "#{TMUX_CONF}" | sh -s _apply_configuration'
#
# [ -z "$TMUX" ] && exit 666
# TMUX_SOCKET=$(printf '%s' "$TMUX" | cut -d, -f1)
#
# if [ -z "$TMUX_EXECUTABLE" ]; then
# TMUX_PID=$(lsof -a -U -Fp "$TMUX_SOCKET" 2>/dev/null | perl -n -e "print if s/^p//g")
# TMUX_EXECUTABLE=$(lsof -b -w -a -d txt -p "$TMUX_PID" -Fn 2>/dev/null | perl -n -e "do {print; last } if s/^n((?:.(?!dylib$|so$))+)$/\1/g" || printf 'command tmux')
# TMUX_PID=$(printf '%s' "$TMUX" | cut -d, -f2)
# TMUX_EXECUTABLE=$(lsof -b -w -a -d txt -p "$TMUX_PID" -Fn 2>/dev/null | perl -n -e "if (s/^n((?:.(?!dylib$|so$))+)$/\1/g) { print; exit } } exit 1; {" || printf tmux)
# fi
# if [ x"$TMUX_EXECUTABLE" = x"tmux" ]; then
# TMUX_EXECUTABLE="command tmux"
# fi
#
# tmux() {
@ -841,9 +845,6 @@ run 'cut -c3- "#{TMUX_CONF}" | sh -s _apply_configuration'
# }
#
# _apply_theme() {
# rm -f /tmp/log.txt
# exec 2>/tmp/log.txt
# set -x
# tmux_conf_theme=${tmux_conf_theme:-enabled}
# if ! _is_disabled "$tmux_conf_theme"; then
#
@ -1366,7 +1367,7 @@ run 'cut -c3- "#{TMUX_CONF}" | sh -s _apply_configuration'
# # -- custom variables ------------------------------------------------------
#
# if [ -f "$TMUX_CONF_LOCAL" ] && [ x"$(cut -c3- "$TMUX_CONF_LOCAL" | sh 2>/dev/null -s printf probe)" = x"probe" ]; then
# replacements=$(perl -n -e "print if s!^#\s+([^_][^()\s]+)\s*\(\)\s*{\s*(?:#.*)?\n!s%#\\\{\1((?:\\s+(?:[^\{\}]+?|#\\{(?:[^\{\}]+?)\}))*)\\\}%#(cut -c3- \"$TMUX_CONF_LOCAL\" | sh -s \1\\1)%g; !p" < "$TMUX_CONF_LOCAL")
# replacements=$(perl -n -e 'print if s!^#\s+([^_][^()\s]+)\s*\(\)\s*{\s*(?:#.*)?\n!s%#\\\{\1((?:\\s+(?:[^\{\}]+?|#\\{(?:[^\{\}]+?)\}))*)\\\}%#(cut -c3- \"\\\$TMUX_CONF_LOCAL\" | sh -s \1\\1)%g; !p' "$TMUX_CONF_LOCAL")
# status_left=$(echo "$status_left" | perl -p -e "$replacements" || echo "$status_left")
# status_right=$(echo "$status_right" | perl -p -e "$replacements" || echo "$status_right")
# fi