Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xyproto/termtitle
Change the title of the currently running terminal emulator
https://github.com/xyproto/termtitle
emulator terminal utility
Last synced: 20 days ago
JSON representation
Change the title of the currently running terminal emulator
- Host: GitHub
- URL: https://github.com/xyproto/termtitle
- Owner: xyproto
- License: bsd-3-clause
- Created: 2020-07-30T07:18:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-16T16:13:42.000Z (about 2 years ago)
- Last Synced: 2024-10-05T15:20:15.817Z (about 1 month ago)
- Topics: emulator, terminal, utility
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terminal Title
Change the title if the currently running terminal emulator supports it.
## Currently supported terminal emulators
* `konsole`
* `alacritty`
* `gnome-terminal`For unsupported terminal emulators, the `MustSet` function will try the same terminal codes as for `gnome-terminal`.
## Example use
~~~go
package mainimport (
"github.com/xyproto/termtitle"
)func main() {
termtitle.Set("TESTING 1 2 3")
}
~~~## Terminal codes
For `konsole` a working string seems to be:
\033]0;TITLE\a
While for `gnome-terminal`, this one works:
\033]30;TITLE\007
For `alacritty`, this seems to work:
\033]2;TITLE\007
`TITLE` is the title that will be set.
## The settitle utility
This utility can be used for setting the terminal title.
Install with Go 1.18 or later:
go install github.com/xyproto/termtitle/cmd/settitle@latest
## General info
* Version: 1.5.1
* License: BSD-3
* Author: Alexander F. Rødseth <[email protected]>