mirror of
https://github.com/bobwen-dev/hunter
synced 2025-04-12 00:55:41 +02:00
fix title on terminal without tmux
This commit is contained in:
parent
ff2f331947
commit
2fae1a143d
@ -70,8 +70,10 @@ impl Screen {
|
||||
}
|
||||
|
||||
pub fn set_title(&mut self, title: &str) -> HResult<()> {
|
||||
if !self.terminal.starts_with("rxvt") {
|
||||
write!(self, "\x1b]2;hunter: {}", title)?;
|
||||
if self.terminal.starts_with("xterm") ||
|
||||
self.terminal.starts_with("screen") ||
|
||||
self.terminal.starts_with("tmux"){
|
||||
write!(self, "\x1b]2;hunter: {}\x1b\\", title)?;
|
||||
}
|
||||
if self.terminal.starts_with("tmux") {
|
||||
write!(self, "\x1bkhunter: {}\x1b\\", title)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user