-
Notifications
You must be signed in to change notification settings - Fork 16
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
messages: allow to set the terminal window title #160
base: main
Are you sure you want to change the base?
messages: allow to set the terminal window title #160
Conversation
Codecov Report
@@ Coverage Diff @@
## main #160 +/- ##
==========================================
+ Coverage 94.62% 94.66% +0.04%
==========================================
Files 7 7
Lines 1042 1050 +8
Branches 190 193 +3
==========================================
+ Hits 986 994 +8
Misses 53 53
Partials 3 3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Can you do a companion PR in Snapcraft using this branch so we can manually test out this change a bit?
Ok, you can use canonical/snapcraft#4217 to test this. |
@tigarmo I forgot to change this from draft to ready. Done. |
Thanks. I'll try this out and give you feedback today |
I'm using Terminus, which uses VTE.Terminal class inside. The codes that I use in the patch are the XTerm ones, yes... https://tldp.org/HOWTO/Xterm-Title-3.html Can you test this? it seems that it's the ANSI code for Konsole... About preserving the title... yes, you are right. I didn't implement that because, in my case, it already does that due to a script that I have for GIT, but it should be preserved and restored. I'll try it. |
I'll try changing the ANSI command from 2 (set the title) to 0 (set the title and the icon) just in case... |
Sent a bug report to KDE about the Konsole problem: https://bugs.kde.org/show_bug.cgi?id=471353 |
@tigarmo Mmm... odd... in ubuntu there is this line in ~/.bashrc: It forces the window title to the current folder every time the prompt appears... which makes sense, because not all programs restore the window title. Fedora has a similar line: Are you using a ubuntu-derived distro? Which value returns in your system Because all this seems to point to the konsole bug that delays the title change. |
This patch allows to set the text in the title of a terminal window. The idea is to allow snapcraft to set in the title which step is currently doing.
Co-authored-by: Tiago Nobrega <[email protected]>
705ccae
to
06fb781
Compare
@tigarmo This should be ready for merging. As commented, the konsole bug seems to be a problem in konsole itseld, that doesn't refresh the UI unless there is a change in the terminal itself. Also, it seems to be not possible to read the current title in the terminal (at least in a standard way), since it is set using ANSI commands. And since as soon as a key is pressed, the title is updated in konsole, I think that it's not a true problem. |
Also, the linting bug seems to be a thing of setuptools_scm. |
This patch allows to set the text in the title of a terminal window. The idea is to allow snapcraft to set in the title which step is currently doing.
This is a first proposal for #159
tox
?