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

Compare commits

...

4 commits

2 changed files with 20 additions and 11 deletions

View file

@ -144,7 +144,7 @@ bind P choose-buffer # choose which buffer to paste from
# -- 8< ------------------------------------------------------------------------
%if #{==:#{TMUX_PROGRAM},}
run "exec sh -c 'TMUX_PROGRAM=\"\$(LSOF=\$(PATH=\"\$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\" command -v lsof); \$LSOF -b -w -a -d txt -p #{pid} -Fn 2>/dev/null | perl -n -e \"if (s/^n((?:.(?!dylib\$|so\$))+)\$/\\1/g && s/(?:\s+\\([^\\s]+?\\))?\$//g) { print; exit } } exit 1; {\" 2>/dev/null || readlink \"/proc/#{pid}/exe\" 2>/dev/null)\"; [ x\"\$(\"\$TMUX_PROGRAM\" display -p \"#{l:#{pid}}\" 2>/dev/null)\" = x\"#{pid}\" ] || TMUX_PROGRAM=\"\$(command -v tmux || printf tmux)\"; \"\$TMUX_PROGRAM\" -S #{socket_path} set-environment -g TMUX_PROGRAM \"\$TMUX_PROGRAM\"'"
run "exec sh -c 'TMUX_PROGRAM=\"\$(LSOF=\$(PATH=\"\$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin\" command -v lsof); \$LSOF -b -w -a -d txt -p #{pid} -Fn 2>/dev/null | perl -n -e \"if (s/^n((?:.(?!dylib\$|so\$))+)\$/\\1/g && s/(?:\s+\\([^\\s]+?\\))?\$//g) { print; exit } } exit 1; {\" 2>/dev/null || readlink \"/proc/#{pid}/exe\" 2>/dev/null)\"; [ \"\$(\"\$TMUX_PROGRAM\" display -p \"#{l:#{pid}}\" 2>/dev/null)\" = \"#{pid}\" ] || TMUX_PROGRAM=\"\$(command -v tmux || printf tmux)\"; \"\$TMUX_PROGRAM\" -S #{socket_path} set-environment -g TMUX_PROGRAM \"\$TMUX_PROGRAM\"'"
%endif
%if #{==:#{TMUX_SOCKET},}
run "exec sh -c '\"\$TMUX_PROGRAM\" -S #{socket_path} set-environment -g TMUX_SOCKET \"#{socket_path}\"'"
@ -614,7 +614,7 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# case "$_uname_s" in
# *CYGWIN*)
# ps -al | tail -n +2 | awk -v pane_pid="$pane_pid" -v tty="$pane_tty" -v ssh="$(command -v ssh)" '
# ((/ssh/ && !/-W/ && !/tsh proxy ssh/ &!/sss_ssh_knownhostsproxy/) || !/ssh/) && !/tee/ && $5 == tty {
# ((/ssh/ && !/-W/ && !/tsh proxy ssh/ && !/sss_ssh_knownhostsproxy/) || !/ssh/) && !/tee/ && $5 == tty {
# user[$1] = $6; if (!child[$2]) child[$2] = $1
# }
# END {
@ -1500,11 +1500,11 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# status_right="#(echo; nice cut -c3- '$TMUX_CONF' | sh -s _battery_status '$tmux_conf_battery_status_charging' '$tmux_conf_battery_status_discharging')$status_right"
# interval=60
# if [ "$_tmux_version" -eq 3500 ]; then
# tmux run -b "exec sh -c 'trap \"[ -n \\\\\"\\\\\$sleep_pid\\\\\" ] && kill -9 \\\\\"\\\\\$sleep_pid\\\\\"; exit 0\" TERM; while [ x\"\$(\"$TMUX_PROGRAM\" -S \"#{socket_path}\" display -p \"#{l:#{pid}}\")\" = x\"#{pid}\" ]; do nice cut -c3- \"$TMUX_CONF\" | sh -s _battery_info; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done'"
# tmux run -b "exec sh -c 'trap \"[ -n \\\\\"\\\\\$sleep_pid\\\\\" ] && kill -9 \\\\\"\\\\\$sleep_pid\\\\\"; exit 0\" TERM; while [ \"\$(\"$TMUX_PROGRAM\" -S \"#{socket_path}\" display -p \"#{l:#{pid}}\")\" = \"#{pid}\" ]; do nice cut -c3- \"$TMUX_CONF\" | sh -s _battery_info; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done'"
# elif [ "$_tmux_version" -ge 3200 ]; then
# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \"\$sleep_pid\"; exit 0' TERM; while [ x\"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _battery_info; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done"
# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \"\$sleep_pid\"; exit 0' TERM; while [ \"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = \"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _battery_info; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done"
# elif [ "$_tmux_version" -ge 2800 ]; then
# status_right="#(echo; while [ x\"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _battery_info; sleep $interval; done)$status_right"
# status_right="#(echo; while [ \"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = \"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _battery_info; sleep $interval; done)$status_right"
# elif [ "$_tmux_version" -gt 2400 ]; then
# status_right="#(echo; while :; do nice cut -c3- '$TMUX_CONF' | sh -s _battery_info; sleep $interval; done)$status_right"
# else
@ -1557,11 +1557,11 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# ;;
# esac
# if [ "$_tmux_version" -eq 3500 ]; then
# tmux run -b "exec sh -c 'trap \"[ -n \\\\\"\\\\\$sleep_pid\\\\\" ] && kill -9 \\\\\"\\\\\$sleep_pid\\\\\"; exit 0\" TERM; while [ x\"\$(\"$TMUX_PROGRAM\" -S \"#{socket_path}\" display -p \"#{l:#{pid}}\")\" = x\"#{pid}\" ]; do nice cut -c3- \"$TMUX_CONF\" | sh -s _uptime; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done'"
# tmux run -b "exec sh -c 'trap \"[ -n \\\\\"\\\\\$sleep_pid\\\\\" ] && kill -9 \\\\\"\\\\\$sleep_pid\\\\\"; exit 0\" TERM; while [ \"\$(\"$TMUX_PROGRAM\" -S \"#{socket_path}\" display -p \"#{l:#{pid}}\")\" = \"#{pid}\" ]; do nice cut -c3- \"$TMUX_CONF\" | sh -s _uptime; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done'"
# elif [ "$_tmux_version" -ge 3200 ]; then
# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \"\$sleep_pid\"; exit 0' TERM; while [ x\"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _uptime; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done"
# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \"\$sleep_pid\"; exit 0' TERM; while [ \"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = \"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _uptime; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done"
# elif [ "$_tmux_version" -ge 2800 ]; then
# status_right="#(echo; while [ x\"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _uptime; sleep $interval; done)$status_right"
# status_right="#(echo; while [ \"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = \"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _uptime; sleep $interval; done)$status_right"
# elif [ "$_tmux_version" -gt 2400 ]; then
# status_right="#(echo; while :; do nice cut -c3- '$TMUX_CONF' | sh -s _uptime; sleep $interval; done)$status_right"
# else
@ -1579,11 +1579,11 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g')
# interval=$(tmux show -gv status-interval)
# if [ "$_tmux_version" -eq 3500 ]; then
# tmux run -b "exec sh -c 'trap \"[ -n \\\\\"\\\\\$sleep_pid\\\\\" ] && kill -9 \\\\\"\\\\\$sleep_pid\\\\\"; exit 0\" TERM; while [ x\"\$(\"$TMUX_PROGRAM\" -S \"#{socket_path}\" display -p \"#{l:#{pid}}\")\" = x\"#{pid}\" ]; do nice cut -c3- \"$TMUX_CONF\" | sh -s _loadavg; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done'"
# tmux run -b "exec sh -c 'trap \"[ -n \\\\\"\\\\\$sleep_pid\\\\\" ] && kill -9 \\\\\"\\\\\$sleep_pid\\\\\"; exit 0\" TERM; while [ \"\$(\"$TMUX_PROGRAM\" -S \"#{socket_path}\" display -p \"#{l:#{pid}}\")\" = \"#{pid}\" ]; do nice cut -c3- \"$TMUX_CONF\" | sh -s _loadavg; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done'"
# elif [ "$_tmux_version" -ge 3200 ]; then
# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \"\$sleep_pid\"; exit 0' TERM; while [ x\"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _loadavg; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done"
# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \"\$sleep_pid\"; exit 0' TERM; while [ \"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = \"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _loadavg; sleep $interval & sleep_pid=\$!; wait \"\$sleep_pid\"; sleep_pid=; done"
# elif [ "$_tmux_version" -ge 2800 ]; then
# status_right="#(echo; while [ x\"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _loadavg; sleep $interval; done)$status_right"
# status_right="#(echo; while [ \"\$(\"$TMUX_PROGRAM\" -S '#{socket_path}' display -p '#{l:#{pid}}')\" = \"#{pid}\" ]; do nice cut -c3- '$TMUX_CONF' | sh -s _loadavg; sleep $interval; done)$status_right"
# elif [ "$_tmux_version" -gt 2400 ]; then
# status_right="#(echo; while :; do nice cut -c3- '$TMUX_CONF' | sh -s _loadavg; sleep $interval; done)$status_right"
# else

View file

@ -108,6 +108,13 @@ Troubleshooting
one, Powerline symbols will be broken.
The alternative is to use the [Mintty terminal for WSL][wsltty].
- **Will this work with the new [Windows Terminal]?**
Yes, yes it will. Here's a screenshot:
![image](https://user-images.githubusercontent.com/6472374/66804257-a8225d00-ef2a-11e9-901a-318a3a22151f.png)
[1681]: https://github.com/Microsoft/BashOnWindows/issues/1681
[wsltty]: https://github.com/mintty/wsltty
@ -364,3 +371,5 @@ font.
![regedit](https://cloud.githubusercontent.com/assets/553208/19741304/71a2f3ae-9bc0-11e6-96aa-4c09a812c313.png)
[font linking]: https://msdn.microsoft.com/en-us/goglobal/bb688134.aspx
[Windows Terminal]: https://github.com/microsoft/terminal