Add title setting support.
Pulled from @chgu82837
39af8e2885/fish_prompt.fish (L82-L90)
This commit is contained in:
parent
119ef28152
commit
8f2cf90636
3 changed files with 15 additions and 2 deletions
|
@ -24,6 +24,8 @@ $ omf u nelsonjchen
|
||||||
* re5et: 24 hour clock
|
* re5et: 24 hour clock
|
||||||
* MM DD YY date format
|
* MM DD YY date format
|
||||||
* re5et: YY MM DD date format
|
* re5et: YY MM DD date format
|
||||||
|
* Title Setting to the `prompt_pwd` function in fish for screen, tmux, and non-terminal multiplexer.
|
||||||
|
* This is derived from [@chgu82837's theme](https://github.com/chgu82837/theme-PastFish/blob/39af8e2885e308501bb0afa9dedab193a8722cfe/fish_prompt.fish#L82-L90)
|
||||||
|
|
||||||
## Omissions from the re5et version
|
## Omissions from the re5et version
|
||||||
|
|
||||||
|
|
|
@ -7,5 +7,13 @@ function fish_right_prompt -d "Write out the right prompt"
|
||||||
set_color normal
|
set_color normal
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# tmux, screen title
|
||||||
|
switch $TERM;
|
||||||
|
case xterm'*' vte'*';
|
||||||
|
printf '\033]0;['(prompt_pwd)']\007';
|
||||||
|
case screen'*';
|
||||||
|
printf '\033k['(prompt_pwd)']\033\\';
|
||||||
|
end
|
||||||
|
|
||||||
echo -ns (date "+%D")" - "(date "+%l:%M %p")
|
echo -ns (date "+%D")" - "(date "+%l:%M %p")
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
function fish_title
|
function fish_title
|
||||||
# Customize the title bar of the terminal window.
|
# Customize the title bar of the terminal window.
|
||||||
|
# This does not affect tmux. Look at fish_right_prompt for what actually
|
||||||
|
# affects it.
|
||||||
|
echo '['(prompt_pwd)']'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue