Bug 325178 - Make window title configurable
Summary: Make window title configurable
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 372980 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-22 18:02 UTC by public+kde
Modified: 2018-05-22 14:57 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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