This commit is contained in:
Christian Nieves
2024-01-30 21:32:18 +00:00
parent 90033636e5
commit d4c557acf9
3 changed files with 5 additions and 21 deletions

View File

@ -53,9 +53,9 @@ set-option -g status-interval 2
bind Escape confirm-before "kill-server" bind Escape confirm-before "kill-server"
# Automatically set window title # Automatically set window title
set-window-option -g automatic-rename off set-option -g automatic-rename off
set-window-option -g allow-rename on # set-option -g automatic-rename on
#set-option -g set-titles on # set-option -g automatic-rename-format '#{?#{m/r:^(/google/src)?/cloud/,#{pane_current_path}},#{s|^(/google/src)?/cloud/[^/]+/([^/]+).+$|\2|:pane_current_path},#{b:pane_current_path}}'
set-window-option -g xterm-keys on set-window-option -g xterm-keys on
set-option -g xterm-keys on set-option -g xterm-keys on

View File

@ -21,17 +21,6 @@ function gcert() {
source /google/bin/releases/knock/knock.sh source /google/bin/releases/knock/knock.sh
} }
function tmux_title() {
if [[ $PWD =~ /google/src/cloud/[^/]+/([^/]+)/.* ]]; then
tmx2 rename-window "${match[1]}"
else
tmx2 rename-window "$(basename "`pwd`")"
fi
}
if [[ ! -z "$TMUX" ]]; then
precmd_functions+=(tmux_title)
fi
FORTUNES=/google/data/ro/users/di/diamondm/engfortunes/fortune.sh FORTUNES=/google/data/ro/users/di/diamondm/engfortunes/fortune.sh
if [ -f "$FORTUNES" ]; then if [ -f "$FORTUNES" ]; then

View File

@ -30,7 +30,8 @@ zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "mafredri/zsh-async", from:"github", use:"async.zsh" zplug "mafredri/zsh-async", from:"github", use:"async.zsh"
zplug "zsh-users/zsh-autosuggestions" zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-history-substring-search" zplug "zsh-users/zsh-history-substring-search"
zplug "modules/prompt", from:prezto zplug "modules/command-not-found", from:prezto
zplug "modules/completion", from:prezto
zplug "romkatv/powerlevel10k", as:theme, depth:1 zplug "romkatv/powerlevel10k", as:theme, depth:1
# zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq # zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq
@ -100,9 +101,6 @@ typeset -Ag color colour
prompt_google3() { prompt_google3() {
if [[ $PWD =~ '/google/src/cloud/[^/]+/(.+)/google3(.*)' ]]; then if [[ $PWD =~ '/google/src/cloud/[^/]+/(.+)/google3(.*)' ]]; then
# Use CitC client names as window titles in screen/tmux
print -n "\e]2;${match[1]}\a" >/dev/tty
GPROMPT=$(print -r -- "//${match[2]#/}") GPROMPT=$(print -r -- "//${match[2]#/}")
else else
GPROMPT=$(print -r -- "$PWD") GPROMPT=$(print -r -- "$PWD")
@ -112,9 +110,6 @@ prompt_google3() {
prompt_workspace() { prompt_workspace() {
if [[ $PWD =~ '/google/src/cloud/[^/]+/(.+)/google3(.*)' ]]; then if [[ $PWD =~ '/google/src/cloud/[^/]+/(.+)/google3(.*)' ]]; then
# Use CitC client names as window titles in screen/tmux
print -n "\e]2;${match[1]}\a" >/dev/tty
GPROMPT=$(print -r -- "$match[1]") GPROMPT=$(print -r -- "$match[1]")
# #fff is different than white i guess # #fff is different than white i guess
p10k segment -b 63 -f '#fff' -t $GPROMPT p10k segment -b 63 -f '#fff' -t $GPROMPT