mirror of
https://github.com/ulyssa/iamb.git
synced 2026-05-23 07:47:44 -06:00
Window title not reset after exiting on foot / sway #12
Labels
No labels
admin
bug
bug
bug
bug
bug
bug
bug
debugging
documentation
documentation
documentation
documentation
e2ee
e2ee
e2ee
e2ee
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
experimental
experimental
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
image
image
image
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
modalkit
perf
perf
perf
perf
ratatui
releases
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
ui
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/iamb#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zzril on 10/8/2025
On sway 1.10.1-2 (from Debian Trixie repos), using
foot1.21.0-2 as a terminal emulator, the window title is set toiamb (@username:matrix.org)(or whatever your matrix id is) upon startup, but is not reset to its previous title (in my case the name of the terminal emulator) after exitingiamb.From quickly skimming over the code and reading through the
crosstermdocs, my impression is that this is rather a bug or missing functionality insidecrossterm.In main.rs,
setup_ttysets up an "alternate screen" and then sets its title:Then, on exiting,
restore_ttyattempts to restore the previous state:The title is apparently not bound to the "alternate screen" and stays after leaving, so the natural approach would be to query the old title and save it somewhere before setting it to the
iamb-specific one.Unfortunately, the
crosstermcrate does not offer aGetTitlefeature at the moment, although this discussion on StackOverflow suggests that it should be somehow possible using ANSI escape codes (whichcrosstermdoes seem to be using for the implementation of SetTitle).So, it might be appropriate to create a corresponding feature request for the
crosstermcrate.Edit: Already exists over there, see: https://github.com/crossterm-rs/crossterm/issues/617
A workaround could be to just not set the title at all. But it's ofc debatable whether that would be an improvement to the current situation.
I haven't tested it for other terminal emulators or window managers, for lack of finding any that implement such a title bar at all.. Maybe some do a better job handling title changes on this "alternate screen"?