focus

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package focus provides commands for managing focus in iTerm2.

This package implements focus management commands that allow users to:

  • Monitor focus changes in real-time
  • Get current focused window/tab/session
  • Set focus to specific windows/tabs/sessions
  • View focus change history

The focus system uses iTerm2's notification system to track focus changes and provides both synchronous operations (get/set) and asynchronous monitoring capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the focus command with all subcommands.

Types

type FocusEvent

type FocusEvent struct {
	Timestamp   time.Time `json:"timestamp"`
	Type        string    `json:"type"`             // application, window, tab, session
	ID          string    `json:"id,omitempty"`     // window/tab/session ID
	Status      string    `json:"status,omitempty"` // for windows: became_key, is_current, resigned_key
	Active      *bool     `json:"active,omitempty"` // for application focus
	Description string    `json:"description"`
}

FocusEvent represents a focus change event

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL