Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing Window & Terminal Titles using PROMPT_COMMAND: Examples #24

Open
pedroflor opened this issue Jan 26, 2024 · 0 comments
Open

Comments

@pedroflor
Copy link

I'd like to share a few tips that aren't covered in the documentation.
@mattrose, perhaps you could consider adding an entry to the documentation for this.


By modifying the PROMPT_COMMAND variable in your .bashrc, you can customize both the window and terminal titles.

Include the following variable definitions in your .bashrc file, and activate the desired one:

# pwd only
PROMPT_COMMAND='echo -en "\033]0; $("pwd") \a"'

## Regular
PROMPT_COMMAND='echo -en "\033]0; [ $("logname")㉿$("hostname") ] :: [ $("pwd") ] \a"'

## Fancy
PROMPT_COMMAND='echo -en "\033]0; 【 $("logname")㉿$("hostname") 】 :: 【 $("pwd") 】 \a"'

## ZEN (Clean Window Title & Title Bar)
PROMPT_COMMAND='echo -en "\033]0; \a"'

Explore various variations that appeal to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant