Documentation
¶
Overview ¶
Package app is kakel's program side: what the windows show, as State, and what happens when they ask for something, as intents. It owns the panes' programs, the connections, the files and everything else the windows draw, and runs on one goroutine of its own.
Index ¶
- Constants
- Variables
- func CaptureLog()
- func CopiedWhat(c settings.SavedCopy) string
- func CopiedWhere(c settings.SavedCopy, named func(machines.ID) string) string
- func FilePaneHost(id string) gunim.ID
- func FilePaneViews(id string) string
- func FolderHere(path string) (string, error)
- func FontCommandID(family string) string
- func Installer() install.App
- func IsPrivateKey(path string) bool
- func KeysHere() []string
- func LauncherHotKey(written string) (gunim.HotKey, error)
- func RestartInto() string
- func RunAlone(ctx context.Context, opts Options) (bool, error)
- func Start(ctx context.Context, cfg Config) error
- func StressDoes(name string) bool
- func StressFor() (time.Duration, bool)
- func StressPause(ctx context.Context) bool
- func Stressf(format string, args ...any)
- type AddSavedKey
- type AddSecretsKey
- type AddSecretsPassphrase
- type Alerts
- type AllowKey
- type Ask
- type AskAction
- type AskAnswered
- type AskFact
- type AttachWindow
- type Box
- type CancelJob
- type CheckUpdates
- type ChooseSplit
- type ClearFinished
- type ClearJobs
- type ClearMachine
- type ClipboardUnreadable
- type CloseLauncher
- type ClosePane
- type CloseTab
- type CloseTunnel
- type CloseWindow
- type Config
- type ConnectTo
- type ConnectWindow
- type CopyAgentPrompt
- type CopyAgentSetup
- type CopyRelayLink
- type CopySecret
- type DialogClosed
- type DisallowKey
- type Disconnect
- type DisconnectClient
- type DisconnectClients
- type DisconnectWindow
- type DockPane
- type DockTab
- type DropFiles
- type DropJob
- type EditSecret
- type Exit
- type ExportSecrets
- type Favourite
- type FileWindows
- type FilesOn
- type FocusPane
- type Font
- type FontSize
- type ForgetCopy
- type HotKeys
- type ImportSSHConfig
- type ImportSecrets
- type InstallKakel
- type Job
- type JobEnd
- type Launch
- type LaunchAction
- type LaunchMachine
- type LaunchState
- type LaunchThing
- type LauncherOpener
- type LocalKey
- type LockKeys
- type LockSecrets
- type MakeKey
- type MakePortable
- type MovePane
- type MoveTab
- type NewRelayCode
- type NewTab
- type NewTerminal
- type NextPane
- type NextTab
- type NoTextToPaste
- type Notice
- type NoticeKind
- type OpenDefaultShell
- type OpenFileManager
- type OpenFiles
- type OpenFilesOn
- type OpenLauncher
- type OpenOn
- type OpenSavedTunnel
- type OpenShellNamed
- type OpenTunnel
- type Options
- func (o Options) OneOfMany() bool
- func (o Options) OpensFolder() (string, bool)
- func (o Options) Quits() bool
- func (o Options) ShowStats() bool
- func (o Options) StartsHidden() bool
- func (o Options) StartsInTray() bool
- func (o Options) SystemTitleBar() bool
- func (o Options) Trays() bool
- func (o Options) WindowPlace() *driver.Placement
- func (o Options) WindowSize() geom.Size
- type OutputArrived
- type OverState
- type OverTab
- type OverWindow
- type OverviewDone
- type OverviewFocus
- type OverviewLeaving
- type OverviewOpener
- type OverviewShown
- type Pane
- type PaneDrag
- type PaneToNewWindow
- type PaneToTab
- type PaneToWindow
- type PasteImage
- type PasteImageAsFile
- type PickFont
- type PickShell
- type PickTheme
- type Pings
- type Placement
- type PopOut
- type PreviewTheme
- type PromptOpener
- type PutSecret
- type ReadAgain
- type Reader
- type ReloadServers
- type ReloadShortcuts
- type ReloadThemes
- type RemoteWindow
- type RemoveSavedKey
- type RemoveSecret
- type RemoveSecrets
- type RemoveSecretsKey
- type RemoveServer
- type RenamePane
- type RepeatJob
- type RevealSecret
- type RunCommand
- type RunSavedCommand
- type RunSavedCopy
- type SaveCopy
- type SaveLines
- type SaveLook
- type SaveServer
- type SaveThemeEdits
- type SaveThisComputer
- type SecretEdit
- type SecretEditShown
- type SecretItem
- type SecretKey
- type Secrets
- type ServedClient
- type ServedTunnel
- type Serving
- type SetAgentMay
- type SetBeta
- type SetFontSize
- type SetLauncherFiles
- type SetLauncherKey
- type SetPasteCheck
- type SetRelayProxy
- type SetSecretsLockAfter
- type SetServeAtStart
- type SetServeDefaults
- type SetTermProgram
- type SetTunnelsConnect
- type SetUpdates
- type Share
- type SharePane
- type SharedPane
- type ShellChoice
- type ShiftTab
- type ShowAbout
- type ShowCopies
- type ShowHelp
- type ShowJobs
- type ShowLog
- type ShowReadyUpdate
- type ShowScrollback
- type ShowSecrets
- type ShowServers
- type ShowSettings
- type ShowTab
- type ShowThemeEditor
- type ShowTunnel
- type ShowTyped
- type ShowWhatsNew
- type SoundSetter
- type SplitMoved
- type SplitPane
- type StageSized
- type StartServing
- type State
- type StopServing
- type StopSharing
- type Tab
- type TabToNewWindow
- type ThisComputer
- type ToggleAutostart
- type ToggleFolders
- type ToggleOverview
- type TogglePaneTitles
- type ToggleServers
- type ToggleShellSetup
- type ToggleTray
- type ToolWindow
- type Tray
- type Tunnel
- type TypeSecret
- type UnlockSecrets
- type UnsharePane
- type Update
- type UpdateWindows
- type ViewLink
- type Viewed
- type WatchTunnel
- type WindowFocused
- type WindowOpener
- type WriteShortcuts
- type WriteSkill
- type WriteThemeFile
Constants ¶
const ( MinFontSize = minFontSize MaxFontSize = maxFontSize )
MinFontSize and MaxFontSize are the smallest and largest font sizes, in logical pixels, for a field to hold them to.
const ( KindTerminal = "" KindReader = "reader" )
Pane kinds.
const ( MostSpeeds = 120 SampleEvery = 100 * time.Millisecond )
mostSpeeds is how many speed samples a job keeps for its graph, and sampleEvery how often one is taken: twelve seconds, ten a second.
const ( KeepBoth = "Keep Both" SkipThem = "Skip" Replace = "Replace" )
The answers to what to do with a secret already here.
const ( KindSettings = "settings" KindThemeEditor = "themeedit" )
KindSettings is the Settings pane, and KindThemeEditor the theme editor's.
const ClipboardHolds = 30
ClipboardHolds is how long a copied secret stays on the clipboard.
const KeptFarSep = "\x00"
KeptFarSep joins, in the kept form of a machine beyond a window, the window as it is kept and the window's name for the machine: how saved commands, tunnels and copies name where they run.
const KindChooser = "chooser"
KindChooser is a split's new half before anything is put in it: it offers new terminals and the panes to move there.
const KindCopies = "copies"
KindCopies is the Saved Copies pane.
const KindFileManager = "filemanager"
KindFileManager is a file manager pane's kind.
const KindHelp = "help"
KindHelp is the pane listing every command.
const KindJobs = "jobs"
KindJobs is the jobs pane.
const KindLog = "log"
KindLog is a log's pane.
const KindSecrets = "secrets"
KindSecrets is the secrets pane.
const KindServers = "servers"
KindServers is the Machines pane.
const KindTunnel = "tunnel"
KindTunnel is a tunnel's pane.
const KnownWindowsFile = "known_windows"
KnownWindowsFile is where the host keys of the windows connected to are kept.
const LauncherTopic = "launcher"
LauncherTopic is the key the launcher's state is published under.
const OverviewTopic = "overview"
OverviewTopic is the key All Panes' own window's state is published under.
const ProgramName = "kakel"
ProgramName is what the window is called, before the focused terminal's title.
const RelayCodeFile = "relay_code"
RelayCodeFile is the file the code a window is served under on a relay is kept in, with the token that keeps it: beside the host key, so each machine has its own, even where the settings roam between machines, and nobody else can read the token.
const StressEnv = "KAKEL_STRESS"
StressEnv names the stress, and how long it runs.
const ThisMachineUser = "kakel"
ThisMachineUser is the user name that has plain ssh's tunnels go out from the machine being served.
const WindowTopic = "window"
WindowTopic is what the program publishes the window's state to.
Variables ¶
var ( OnlyOneKey = [2]string{"Only one key unlocks the secrets", "Add another key before removing this one."} HasPassphrase = [2]string{"The secrets already have a passphrase", "Remove it to add another."} )
What is said when a key or a passphrase can't be removed or added, as a title and a body: here, and in the window, which says it before opening a dialog that could only fail.
var DefaultLauncherKey = map[bool]string{true: "shift+super+k", false: "ctrl+alt+k"}[runtime.GOOS == "windows"]
DefaultLauncherKey is the launcher's key when the settings name none: Shift+Win+K on Windows, and Ctrl+Alt+K elsewhere, where the window manager keeps the keys with Super for itself, as Cinnamon and GNOME do.
var FilePaneCommands = []string{filemanager.CmdCut, filemanager.CmdCopy, filemanager.CmdPaste, filemanager.CmdSelectAll, filemanager.CmdNewWindow, filemanager.CmdCloseApp}
FilePaneCommands are the file manager's commands kakel's menus offer for a file manager pane, which its own menus leave out: kakel's Edit menu, New File Manager Window and Close Pane.
var KnownTerminals = []string{"iTerm.app", "WezTerm", "vscode", "Apple_Terminal"}
KnownTerminals are names a user may give instead, for a program that shows images only in a terminal it knows.
Functions ¶
func CaptureLog ¶
func CaptureLog()
CaptureLog keeps what kakel logs for the window log to show, and still writes it to stderr.
func CopiedWhat ¶
CopiedWhat names what a saved copy copies.
func CopiedWhere ¶
CopiedWhere says where a saved copy goes from and to: a saved server by what named calls it now, and anything else as it was kept.
func FilePaneHost ¶ added in v0.12.0
FilePaneHost is the ID of the place a window gives file manager pane id, which its views mount under.
func FilePaneViews ¶ added in v0.12.0
FilePaneViews starts the IDs of the views of file manager pane id, as its intents come from them.
func FolderHere ¶
FolderHere is path as a folder on this computer, a leading ~ the home folder, and an error when there is no such folder.
func FontCommandID ¶
FontCommandID names the command that draws in a family, as gridterm names it: lowercase, with dashes for spaces, and Go Mono "bundled".
func IsPrivateKey ¶ added in v0.4.0
IsPrivateKey reports whether the file at path is a private key, as its first line says: OpenSSH's, or PEM's, of any type.
func KeysHere ¶ added in v0.4.0
func KeysHere() []string
KeysHere are the private key files in ~/.ssh, by name.
func LauncherHotKey ¶
LauncherHotKey reads a launcher's key as written, refusing one a launcher cannot take: one with no Ctrl, Alt or Win, which would take a letter from typing everywhere, or a key no platform lends.
func RestartInto ¶
func RestartInto() string
RestartInto is the program to start once kakel has ended, or "".
func RunAlone ¶
RunAlone does what opts asks for that opens no window: serving an agent program over MCP, or printing the skill or the fonts. It reports whether there was such a thing to do.
func StressDoes ¶ added in v0.11.1
StressDoes reports whether the stress does what name names: everything, unless KAKEL_STRESS_ONLY lists, by commas, what to do alone: windows, splits, closes, typing, tools, files, looks, and, in main, about.
func StressFor ¶ added in v0.11.1
StressFor is how long KAKEL_STRESS asks the stress to run, and false when it asks for none.
func StressPause ¶ added in v0.11.1
StressPause waits a while, mostly a second or more, sometimes only tens of milliseconds, or until ctx ends, and reports whether ctx is still going.
Types ¶
type AddSavedKey ¶ added in v0.4.0
type AddSavedKey struct{ Path string }
AddSavedKey puts a private key file that is already there on the list of saved ones, which the server form offers. A leading ~ is the home folder.
type AddSecretsKey ¶
type AddSecretsKey struct{}
AddSecretsKey lets another key open the secrets, asking which.
type AddSecretsPassphrase ¶
type AddSecretsPassphrase struct{ Passphrase string }
AddSecretsPassphrase lets a passphrase open the secrets too.
type Alerts ¶ added in v0.5.0
Alerts says, for each kind of event, whether kakel tells of it by a sound or by rings around the window; see settings.Alerts.
type AllowKey ¶ added in v0.8.0
type AllowKey struct{ Text, Path string }
AllowKey lets the key written as Text connect, as pasted, or the key in the .pub file at Path.
type Ask ¶
type Ask struct {
ID uint64
Title string
Text string
Prompts []string
// Secret says which fields hide what is typed.
Secret []bool
// Choose offers answers as buttons, the first the one Enter gives,
// answered after the fields by the button's words; Yes names the
// button when there is no Choose. Also is a box to tick, answered
// after that by "yes" when ticked, and with no by "yes" alone. No
// names the button that says no, Cancel when empty.
Choose []string
// FirstIsSafe says the first of Choose is the safe answer, such as
// Leave It beside Replace: Tab reaches it before the others, so Tab
// then Enter does what Enter alone does.
FirstIsSafe bool
Also string
Yes string
No string
// Actions are buttons that do something and leave the question
// open, answered by AskAction; Copy is what a Copy button copies,
// and Link what Open Link opens.
Actions []string
Copy, Link string
// Danger marks a question whose yes can do harm, and colours its
// button so. Careful opens on Cancel without the colour. Plain has
// Yes alone, for something only told.
Danger, Careful, Plain bool
// Preformatted shows Text as it was written, in the fixed-width
// face, to be selected: a secret, not a sentence.
Preformatted bool
// Saved names saved secrets to answer with instead of typing, in a
// list under the fields. Its answer comes last: the index of the
// one picked, or -1 for none.
Saved []string
// Facts are what the question is about, each on a line of its own
// before the fields: a label, a name in bold, and a note under it,
// faint, as a key's comment. Problem says, in the colour of a
// failure, what went wrong with the last answer.
Facts []AskFact
Problem string
// Small are lines said small and faint under Text, as the two
// items a replace question compares.
Small []string
// Icon is the Lucide name of the icon before the title, one of
// askIcons, or empty for none; a Danger question shows a warning.
Icon string
// contains filtered or unexported fields
}
Ask is a question a connection is waiting on the user for, shown as a dialog, or in a window of its own when it wants something typed (see prompts.go): a title and text in the window's own words, fields to fill in, and the words on the button that says yes.
type AskAction ¶
AskAction is a button of a question that does something and leaves the question open, such as Open Link.
type AskAnswered ¶
AskAnswered answers a question: Yes and the answers, or no.
type AskFact ¶ added in v0.4.0
type AskFact struct{ Label, Name, Note string }
AskFact is one thing a question is about: Label, as "Key", the Name, in bold, and a Note under it, faint, or "".
type AttachWindow ¶
AttachWindow works in something a window has open, in a pane here.
type Box ¶
type Box struct {
// Pane names the pane a leaf shows; a split has none.
Pane string
// ID names a split, so the window keeps its divider where it is
// from one state to the next.
ID string
Vertical bool
Share float32
// Opening marks a split just made, whose new pane slides in.
Opening bool
A, B *Box
}
Box is one part of an arrangement: a pane, or a split of two boxes.
type ChooseSplit ¶
type ChooseSplit struct{ Vertical bool }
ChooseSplit splits the focused pane at once, to the right, or below with Vertical, and puts a chooser in the new half: what goes there is picked in it, and it gives its place to that.
type ClearFinished ¶
type ClearFinished struct{}
ClearFinished closes the panes whose programs have ended and clears the tunnels that stopped.
type ClearMachine ¶
ClearMachine takes a machine whose connection went off the sidebar, with the ended panes on it.
type ClipboardUnreadable ¶
type ClipboardUnreadable struct{ Why string }
ClipboardUnreadable says a paste found the clipboard could not be read, and why: not the same as a clipboard with nothing on it.
type CloseLauncher ¶
type CloseLauncher struct{}
CloseLauncher closes the launcher, as Escape does, or a click elsewhere.
type ClosePane ¶
type ClosePane struct{ Pane string }
ClosePane closes a pane, or the focused one when Pane is empty.
type CloseTab ¶
type CloseTab struct{ Group int }
CloseTab closes every pane in a tab, or in the tab in front when Group is 0.
type CloseTunnel ¶
type CloseTunnel struct{ ID string }
CloseTunnel closes a tunnel, or clears the row of one stopped.
type CloseWindow ¶
type CloseWindow struct{}
CloseWindow closes the window it came from, after asking while panes are open there. The last window asks as Exit does.
type Config ¶
type Config struct {
Client gunim.Client
Window *gunim.Window
Shells *screen.Shells
OpenWindow WindowOpener
WindowClosed func(*gunim.Window)
Options Options
Themes []look.Themed
ThemeTrouble error
RegisterThemes func([]look.Themed)
// Tray shows kakel in the system tray, and Handovers are the command
// lines kakels started later hand this one; either may be unset.
Tray Tray
Handovers <-chan single.Handover
// OpenLauncher opens the launcher's window, and HotKeys takes its key
// from every program; either may be unset.
OpenLauncher LauncherOpener
// OpenOverview opens All Panes in a window of its own, over the
// monitor Monitors names; unset, All Panes opens over the window it
// is asked in.
OpenOverview OverviewOpener
Monitors func() []driver.Monitor
HotKeys HotKeys
// Files opens the file manager's windows; unset, files open in panes.
Files FileWindows
// OpenPrompt opens a window of its own for a question that wants
// something typed; unset, it is asked in a dialog.
OpenPrompt PromptOpener
// Sound is told which sounds play; unset, none do.
Sound SoundSetter
// Updates opens gunim's windows of an update; unset, kakel asks
// about one in its own dialogs.
Updates UpdateWindows
}
Config is what the program side starts with: its first window, the shells the windows draw, a way to open more windows and word of one gone, the command line, and the themes on offer, with what went wrong reading them.
type ConnectTo ¶
type ConnectTo struct {
Target string
Server, As machines.ID
// Quiet connects for a file manager window, which says how it
// went: no pane of its log, no toast and no flash in kakel's
// windows. Sign-in questions still come.
Quiet bool
// Only connects, and opens nothing on it: no terminal when
// nothing else waits on the connection.
Only bool
// NoAsk connects only when nothing has to be asked: a key or a
// secret already open is enough, and a question fails it. For
// a connection nobody here asked for, whose questions would
// wait on a screen nobody is at.
NoAsk bool
}
ConnectTo connects to a saved server by its ID, Server, or to one typed as user@host:port, as a quick connection, and opens a shell there. Connected already, it opens another shell. As is the ID of the quick connection a typed one is made again for.
type ConnectWindow ¶
type ConnectWindow struct {
Addr, KeyFile string
ID machines.ID
// Via is the saved server the window, or its relay, is reached
// through, empty for this machine. ViaSet says Via was chosen;
// without it, a saved window goes the way it was saved to.
Via machines.ID
ViaSet bool
// NoAsk connects only when nothing has to be asked, as
// ConnectTo.NoAsk.
NoAsk bool
// Only connects, and opens nothing on it.
Only bool
}
ConnectWindow connects to a window served at Addr, which is host, or host:port, with the key in KeyFile, or the usual keys when it is empty. ID is the saved window's, or the quick connection's it is made again for; with none, it is a quick connection of its own.
type CopyAgentPrompt ¶
type CopyAgentPrompt struct{ Host string }
CopyAgentPrompt puts the prompt that hands the share to an agent program on the clipboard, and CopyAgentSetup the line that adds the MCP server to it.
type CopyAgentSetup ¶
type CopyAgentSetup struct{ Host string }
Intents for sharing panes with an agent.
type CopyRelayLink ¶ added in v0.12.1
type CopyRelayLink struct{}
CopyRelayLink copies the relay's URL and the code, for a window connecting to paste.
type CopySecret ¶
type CopySecret struct{ ID string }
CopySecret puts a secret on the clipboard, for half a minute.
type DialogClosed ¶
type DialogClosed struct{}
DialogClosed says a dialog closed without a change, so the window gives the keyboard back.
type DisallowKey ¶ added in v0.8.0
type DisallowKey struct{ Fingerprint string }
DisallowKey takes the key with Fingerprint off the keys that may connect, and hangs up on the windows it let in.
type Disconnect ¶
Disconnect closes the connection to a server or a window. Its panes end, and say so, and can be started again once it is connected again.
type DisconnectClient ¶
type DisconnectClient struct{ Name, From string }
DisconnectClient hangs up on one window this one is served to, by its name and where it came from.
type DisconnectClients ¶
type DisconnectClients struct{}
DisconnectClients hangs up on the windows connected.
type DisconnectWindow ¶
DisconnectWindow lets go of a window, by its ID, closing the panes on it.
type DockPane ¶ added in v0.12.0
DockPane takes a pane into a split beside the pane Beside, in whichever window that is: to its right, or below it with Vertical, or to its left or above it with First.
type DockTab ¶
DockTab takes a tab's panes into a split beside the pane Beside: to its right, or below it with Vertical, or to its left or above it with First. The tab goes.
type DropFiles ¶
DropFiles puts files dropped on the window into a terminal pane: the one they were dropped on, or the focused one when Pane is empty.
type EditSecret ¶ added in v0.12.0
type EditSecret struct{ ID string }
EditSecret opens the form changing a secret, with its value in.
type Exit ¶
type Exit struct{}
Exit closes the window, and every shell in it, after asking while anything is open.
type ExportSecrets ¶
type ExportSecrets struct{ Path string }
ExportSecrets writes every secret, in plain text, to a new CSV file at Path.
type Favourite ¶ added in v0.4.0
Favourite is a folder saved on Machine, empty for this computer. Name is the name the user gave it, empty for the folder's own.
type FileWindows ¶ added in v0.4.0
type FileWindows interface {
NewPane(o filemanager.Options, host filemanager.PaneHost) (*filemanager.Window, error)
Refresh()
}
FileWindows makes the file manager's panes and tells them their places changed: gunim's filemanager.Hub.
type FilesOn ¶
FilesOn opens a file manager pane on Machine, at Path, or at home when Path is empty.
type FocusPane ¶
type FocusPane struct{ Pane string }
FocusPane gives a pane the keyboard, bringing its group on stage.
type Font ¶
type Font struct {
// Name is the family, empty for Go Mono.
Name string
// Faces are its regular, bold, italic and bold italic faces; nil
// ones are drawn from the regular face, and all nil is Go Mono.
Faces [4]*text.Face
}
Font is the terminals' typeface as the window uses it.
type FontSize ¶
type FontSize struct{ Step int }
FontSize makes the terminals' text a point larger, or smaller, or, with no Step, the size it started at.
type ForgetCopy ¶
ForgetCopy takes a copy off the saved list.
type ImportSSHConfig ¶ added in v0.4.0
type ImportSSHConfig struct{}
ImportSSHConfig saves the machines ~/.ssh/config names that are not saved yet, each under its alias.
type ImportSecrets ¶
type ImportSecrets struct{ Path, Duplicates string }
ImportSecrets reads the secrets in a CSV file another manager wrote. Duplicates says what to do with one already here: keep both, skip it, or replace it.
type InstallKakel ¶
type InstallKakel struct{ Desktop, Autostart, AutoUpdate bool }
InstallKakel installs this copy for the user, with a shortcut on the desktop and a start with the computer when asked, and updates done by themselves with AutoUpdate.
type Job ¶
type Job struct {
ID string
Title string
// Machine is where it works, as its row in the sidebar is filed,
// and Kind is copy, move or delete.
Machine machines.ID
Kind string
// From is where the names are, and To where they go. A delete has
// no To.
From, To JobEnd
// Detail says how far it has got, or how it ended.
Detail string
// job is still working out how much there is.
Share float32
// Done is set once it has stopped, Stopped when the user stopped it,
// and Failed when it was for any other reason but finishing.
Done, Stopped, Failed bool
// Names are what it works on, Current the one it is on, and Ticked
// how many of Names are done, when they are counted one by one.
Names []string
Current string
Ticked int
// Speeds are its speed over the last while, oldest first, for a
// graph, and Sampled how many samples have been taken in all, so a
// graph can tell the new ones.
Speeds []uint64
Sampled int
// Repeatable says a finished copy can be run again, and Saved that
// it is on the saved list.
Repeatable, Saved bool
// Started is when it started, and Finished when it stopped, zero
// while it runs.
Started, Finished time.Time
}
Job is one piece of file work, as the jobs pane shows it.
type JobEnd ¶ added in v0.12.0
type JobEnd struct {
// Folder is the folder's own name, Path all of it as the machine
// types it, and Machine what the machine is called. Local says the
// machine is this computer.
Folder, Path, Machine string
Local bool
// On is the machine, and Dir the folder as its files name it, to
// open it there.
On machines.ID
Dir string
}
JobEnd is a folder a job works in.
type LaunchAction ¶
type LaunchAction struct {
ID, Title string
}
LaunchAction is a thing the launcher can open on a machine.
type LaunchMachine ¶
type LaunchMachine struct {
ID machines.ID
Name string
Note string
Actions []LaunchAction
Default int
Window bool
}
LaunchMachine is a machine the launcher offers, what can be opened on it, and which of that Enter opens. Window says it is another kakel's window, saved, rather than a server.
type LaunchState ¶
type LaunchState struct {
Machines []LaunchMachine
Things []LaunchThing
Opened uint64
}
LaunchState is what the launcher shows: the machines, the things it finds besides them once something is typed, and a count of the times it was opened, for it to start afresh each time.
type LaunchThing ¶
type LaunchThing struct {
Title, Note string
Also []string
Kind string
Machine machines.ID
Action string
}
LaunchThing is one thing the launcher opens straight from what is typed: a shell here, files somewhere, a saved command, a window. Note says where, Also are other words it is found by, and Kind picks its icon.
type LauncherOpener ¶
LauncherOpener opens the launcher's window, with its view mounted.
type LocalKey ¶ added in v0.8.0
type LocalKey struct{ Name, Path string }
LocalKey is a public key on this machine: its name, its comment or file's, and the .pub file it is in.
type MakeKey ¶
MakeKey writes a new key pair at Path. Generate makes up its passphrase and keeps it in the secrets; otherwise Passphrase is used, and may be empty.
type MakePortable ¶
type MakePortable struct{}
MakePortable makes the folder beside the program and copies the files it reads now into it, for a copy that carries its own.
type MovePane ¶
type MovePane struct {
Pane, Beside string
Vertical bool
// Instead moves it into the place of that split's chooser.
Instead string
}
MovePane moves Pane out of wherever it is and into a split beside Beside: to the right, or below with Vertical.
type MoveTab ¶
type MoveTab struct{ Group, Before int }
MoveTab moves a tab to just before the tab Before, or last when Before is 0, in the window the intent came from, and puts it in front. A tab of another window moves into this one.
type NewRelayCode ¶ added in v0.12.1
type NewRelayCode struct{}
NewRelayCode gives the window a new code on the relay; the old one lets nobody else in.
type NewTab ¶ added in v0.12.0
type NewTab struct{}
NewTab opens a tab like the one in front: a file manager at the folder a file manager there shows, and otherwise a terminal.
type NextPane ¶
type NextPane struct{ Back bool }
NextPane moves the keyboard to the next pane in the sidebar, or the one before with Back.
type NextTab ¶
type NextTab struct{ Back bool }
NextTab puts the tab after the one in front in front, or the one before with Back, going round.
type NoTextToPaste ¶
type NoTextToPaste struct{}
NoTextToPaste says a middle click found no text to paste, which is said when the clipboard holds an image: that paste takes text.
type Notice ¶
type Notice struct {
ID uint64
Title, Body string
// Kind says whether it tells of a failure, of work done, or of
// neither.
Kind NoticeKind
// Action names a link on the toast, and On is the intent a click on
// it sends.
Action string
On gunim.Intent
Clipboard string
// Forget has the window take Clipboard back off the clipboard in
// half a minute, unless something else was copied since.
Forget bool
// contains filtered or unexported fields
}
Notice is something to tell the user once, in a toast. Clipboard, when set, goes on the clipboard as it shows.
type NoticeKind ¶
type NoticeKind uint8
NoticeKind is what a notice tells of, which picks its icon.
const ( NoticePlain NoticeKind = iota NoticeWorked NoticeFailed )
The kinds of notice.
type OpenDefaultShell ¶
type OpenDefaultShell struct{}
OpenDefaultShell opens a terminal with this machine's default shell, and goes back to it for new terminals.
type OpenFileManager ¶ added in v0.4.0
OpenFileManager opens a window of its own holding a file manager pane on Machine, at Path or at home.
type OpenFiles ¶
type OpenFiles struct{}
OpenFiles opens a file manager pane at home on the machine of the focused pane.
type OpenFilesOn ¶ added in v0.4.0
OpenFilesOn opens a file manager pane on Machine, at Path or at home, in the window in front: beside the file manager in front, or in a tab of its own with NewTab.
type OpenSavedTunnel ¶
type OpenSavedTunnel struct{ Saved settings.SavedTunnel }
OpenSavedTunnel opens a tunnel kept from before.
type OpenShellNamed ¶
type OpenShellNamed struct{ ID string }
OpenShellNamed opens a terminal with the shell ID, once.
type OpenTunnel ¶
OpenTunnel forwards a port over the connection to Machine, and saves it for next time with Keep. One open to the network is asked about first; Sure is the answer. Saved says it was opened from the saved list, whose order stays as it is.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options are what the command line asks for.
func ParseOptions ¶
ParseOptions reads the command line.
func (Options) OneOfMany ¶
OneOfMany reports whether this kakel is one to hand its command line to a kakel already running: not one driving itself for screenshots, nor one told to run alone with KAKEL_ALONE=1.
func (Options) OpensFolder ¶ added in v0.9.0
OpensFolder reports whether this kakel was started for a folder, and which: a window holding a file manager pane there, and nothing else.
func (Options) Quits ¶
Quits says the command line only ends the kakel running, and opens nothing when none is.
func (Options) StartsHidden ¶ added in v0.9.0
StartsHidden reports whether this kakel's first window opens hidden: one that starts in the tray.
func (Options) StartsInTray ¶
StartsInTray reports whether this kakel starts in the tray, with its first window never shown: as it does with the computer, and when it is started with nothing to do, as from its shortcut. A window opens from the tray, the launcher's key, or kakel started again. Where there is no tray to start in, a window shows after all.
func (Options) SystemTitleBar ¶ added in v0.5.0
SystemTitleBar reports whether the settings give windows the system's title bar and frame, as they say now: read again for each window, so a change takes for the windows opened after it.
func (Options) Trays ¶
Trays reports whether this kakel shows itself in the tray: one of many does, and one driving itself for screenshots does not.
func (Options) WindowPlace ¶
WindowPlace is where the window was as it last closed, for it to open there again, or nil the first time: for a start for a folder, where the last file manager window was, when one was. gunim moves it onto a screen when the one it was on is gone.
func (Options) WindowSize ¶
WindowSize is the first window's size: room for a terminal of the usual size, at the font size given or kept from last time.
type OutputArrived ¶ added in v0.5.0
type OutputArrived struct{}
OutputArrived tells a window that shells of its panes wrote: it draws again, and each terminal copies its screen as it does, however often they write. It goes as a patch, rather than as the window's state, which costs every window a whole update.
type OverState ¶ added in v0.12.0
type OverState struct {
// Windows are kakel's windows, each saying where it stands, and
// Panes their panes.
Windows []OverWindow
Panes []Pane
// Front numbers the window in front, and Focus is its pane with the
// keyboard, which has the ring as All Panes opens.
Front int
Focus string
// FontSize and Font are what the terminals are drawn in, PaneTitles
// says panes show a line naming them, and Machines name the machines
// on those lines.
FontSize float32
Font Font
PaneTitles bool
Machines []machines.Info
// Shortcuts are the changes the shortcuts file makes to the keys,
// one of which closes it.
Shortcuts []keys.Change
// Close asks it to close, as its key does in a window it covers.
Close bool
}
OverState is what All Panes shows in a window of its own.
type OverTab ¶ added in v0.12.0
OverTab is one tab of a window, how its panes are arranged, and Pane the one of them its tab names.
type OverWindow ¶ added in v0.12.0
type OverWindow struct {
ID int
// Tabs are its tabs, in order, and Front the group of the one in
// front.
Tabs []OverTab
Front int
// Stage is the size of its stage, and StageAt where the stage is in
// the window, and Size the window's own size, as it last said, in
// its logical pixels; zero before it has.
Stage geom.Size
StageAt geom.Rect
Size geom.Size
// Home is where the window is on the screen, in the space of All
// Panes' own window; empty where that cannot be said, and in the
// windows' own state.
Home geom.Rect
}
OverWindow is one of kakel's windows as All Panes shows it.
type OverviewDone ¶ added in v0.12.0
type OverviewDone struct{}
OverviewDone says All Panes' own window has finished, and may close, and OverviewLeaving that it is on its way.
type OverviewFocus ¶ added in v0.12.0
type OverviewFocus struct{ On bool }
OverviewFocus says All Panes' own window has the keyboard, or with On unset that it went elsewhere: a click outside it, as on a window on another monitor, closes it.
type OverviewOpener ¶ added in v0.12.0
OverviewOpener opens All Panes' own window over monitor m, in the theme named theme from its first frame, and returns its client and the window. It runs on a goroutine of its own.
type OverviewShown ¶ added in v0.12.0
type OverviewShown struct{ On bool }
OverviewShown says All Panes opened, or closed with On false, in the window it came from. While it is open the window hears of output from every window's panes, not only its own.
type Pane ¶
type Pane struct {
ID string
Title string
// Window numbers the window it is in, among kakel's own; it is set
// in AllPanes alone.
Window int
// Machine is the server the pane's shell runs on, "" for this
// computer.
Machine machines.ID
// On is the machine the pane runs on when that is a server the
// window in Machine reached, and "" for the window's own.
On string
// Kind says what the pane is: a terminal, a file manager or a reader.
Kind string
// Named is set once the user has named the pane, and shell is the
// title its shell last gave it.
Named bool
// Tunnel is the tunnel a tunnel's pane tells of.
Tunnel string
// Ended says the program in a terminal pane has ended; the pane
// stays, asking whether to start it again.
Ended bool
// Rang says its program rang the bell since the user last looked.
Rang bool
// Note is what the program in the pane says about itself: how far
// along it is, and its last message.
Note string
// Command says the pane runs one command rather than a shell, and
// offers to run it again when it finishes.
Command bool
// ShellKind is the kind of shell a terminal pane runs, as bash or
// PowerShell, for colouring code pasted into it. It is NoRoute for a
// pane running a command, and for one opened through another kakel
// window, whose shell this one cannot see.
ShellKind shellsetup.Route
// SplitFrom is, for a split's chooser, the pane it was split from.
SplitFrom string
// contains filtered or unexported fields
}
Pane is one pane, as the Machines pane lists it.
type PaneDrag ¶
PaneDrag is what a pane dragged out of the switcher carries: the pane, the window it is in, and where the image of it is held, from its top left corner.
type PaneToNewWindow ¶
PaneToNewWindow moves a pane into a window of its own, opened with its top left corner at At, in the space of the window the intent came from, and Size large.
type PaneToTab ¶ added in v0.12.0
PaneToTab moves a pane onto a tab of its own in the window numbered Window. Asked of the window it is in, it takes the pane out of its split onto a tab of its own there. Dropped on the window's tab bar, or above its stage, Bar is set: the tab goes in front of the tab of group Before, or last for 0, and comes to the front.
type PaneToWindow ¶
type PaneToWindow struct{ Pane string }
PaneToWindow moves a pane into the window the intent came from, on a stage of its own.
type PasteImage ¶
type PasteImage struct{ Pane string }
PasteImage hands the image on the clipboard to the program in a terminal pane, for a paste that found no text.
type PasteImageAsFile ¶
type PasteImageAsFile struct{ Pane string }
PasteImageAsFile writes the image on the clipboard to a file on the machine a terminal pane runs on, and types the path. An empty Pane is the focused one.
type PickFont ¶
type PickFont struct{ Name string }
PickFont draws the terminals in the family Name, from the Font menu; empty is Go Mono.
type PickShell ¶
type PickShell struct{ ID string }
PickShell keeps the shell ID as the one new terminals start, or with ID empty, goes back to the default.
type PickTheme ¶
type PickTheme struct{ Name string }
PickTheme draws the window, terminals and all, in a theme.
type Pings ¶
type Pings struct {
Problems, Dones, Calls uint64
Connected, Lost uint64
Finished, Failed uint64
FrontFinished, FrontFailed uint64
}
Pings counts what the window tells of, by rings out past its edges and by sounds, as the settings say, each time a count goes up. Connected and Lost are connections made and lost by themselves; Finished and Failed long commands and programs ending well or not; Calls bells rung in panes out of sight; and Problems and Dones every other failure, and other work finished, such as a copy.
FrontFailed and FrontFinished count long commands that finished in the pane in front. The window tells of those only while another program has the keyboard, since otherwise the user is watching.
type Placement ¶
type Placement struct {
Beside string
Vertical bool
// Instead puts the pane in the place of that one, a split's chooser,
// which goes: the chooser's split is the one it lands in.
Instead string
}
Placement says where a new pane goes: on a stage of its own, or beside a pane, below it with vertical.
type PopOut ¶
type PopOut struct{}
PopOut takes the focused pane out of its split, onto a stage of its own.
type PreviewTheme ¶
type PreviewTheme struct{ Name string }
PreviewTheme shows a theme, as picking it would, and keeps nothing: the theme picker shows the one its highlight is on. Name empty ends the preview, and the theme in use comes back.
type PromptOpener ¶ added in v0.4.0
PromptOpener opens a window of its own for q, with its view mounted, in the theme named, centred over near, the kakel window in front, or on the main display when near is nil. It runs on a goroutine of its own.
type PutSecret ¶
PutSecret keeps a secret: a new one when ID is empty. An empty Value on a change keeps the value saved.
type ReadAgain ¶
ReadAgain reads a reader pane's file again: as lines with Text, for a file named as an image that is not one.
type Reader ¶
type Reader struct {
Path string
Lines []string
// Cut says the file was longer than a reader holds.
Cut bool
Err string
// Seq counts its reads.
Seq int
// Line is the line to show first, counted from 1, and 0 for the top.
Line int
// Name is the file's name, for telling its kind; Pic is it, read as
// an image; SoFar is how much of it a read has got through.
Name string
Pic *files.Pic
SoFar int64
// Find opens the reader with its find bar open, as the scrollback
// is opened, to be searched, and FindAgain counts the times it is
// asked to open it again after.
Find bool
FindAgain int
// Of is the terminal pane whose scrollback the reader shows, which
// reading again reads again; SaveAs is where a save is offered.
Of, SaveAs string
// Saves counts the reader's saves that have finished, and SaveErr
// is why the last one failed, empty when it worked.
Saves int
SaveErr string
// Expect is how large the file was listed as, for the reader to say
// how far a read has got of it, and 0 when nobody said.
Expect int64
// Gone says why a scrollback's reader has nothing left to read
// again, its pane having closed.
Gone string
// Text says a file named as an image is read as lines: it was not
// one.
Text bool
}
Reader is what a reader pane shows: a file's lines.
type ReloadServers ¶
type ReloadServers struct{}
ReloadServers reads the saved servers again, for a list changed by another window or by hand.
type ReloadShortcuts ¶
type ReloadShortcuts struct{}
ReloadShortcuts reads the shortcuts file again.
type RemoteWindow ¶
type RemoteWindow struct {
Name machines.ID
Addr string
// Open is what it has open, with a screen to work in, less what
// this window already shows.
Open []serve.Open
// Folders are the folders it has saved for the machines it reaches,
// by its key for each, to offer under their headings.
Folders map[string][]string
// Machines are the machines it is connected to, by its key for
// each, each a heading here with nothing open on it too.
Machines []string
}
RemoteWindow is a window this one is connected to, as the sidebar shows it.
type RemoveSavedKey ¶
type RemoveSavedKey struct{ Path string }
RemoveSavedKey takes a key file off the list of saved ones, leaving the file where it is.
type RemoveSecret ¶
type RemoveSecret struct{ ID string }
RemoveSecret takes a secret out of the vault, and RemoveSecrets several at once.
type RemoveSecretsKey ¶
type RemoveSecretsKey struct{ Fingerprint string }
RemoveSecretsKey stops a key, or the passphrase, opening the secrets.
type RenamePane ¶
type RenamePane struct{ Pane, Title string }
RenamePane names a pane; its shell's titles no longer change it. An empty name hands the name back to the shell.
type RunCommand ¶
type RunCommand struct {
Machine machines.ID
Line, Dir string
Keep bool
// Beside puts its pane in a split beside that pane, below it with
// Vertical, rather than on a stage of its own.
Beside string
Vertical bool
// Instead runs it in the place of that split's chooser.
Instead string
// Forget is a saved command picked and then unticked, which is how
// the user says to forget it.
Forget string
}
RunCommand runs Line in a pane of its own on Machine, in Dir when given, and keeps it for next time with Keep.
type RunSavedCommand ¶
type RunSavedCommand struct{ Saved settings.SavedCommand }
RunSavedCommand runs a command kept from before.
type RunSavedCopy ¶
RunSavedCopy does a saved copy.
type SaveLines ¶
SaveLines writes lines to a file at Path on this machine, for the reader in Pane, which is told how it went.
type SaveLook ¶ added in v0.5.0
SaveLook keeps what the Settings dialog chose: the events kakel tells of by a sound and by rings, and whether windows take the system's title bar, which windows opened from then on do.
type SaveServer ¶
SaveServer saves a server, in place of the one named Under when that is set.
type SaveThemeEdits ¶ added in v0.12.0
SaveThemeEdits keeps the theme editor's changes to the theme called Theme, gunim's theme values as JSON, and draws the window with them. Empty Edits take them all out.
type SaveThisComputer ¶
SaveThisComputer keeps this computer's settings. StartFolder is where a new terminal starts, empty for the home folder, and a leading ~ is the home folder; Shell is the shell a new terminal runs, by the ID the shell list gives it, empty for the user's own.
type SecretEdit ¶ added in v0.12.0
type SecretEdit struct {
Seq uint64
Item SecretItem
Value string
// contains filtered or unexported fields
}
SecretEdit is a secret to change, with what is saved in it, sent to the window that asked for it.
type SecretEditShown ¶ added in v0.12.0
type SecretEditShown struct{ Seq uint64 }
SecretEditShown says the window has the form open, and the value sent for it can go.
type SecretItem ¶
type SecretItem struct {
ID, Name, User, File string
Kind secrets.Kind
// Logins are where it signs in, user@host, for a picker to put it
// first for a pane on one of those machines.
Logins []string
}
SecretItem is one secret, without the secret.
type SecretKey ¶
type SecretKey struct {
Name, Note, Fingerprint string
Passphrase bool
// Removing says what is left once it goes.
Removing string
}
SecretKey is something that opens the vault: a key, or the vault's passphrase.
type Secrets ¶
type Secrets struct {
// Exists is set once there is a vault, and Open while it is
// unlocked.
Exists, Open bool
Items []SecretItem
Keys []SecretKey
// Passphrase says a passphrase opens the vault as well as its keys.
Passphrase bool
// Waiting names the terminal used last when an agent has asked for a
// secret there, which Type answers, return and all.
Waiting string
// TypeInto is the terminal Type types into, the one used last, and
// TypeIntoTitle what it is called, with the machine it is on: ""
// for none.
TypeInto, TypeIntoTitle string
// Editing is a secret to change, with its value, for the window
// that asked to show it in a form once.
Editing []SecretEdit
// LockAfter is how long the secrets may go unused before they lock
// themselves, 0 for never. Known only while they are open.
LockAfter time.Duration
}
Secrets is the vault as the window shows it.
type ServedClient ¶
type ServedClient struct{ Name, From, As string }
ServedClient is a window connected to this one.
As is the machine a plain ssh client's tunnels go out from, by the user name it logged in as; empty for a kakel window.
type ServedTunnel ¶
type ServedTunnel struct{ Client, From, Label, On string }
ServedTunnel is a tunnel a window connected to this one holds through it: whose, Client from From, what it forwards, and the machine here its streams go out from, by name.
type Serving ¶
type Serving struct {
// On says the window is served, at Addr, by the host key with
// Fingerprint.
On bool
Addr string
Fingerprint string
// Clients are the windows connected, by the name their key has in
// the authorized keys, and where they came from, and Tunnels the
// tunnels they hold through this window.
Clients []ServedClient
Tunnels []ServedTunnel
// Port and Anywhere are what serving starts with: the port asked
// for last, and whether it listened on every network. AtStart is
// what kakel does as it starts, when the window was served as it
// last closed: settings.ServeAsk, ServeAlways or ServeNever.
Port int
Anywhere bool
AtStart string
// Relay is how serving goes through a relay: RelayOn says it does,
// NoPort that it listens on no port of its own, RelayURL is the
// relay with its secret, RelayHost the relay without it, and Code
// what a window connecting gives there. Link is the URL and the
// code together, for a window connecting to paste.
RelayOn bool
NoPort bool
RelayURL string
// RelayVia is the saved server the relay is reached through, empty
// for this machine.
RelayVia machines.ID
RelayHost string
Code string
Link string
// Relayed says the window is served through the relay now; Reached
// that the relay has it, and RelayTrouble why not when it has not.
Relayed bool
Reached bool
RelayTrouble string
// RelayLast is the relay last connected to a window through, to
// offer again.
RelayLast string
// Host is this machine's name, for the ssh commands the window
// explains.
Host string
// TunnelsConnect lets plain ssh's tunnels connect this window to
// saved servers on the way, and go through kakel windows.
TunnelsConnect bool
// Proxy is the HTTP proxy relays are reached through, as set: empty
// for the system's, relay.NoProxy for none.
Proxy string
// Allowed are the keys that may connect, by name, from the file at
// AllowedAt, Keys the same keys with their fingerprints, and
// Problem what stops that file being read.
Allowed []string
Keys []serve.AllowedKey
AllowedAt string
Problem string
// Here are the public keys on this machine that may not connect
// yet, to pick one to add.
Here []LocalKey
// Edits counts the changes asked to the keys that may connect,
// which worked or did not, for the window that asked to hear how it
// went.
Edits uint64
// Tries counts the times serving was asked to start, which worked
// or did not, for the window that asked to hear how it went.
Tries uint64
}
Serving is the serving, as the window shows it.
type SetAgentMay ¶
SetAgentMay says what the agent may do in a pane beyond reading and typing.
type SetBeta ¶ added in v0.12.0
type SetBeta struct{ On bool }
SetBeta has updates take beta releases too, or no longer.
type SetFontSize ¶ added in v0.10.0
type SetFontSize struct{ Size float32 }
SetFontSize sets the terminals' font size, in logical pixels.
type SetLauncherFiles ¶ added in v0.12.0
type SetLauncherFiles struct{ Where string }
SetLauncherFiles keeps where files from the launcher or the tray open: settings.LauncherFilesTab, LauncherFilesBeside or LauncherFilesWindow.
type SetLauncherKey ¶
type SetLauncherKey struct{ Key string }
SetLauncherKey makes Key the launcher's, written as a shortcut is, "none" for none, or "" for the one kakel comes with.
type SetPasteCheck ¶ added in v0.12.0
type SetPasteCheck struct{ On bool }
SetPasteCheck turns on or off opening a paste of several lines, or a large one, in an editor before it reaches the pane.
type SetRelayProxy ¶ added in v0.12.1
type SetRelayProxy struct{ Proxy string }
SetRelayProxy sets the HTTP proxy relays are reached through: a URL, relay.NoProxy, or empty for the system's.
type SetSecretsLockAfter ¶ added in v0.12.0
SetSecretsLockAfter changes how long the secrets may go unused before they lock themselves: 0 for never.
type SetServeAtStart ¶ added in v0.10.0
type SetServeAtStart struct{ When string }
SetServeAtStart sets what kakel does as it starts when the window was served as it last closed: settings.ServeAsk, ServeAlways or ServeNever.
type SetServeDefaults ¶ added in v0.10.0
SetServeDefaults sets the port serving starts on, and whether it listens on every network, for the next time it starts.
type SetTermProgram ¶
type SetTermProgram struct{ Called string }
SetTermProgram sets what new shells here are told the terminal is called, "" for kakel's own name.
type SetTunnelsConnect ¶ added in v0.12.1
type SetTunnelsConnect struct{ On bool }
SetTunnelsConnect sets whether plain ssh's tunnels may connect this window to saved servers, and go through kakel windows.
type SetUpdates ¶
type SetUpdates struct{ What string }
SetUpdates keeps what kakel does with a newer release: one of settings.UpdatesOff, UpdatesNotify and UpdatesInstall.
type Share ¶
type Share struct {
Host string
}
Share is the share, as the window shows it: its code, and the panes in it with what each allows.
type SharedPane ¶
type SharedPane struct {
// offered.
Note string
}
SharedPane is one pane in the share.
type ShellChoice ¶
type ShellChoice struct {
ID, Title string
// Folder is where Windows reaches a WSL distribution's files, empty
// for any other shell.
Folder string
}
ShellChoice is a shell on this machine, as the palette offers it.
type ShiftTab ¶
type ShiftTab struct{ Back bool }
ShiftTab moves the tab in front one place later, or one earlier with Back.
type ShowAbout ¶ added in v0.9.1
type ShowAbout struct{}
ShowAbout opens the window about kakel: its version, what each release changed, and Check for Updates.
type ShowLog ¶
ShowLog opens a log's pane, or goes to it: the connection log of Machine, or the window's own when Machine is "".
type ShowReadyUpdate ¶ added in v0.8.0
ShowReadyUpdate shows the update window on Release, put in place by itself, to restart into it.
type ShowScrollback ¶
type ShowScrollback struct{ Pane string }
ShowScrollback opens what a terminal pane has kept, scrollback and screen, in a reader beside it, to search and copy from.
type ShowSecrets ¶
type ShowSecrets struct{}
ShowSecrets opens the secrets pane, unlocking the vault, or offering to start one.
type ShowServers ¶
type ShowServers struct{}
ShowServers opens the Machines pane in a tab of its own, or goes to it where it is, bringing its window to the front.
type ShowSettings ¶ added in v0.12.0
type ShowSettings struct{}
ShowSettings opens the Settings pane in a tab of its own, or goes to it where it is, bringing its window to the front.
type ShowTab ¶
type ShowTab struct{ Group int }
ShowTab puts a tab in front, with the keyboard on the pane in it that had it last.
type ShowThemeEditor ¶ added in v0.12.0
type ShowThemeEditor struct{}
ShowThemeEditor opens the theme editor in a tab of its own, or goes to it where it is.
type ShowTunnel ¶
type ShowTunnel struct{ ID string }
ShowTunnel opens a tunnel's pane, or goes to it.
type ShowTyped ¶
type ShowTyped struct{ Pane string }
ShowTyped opens what agents typed into Pane in a reader beside it.
type ShowWhatsNew ¶ added in v0.8.0
type ShowWhatsNew struct{ From string }
ShowWhatsNew shows what the releases after From changed, up to this one: every release's notes for "".
type SoundSetter ¶ added in v0.5.0
type SoundSetter func(iface, any bool)
SoundSetter is told whether the interface sounds, and whether any sound is wanted at all, as kakel starts and each time that changes.
type SplitMoved ¶
type SplitMoved struct {
Split string
}
SplitMoved says where the pointer left a split's divider.
type SplitPane ¶
type SplitPane struct {
Vertical bool
Machine machines.ID
Elsewhere bool
Shell string
// Instead opens it in the place of that split's chooser, on the
// machine of the pane the chooser was split from.
Instead string
}
SplitPane splits the focused pane, and opens a shell in the new half: to the right, or below with Vertical. The shell is on the focused pane's machine, or on Machine with Elsewhere; Shell names one of this computer's shells.
type StageSized ¶ added in v0.12.0
StageSized says where the stage of the window it came from is in it, and how large the window is, for All Panes to draw its tabs that shape, and the window as it stands.
type StartServing ¶
type StartServing struct {
Port string
Anywhere bool
// NoPort listens on no port, and Relay serves through the relay
// at RelayURL as well, or instead, reached through the saved
// server RelayVia, or from this machine when that is empty.
NoPort bool
Relay bool
RelayURL string
RelayVia machines.ID
}
StartServing serves the window on Port, on this machine only or on every network.
type State ¶
type State struct {
// Window numbers the window, among kakel's own, and Behind says
// another is in front, which sends the echoes and asks for the
// user's attention in its place.
Window int
Behind bool
// Panes are the open panes, in the sidebar's order.
Panes []Pane
// Stage is the arrangement on screen: the group of panes the
// focused pane belongs to. Nil when no pane is open.
Stage *Box
// Groups are how each of the window's panes is arranged, by pane:
// the split it sits in, or itself alone, for the switcher to grow a
// pane into its place and its neighbours into theirs.
Groups map[string]*Box
Focus string
// Tabs are the window's tabs, in order.
Tabs []Tab
// AllPanes are every window's panes, each saying which window it is
// in, for the Machines pane to list, and Working the pane last worked
// in, in whichever window, whose row it lights.
AllPanes []Pane
Working string
// Overview is every window, with its tabs, for All Panes;
// Overviewing says All Panes is open somewhere, so the windows share
// what their panes draw; and OverviewAlone says it opens in a window
// of its own.
Overview []OverWindow
Overviewing bool
OverviewAlone bool
// InTray says kakel is to show its icon in the system tray, and run
// on there once its last window closes, where there is a tray.
InTray bool
// LauncherKey is the launcher's key, as written.
LauncherKey string
// LauncherFiles is where files from the launcher or the tray open:
// settings.LauncherFilesTab, LauncherFilesBeside or
// LauncherFilesWindow.
LauncherFiles string
// Update is where kakel stands on installing and updating.
Update Update
// Sounds and Rings are the events kakel tells of by a sound and by
// rings around the window, and SystemTitleBar says windows opened
// from now on take the system's title bar.
Sounds, Rings Alerts
SystemTitleBar bool
// FontSize is the terminals' font size in logical pixels.
FontSize float32
// Fonts are the families to draw the terminals in, and Font the one
// they are drawn in.
Fonts []string
Font Font
// Marks are the colours of the rings round shared panes.
Marks look.Marks
// KeyFiles are the key files kept, newest first, offered when a
// server is saved.
KeyFiles []string
// Theme names the theme the window is drawn in, and Themes those on
// offer.
Theme string
Themes []string
// Asks are the questions connections are waiting on the user for,
// oldest first.
Asks []Ask
// Saved are the saved servers.
Saved []remote.Host
// Readers are what the readers show, by pane. Each is replaced
// whole, never changed in place.
Readers map[string]Reader
// Tunnels are the tunnels open, and those stopped until cleared,
// and SavedTunnels those kept for next time, newest first.
Tunnels []Tunnel
// Jobs are the file jobs, running and finished, oldest first.
Jobs []Job
// Accounts are the machines with a connection log, in the order
// their first connection began.
Accounts []machines.ID
// Secrets is what the vault holds, by name.
Secrets Secrets
Share Share
// Serving is this window served to others.
Serving Serving
// Windows are the windows this one is connected to.
Windows []RemoteWindow
// Machines are what everything else names machines by, their IDs,
// with the names to show: the saved servers and windows, and the
// quick connections.
Machines []machines.Info
// PaneTitles says each pane shows a line naming it, and Bells
// counts the bells rung in panes, for the window to ask for the
// user's attention.
PaneTitles bool
// SavedCommands are the commands kept, newest first.
SavedCommands []settings.SavedCommand
// Shells are the shells found on this machine, and ChosenShell the
// one new terminals start, "" for the user's own.
// Connected are the servers connected to, by name, and Dialing the
// ones being connected to.
Connected []machines.ID
Dialing []machines.ID
// Dropped are the machines whose connection went by itself, kept on
// the sidebar, greyed, until cleared.
Dropped []machines.ID
Shells []ShellChoice
ChosenShell string
// DefaultShell is the ID of the shell a new terminal here starts:
// ChosenShell, or the user's own as found among Shells; "" where
// that is not known.
DefaultShell string
// HereMachine is the machine a new terminal and New Files open on,
// from the pane in front, and HereShell the name of the shell such
// a terminal runs on this computer: the one in front, or else the
// default. It is "" on a server, or where it is not known.
HereMachine machines.ID
HereShell string
// ThisComputer is this computer's settings: where a new terminal
// starts.
ThisComputer ThisComputer
// Favourites are the folders saved on any machine, in the user's
// order.
Favourites []Favourite
// ShellSetup says new shells here are taught to say what they are
// doing, and TermProgram what they are told the terminal is called,
// "" for kakel's own name.
// Shortcuts are the changes the user's shortcuts file makes to the
// window's keys, and ShortcutsRead counts its reads; ShortcutsAgain
// says the last read was asked for, and the window says so once it
// has taken the file. Contents are
// the themes' colours for the panes, when the themes were read
// again.
// SavedCopies are the copies kept, newest first.
SavedCopies []settings.SavedCopy
Shortcuts []keys.Change
ShortcutsRead uint64
// See Shortcuts.
ShortcutsAgain bool
Contents map[string]theme.Theme
// Looks are the themes whole, when they were read again: for the
// theme editor, each with its edits.
Looks []look.Themed
ShellSetup bool
TermProgram string
// PasteCheck says a paste of several lines, or a large one, opens in
// an editor before it reaches the pane.
PasteCheck bool
Bells uint64
// Pings counts what the window sends an echo out for, past its
// edges.
Pings Pings
SavedTunnels []settings.SavedTunnel
Status string
// Notices are the latest notices, oldest first, for the window to
// show each once.
Notices []Notice
// Views are the latest files to show in the viewer, oldest first,
// for the window to open each once.
Views []Viewed
}
State is what the window shows.
type StopServing ¶
type StopServing struct{}
StopServing stops, hanging up on every window connected.
type Tab ¶
type Tab struct {
// Group numbers it, for the intents about it.
Group int
// Pane is the pane in it that last had the keyboard, whose title
// the tab shows, and Panes counts the panes in it.
Pane string
Panes int
}
Tab is one of a window's tabs.
type TabToNewWindow ¶
TabToNewWindow moves a tab into a window of its own, opened with its top left corner at At, in the space of the window the intent came from, and Size large. Group 0 is the tab in front.
type ThisComputer ¶
type ThisComputer struct {
StartFolder string
}
ThisComputer is what the windows are told of this computer's settings. The shell is State's ChosenShell.
type ToggleAutostart ¶
type ToggleAutostart struct{}
ToggleAutostart starts the installed kakel with the computer, into the tray, or no longer.
type ToggleFolders ¶ added in v0.9.0
type ToggleFolders struct{}
ToggleFolders opens folders with the installed kakel's file manager, in place of File Explorer, or no longer.
type ToggleOverview ¶ added in v0.12.0
type ToggleOverview struct{}
ToggleOverview opens All Panes in a window of its own, over the screen the window it came from is on, or closes it.
type TogglePaneTitles ¶
type TogglePaneTitles struct{}
TogglePaneTitles shows or hides the line naming each pane.
type ToggleServers ¶
type ToggleServers struct{}
ToggleServers opens the Machines pane, or closes it while it is open.
type ToggleShellSetup ¶
type ToggleShellSetup struct{}
ToggleShellSetup turns the teaching of new shells here on or off.
type ToggleTray ¶
type ToggleTray struct{}
ToggleTray keeps kakel in the tray, or out of it, and says so for next time.
type ToolWindow ¶
ToolWindow opens a tool pane, the Machines pane or the secrets by Kind, in a window of its own, opened at At, in the space of the window asking, and Size large. One alone in its window already is shown there.
type Tray ¶
type Tray struct {
Set func(gunim.Tray) error
StayOpen func(bool)
// Notify shows a message from the icon, and may be nil.
Notify func(title, body string) error
}
Tray is what the program needs of gunim's tray: showing an icon, and keeping the program running with no window.
type Tunnel ¶
type Tunnel struct {
ID string
Machine machines.ID
// Label says what it forwards, as ":8080 → db:5432".
Label string
// Note says what it is doing: the streams it carries, how many
// failed, or that it stopped.
Note string
// Live is set while it forwards, and Watching while its traffic is
// written into its account.
Live, Watching bool
// Pane is the pane showing its account, or "".
Pane string
// Meter counts what goes through it, for the sidebar to draw.
Meter *meter.Meter
}
Tunnel is a forwarded port, as the sidebar lists it.
type TypeSecret ¶
type TypeSecret struct{ ID, Into string }
TypeSecret types a secret into terminal pane Into, or the terminal used last when Into is "".
type UnlockSecrets ¶
type UnlockSecrets struct{}
UnlockSecrets unlocks the vault, asking whatever it takes.
type Update ¶
type Update struct {
// Installed says this is the installed copy, Installable that this
// system can have one, and Autostart that it starts with the
// computer. Folders says folders open with it, where FoldersHere
// says they can. Updates is the setting.
Installed, Installable, Autostart bool
Folders, FoldersHere bool
Updates string
// Beta says updates take beta releases too.
Beta bool
}
Update is what the windows are told of installing and updating.
type UpdateWindows ¶ added in v0.8.0
type UpdateWindows interface {
ShowUpdate(u install.Update) error
ShowWhatsNew(from string) error
ShowAbout(o install.About) error
}
UpdateWindows opens gunim's windows of an update, on the program's gunim app: install.ShowUpdate and install.ShowWhatsNew.
type ViewLink ¶ added in v0.12.0
ViewLink asks for a link clicked in a document shown in the viewer to open: a web or mail address alone, as a link in a pane does.
type Viewed ¶ added in v0.12.0
type Viewed struct {
ID uint64
// Name is the file's name, and Path and Where where it is: the path
// on the machine Where names.
Name, Path, Where string
Data []byte
Cut bool
Line int
Err string
// contains filtered or unexported fields
}
Viewed is a file shown in the viewer over a window: its bytes, or their start with Cut set, to show at Line, or why it could not be read.
type WatchTunnel ¶
WatchTunnel starts or stops writing a tunnel's traffic into its account.
type WindowFocused ¶
type WindowFocused struct{}
WindowFocused says the window the intent came from has the keyboard, which puts it in front.
type WindowOpener ¶
type WindowOpener func(from *gunim.Window, at geom.Point, size geom.Size, place *driver.Placement) (gunim.Client, *gunim.Window, error)
WindowOpener opens another window, placed at at in from's space, size large, or with place set, there on the screen; and returns its client and the window. It runs on a goroutine of its own.
type WriteShortcuts ¶
WriteShortcuts writes a shortcuts file holding Bindings, every shortcut the window has now, for the user to start from.
type WriteSkill ¶
WriteSkill writes the skill for an agent program, which tells it how to work in the panes; Over writes over one edited since.
type WriteThemeFile ¶
type WriteThemeFile struct{}
WriteThemeFile writes a themes file holding a copy of the theme the window is drawn in, for the user to start from.
Source Files
¶
- agents.go
- agenttyped.go
- app.go
- command.go
- connect.go
- copies.go
- dialas.go
- drops.go
- ended.go
- favourites.go
- filemanager.go
- files.go
- flags.go
- fmfs.go
- fmpanes.go
- fmsource.go
- fonts.go
- git.go
- identity.go
- images.go
- install.go
- install_other.go
- jobs.go
- launcher.go
- links.go
- logs.go
- look.go
- machines.go
- overview.go
- ownwindows.go
- programs.go
- prompts.go
- quit.go
- recentpick.go
- reopen.go
- rtt.go
- secrets.go
- secretsfile.go
- secretsignin.go
- servers.go
- serving.go
- shellpick.go
- shot.go
- shotinput.go
- signin.go
- sshimport.go
- sshkeys.go
- stress.go
- tabs.go
- thiscomputer.go
- through.go
- tray.go
- tunnels.go
- updates.go
- viewfile.go
- windowcmds.go
- windows.go
- zippass.go