Bug 325178

Summary: Make window title configurable
Product: [Applications] konsole Reporter: public+kde
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: wishlist CC: a.samirh78, cpigat242, polarathene-signup, public+kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:

Description public+kde 2013-09-22 18:02:01 UTC
The window title should be configurable with profiles in the same manner as the tab title.

Reproducible: Always
Comment 1 Christoph Feck 2016-11-30 23:30:38 UTC
*** Bug 372980 has been marked as a duplicate of this bug. ***
Comment 2 Ahmad Samir 2018-05-22 14:57:57 UTC
You can sort of achieve that with current konsole:
- There's a "Show window title on the titlebar" option (Settings -> Configure Konsole -> General); if it's disabled, the same text is used for both the tab and titlebar
- If it's enabled, you can set the window title using escape sequences, e.g. you can use PROMPT_COMMAND for bash to set the window title, this is done by default on my system (Fedora 28), I have this line in /etc/bashrc (preferably you can add it to your ~/.bashrc):
PROMPT_COMMAND='printf "\033]2;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'

the same thing can be done for zsh but you'd have to use precmd (I don't know much about zsh).

For more information, check http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands

A couple of hints, (stuff I struggle{d} with):
- OSC is ESC]
- \033 is octal for ESC, you can alternatively use \e
- \007 is octal for BEL, you can alternatively use \a

For the printf syntax, check:
$ man 1 printf
$ man 3 printf