- TestFuzzyMatchByLabel, TestFuzzyMatchByBranch, TestFuzzyMatchByCwd - TestFuzzyMatchPriority (label wins over branch) - TestFuzzyMatchNoResult, TestFuzzyMatchCaseInsensitive - TestSwitchToWorkspace, TestSwitchToWorkspaceError, TestSwitchToWorkspaceI3Error
22 lines
564 B
Go
22 lines
564 B
Go
package main
|
|
|
|
import (
|
|
i3 "go.i3wm.org/i3/v4"
|
|
)
|
|
|
|
// I3Commander abstrait i3.RunCommand pour testabilite.
|
|
type I3Commander interface {
|
|
RunCommand(command string) ([]i3.CommandResult, error)
|
|
}
|
|
|
|
// FuzzyMatch trouve la premiere session matchant query dans : label > branche > cwd.
|
|
// Case-insensitive. Retourne nil si aucun match.
|
|
func FuzzyMatch(query string, sessions []SessionInfo) *SessionInfo {
|
|
return nil
|
|
}
|
|
|
|
// SwitchToWorkspace bascule vers le workspace indique via i3 IPC.
|
|
func SwitchToWorkspace(commander I3Commander, wsName string) error {
|
|
return nil
|
|
}
|