Browse Source

* cmd duration in starship config moved right after directory name

* automatic attach tmux for all cases include existing $TMUX variable, but only if contains double slash in the contain path (that is signal about parent TMUX session - may be unstable solution)
* reassign PATH variable in shell-env bashrc include script for resolve incorrect value of that if use pct enter command in proxmox
* information marker about turned off modifier key of nested session
master
dimti 1 year ago
parent
commit
e5b671f087
  1. 2
      .bashrc
  2. 3
      .config/starship.toml
  3. 5
      .shell-env
  4. 3
      .tmux.conf

2
.bashrc

@ -79,6 +79,6 @@ export LC_ALL=en_US.UTF-8
export LANG=ru_RU.UTF-8
# auto into tmux session
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] || [[ -n "$PS1" ]] && [[ $TMUX == *"//"* ]]; then
sudo tmux attach || sudo tmux
fi

3
.config/starship.toml

@ -1,15 +1,16 @@
format = """
$cmd_duration\
$git_branch\
$git_status\
$username\
@\
$directory\
$cmd_duration\
$line_break\
$character\
"""
add_newline = false
command_timeout = 1000
[line_break]
disabled = false

5
.shell-env

@ -21,3 +21,8 @@ if [ -f "$HOME/.shell-env.local" ]; then
fi
umask 022
##
## Correct PATH for tmux enter
##
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

3
.tmux.conf

@ -67,7 +67,8 @@ set -g status-left ''
set -g status-right-length 100
set -g status-right-fg black
set -g status-right-attr bold
set -g status-right '#{prefix_highlight} #{?window_zoomed_flag,#[fg=colour178]ZOOMED #[fg=colour238]• ,}#[fg=colour178]#h #[fg=colour238]• #[fg=colour178]#{ip_address} #[fg=colour238]• #[fg=colour178]%a %b %d #[fg=colour178]%I:%M%P '
wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]"
set -g status-right "$wg_is_keys_off #{prefix_highlight} #{?window_zoomed_flag,#[fg=colour178]ZOOMED #[fg=colour238]• ,}#[fg=colour178]#h #[fg=colour238]• #[fg=colour178]#{ip_address} #[fg=colour238]• #[fg=colour178]%a %b %d #[fg=colour178]%I:%M%P "
# Window status - not the current window
set-window-option -g window-status-bg default

Loading…
Cancel
Save