How can I change the konsole tab title? By default, it's set to %u : %n
, so it always changes automatically.
I can set it with:
qdbus org.kde.konsole $KONSOLE_DBUS_SESSION setTitle 1 "My Title"
But as soon as you run something in the console, it changes back to %u : %n
. Of course. I can set it to %w
to tell it to set the title to "Window Title set by shell", but later (if I don't explicitly set it), it will be empty. (Every new tab will be empty, unless I set it.)
The question is how to make it persistent (or how to switch profile via command line)? I can make another profile in which the title format is set to %w
, and before I set my custom title, switch to that profile.
edit: I think I have found the answer
qdbus org.kde.konsole $KONSOLE_DBUS_SESSION setTabTitleFormat 0 "" qdbus org.kde.konsole $KONSOLE_DBUS_SESSION setTitle 0 "My Title"
All newly created tabs will be named the same. You can give any konsole its "name" by calling the function in its first tab. You might need to clobber the file .
Start Konsole in the background and bring to the front when Ctrl+Shift+F12 (by default) is pressed. Run the new instance of Konsole in a separate process. Show the menubar, overriding the default behavior. Hide the menubar, overriding the default behavior.
You may need to use this variant:
echo -ne "\033]30;test change title\007"
$ konsole -v
Qt: 4.8.6
KDE Development Platform: 4.13.3
Konsole: 2.13.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With