sysutils

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Editors = []string{"code", "cursor", "vscodium", "windsurf", "zed", "sublime", "notepad"}

List of recognized editor process names (substring match, case-insensitive)

Functions

func FocusWindow

func FocusWindow(ancestry []int, bestPid int) error

FocusWindow attempts to bring the window(s) associated with the given PIDs to the foreground.

func GetParentPid

func GetParentPid(pid int) int

GetParentPid returns the PPID of the given PID.

func GetProcessName

func GetProcessName(pid int) string

GetProcessName returns the name of the process with the given PID.

func GetWindowFocusError

func GetWindowFocusError() string

GetWindowFocusError returns a platform-specific error message for missing tools.

func IsEditor

func IsEditor(name string) bool

IsEditor checks if a process name matches a known editor.

func SilentCommand

func SilentCommand(name string, args ...string) *exec.Cmd

SilentCommand creates an exec.Cmd configured to run without showing windows on any OS. This is primarily a fix for Windows "console flashes," as Unix-like systems run subprocesses silently by default.

Types

This section is empty.

Jump to

Keyboard shortcuts

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