kakoune
kakoune copied to clipboard
Implement customizable terminal title
This pull request revives #3829 which in turn revived #2249. It fixes #2217.
The terminal_set_title
key-value-pair in the ui_options
option is expanded to allow values beyond booleans. When a non-boolean value is given in the option, that value becomes the terminal title. The documentation is updated to reflect this.
There is a limitation in that the str-to-str-map doesn't allow the terminal_set_title option to have any spaces in it (without a nbsp or similar Unicode tricks). Would it be better to introduce a new option for this, distinct from ui_options?
Hi, no problem about the delay! I have been quite preoccupied too. I've resolved the code style issue, and I re-implemented the filtering too (I wonder if it could be more lenient given UTF-8, since in that encoding, control characters should be easy to filter out).
As for the feature creep issue, I agree it would be good to collect some feedback. For me, the presence of previous PRs for this feature indicates at least some interest, and the feature seems to be impossible to achieve without at least some help from the editor. Of course, a more orthogonal feature idea might be possible.
I'm strongly in favor of the terminal title being customizable. As you know, the default title copies the modeline, and I put the cursor position in the modeline and I think many others do too. Having the (frequently updated) position reflected in the title too introduces an unneccessary distraction. Either we make the default title less invasive, or we simply accept this PR. Let's :)
The documentation is updated to reflect this.
There are no documentation changes in this PR.
To provide a bit of feedback: I'm using kakoune inside tmux, and it would be nice to have the tmux title be simply the filename instead of the entire modeline. Right now my tmux status-right
is essentially ${pane_title} ${date} ${time}
, but when I open kakoune, the date and time get run off of the side of the screen.