[tmux] show current cmd in titlebar

This commit is contained in:
Marco Thomas
2022-12-05 00:06:50 +01:00
parent 402d8064c9
commit ea7e645d6a
3 changed files with 6 additions and 24 deletions

View File

@@ -13,29 +13,6 @@ draw_bold_text_with_bright_colors: false
window: window:
decorations: none decorations: none
schemes:
solarized_light: &solarized_light
primary:
background: '0xfdf6e3'
foreground: '0x657B83'
normal:
black: '0x073642'
red: '0xdc322f'
green: '0x859900'
yellow: '0xb58900'
blue: '0x268bd2'
magenta: '0xd33682'
cyan: '0x2aa198'
white: '0xeee8d5'
bright:
black: '0x002b36'
red: '0xcb4b16'
green: '0x586e75'
yellow: '0x657b83'
blue: '0x839496'
magenta: '0x6c71c4'
cyan: '0x93a1a1'
white: '0xfdf6e3'
everforest_light_hard: &everforest_light_hard everforest_light_hard: &everforest_light_hard
primary: primary:
background: '#fff9e8' background: '#fff9e8'

View File

@@ -22,7 +22,7 @@ case $TERM in
(*xterm* | rxvt | alacritty) (*xterm* | rxvt | alacritty)
# This is seen when the shell prompts for input. # This is seen when the shell prompts for input.
function precmd { function precmd {
print -Pn "\e]0;%m: %(1j,%j job%(2j|s|) - ,)%~\a" print -Pn "\e]0;%m: %~\a"
} }
# This is seen while the shell waits for a command to complete. # This is seen while the shell waits for a command to complete.
function preexec { function preexec {

View File

@@ -70,6 +70,11 @@ setw -g pane-base-index 1
# styling # styling
set -g status-position bottom set -g status-position bottom
# set terminal window title
set-option -g status-interval 1
set-option -g set-titles on
set-option -g set-titles-string "#H: #W"
# using https://github.com/edkolev/tmuxline.vim # using https://github.com/edkolev/tmuxline.vim
# open vim, `:TmuxLineSnapshot`, save to ~/.tmux.theme # open vim, `:TmuxLineSnapshot`, save to ~/.tmux.theme
if-shell "test -f ~/.tmux.theme" "source ~/.tmux.theme" if-shell "test -f ~/.tmux.theme" "source ~/.tmux.theme"