Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A graphical terminal emulator for Linux using Fyne

License

NotificationsYou must be signed in to change notification settings

fyne-io/terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code StatusBuild StatusCoverage StatusJoin us on Slack

Fyne Terminal

A terminal emulator using the Fyne toolkit, supports Linux, macOS, Windows and BSD.

Running on Linux with a custom zsh theme.screenshot

Running on macOS with a powerlevel10k zsh theme and classic style.screenshot

Running on Windows with PowerShell running inside.screenshot

Installing on command line

Just use the go get command (you'll need a Go and C compiler installed first):

go install github.com/fyne-io/terminal/cmd/fyneterm@latest

Installing as an app

To get the app installed alongside your other applications (with metadata, icons etc),use thefyne tool, as illustrated below:

$ go get fyne.io/fyne/v2/cmd/fyne$ fyne get github.com/fyne-io/terminal/cmd/fyneterm

TODO

There are lots of great things that could be added to this app.Already planned is:

  • Tabs
  • Scroll-back
  • Background and font/size customisation
  • Split panels

Library

You can also use this project as a library to create your ownterminal based applications, using the import path "github.com/fyne-io/terminal".

There are two modes, using the default shell or connecting to a remote shell.

Local Shell

To load a terminal widget and launch the current shell (works on macOS and Linux;on Windows, it always uses PowerShell) use theRunLocalShell method after creatingaTerminal, as follows:

// run new terminal and close app on terminal exit.t:=terminal.New()gofunc() {_=t.RunLocalShell()log.Printf("Terminal's shell exited with exit code: %d",t.ExitCode())a.Quit()}()// w is a fyne.Window created to hold the contentw.SetContent(t)w.ShowAndRun()

Remote connection

For example to open a terminal to an SSH connection that you have created:

// session is an *ssh.Session from golang.org/x/crypto/sshin,_:=session.StdinPipe()out,_:=session.StdoutPipe()gosession.Run("$SHELL || bash")// run new terminal and close app on terminal exit.t:=terminal.New()gofunc() {_=t.RunWithConnection(in,out)a.Quit()}()// OPTIONAL: dynamically resize the terminal sessionch:=make(chan terminal.Config)gofunc() {rows,cols:=uint(0),uint(0)for {config:=<-chifrows==config.Rows&&cols==config.Columns {continue}rows,cols=config.Rows,config.Columnssession.WindowChange(int(rows),int(cols))}}()t.AddListener(ch)// w is a fyne.Window created to hold the contentw.SetContent(t)w.ShowAndRun()

About

A graphical terminal emulator for Linux using Fyne

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp