[konsole] [Bug 325178] Make window title configurable

Ahmad Samir bugzilla_noreply at kde.org
Tue May 22 14:57:57 UTC 2018


https://bugs.kde.org/show_bug.cgi?id=325178

Ahmad Samir <a.samirh78 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |a.samirh78 at gmail.com

--- Comment #2 from Ahmad Samir <a.samirh78 at gmail.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list