Compare commits
4 Commits
4811d85882
...
8cf2abff31
| Author | SHA1 | Date | |
|---|---|---|---|
| 8cf2abff31 | |||
| 532dc38965 | |||
| c9daf3ab58 | |||
| 6c247108fd |
7
.bashrc
7
.bashrc
@@ -214,6 +214,13 @@ if [ -d "$HOME/.cargo/env" ]; then
|
||||
. "$HOME/.cargo/env"
|
||||
fi
|
||||
|
||||
if [ -d "/opt/wonderful" ]; then
|
||||
export PATH=/opt/wonderful/bin:$PATH
|
||||
export WONDERFUL_TOOLCHAIN=/opt/wonderful
|
||||
if [ -d "/opt/wonderful/thirdparty/blocksds" ]; then
|
||||
export DLDITOOL=/opt/wonderful/thirdparty/blocksds/core/tools/dlditool/dlditool
|
||||
fi
|
||||
fi
|
||||
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH=/home/$USER/.fnm:$PATH
|
||||
|
||||
15
.config/tmux-prefix-detect.sh
Executable file
15
.config/tmux-prefix-detect.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Auto-set tmux prefix based on connection type.
|
||||
# Called from tmux hooks: session-created and client-attached.
|
||||
if tmux show-environment SSH_CONNECTION 2>/dev/null | grep -qv '^-' || \
|
||||
tmux show-environment MOSH_SERVER_PID 2>/dev/null | grep -qv '^-'; then
|
||||
tmux set -g prefix C-a
|
||||
tmux bind-key C-a send-prefix
|
||||
tmux unbind-key C-b 2>/dev/null
|
||||
tmux display-message "Prefix: C-a (remote)"
|
||||
else
|
||||
tmux set -g prefix C-b
|
||||
tmux bind-key C-b send-prefix
|
||||
tmux unbind-key C-a 2>/dev/null
|
||||
tmux display-message "Prefix: C-b (local)"
|
||||
fi
|
||||
@@ -18,5 +18,13 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
# set -g @plugin 'git@github.com:user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com:user/plugin'
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
# Auto-switch prefix: C-a for SSH/mosh, C-b for local
|
||||
set -ga update-environment 'MOSH_SERVER_PID'
|
||||
set-hook -g session-created 'run-shell ~/.config/tmux-prefix-detect.sh'
|
||||
set-hook -g client-attached 'run-shell ~/.config/tmux-prefix-detect.sh'
|
||||
|
||||
# Manual override: prefix+T to toggle
|
||||
bind T run-shell ~/.config/tmux-prefix-detect.sh
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
Reference in New Issue
Block a user