Skip to content

Commit eb38c92

Browse files
committed
feat: add terminal icon to tab titles
1 parent 4e316dd commit eb38c92

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

internal/app/app.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ func Run(cfg Config) mo.Result[string] {
3939
return mo.Err[string](err)
4040
}
4141

42-
_ = cfg.Term.RenameTab(tuiResult.Name)
42+
title := fmt.Sprintf("%s %s", cfg.Icons.Term, tuiResult.Name)
43+
_ = cfg.Term.RenameTab(title)
4344

4445
return cfg.Term.OpenEditor(tuiResult.Path)
4546
}

internal/tui/model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
type Icons struct {
1515
Dir string
16+
Term string
1617
}
1718

1819
// Layout constants

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ func main() {
3838
Term: terminal.Detect(),
3939
Fs: &filesystem.RealFileSystem{},
4040
Icons: tui.Icons{
41-
Dir: "",
41+
Dir: "",
42+
Term: "",
4243
},
4344
}
4445

0 commit comments

Comments
 (0)