configuration file

This commit is contained in:
LeonardoTrapani
2025-08-18 22:59:22 +02:00
parent bcaf1181a0
commit b8a22662f3
13 changed files with 556 additions and 109 deletions
-3
View File
@@ -7,12 +7,10 @@ import (
"time"
)
// typeText types the given text using wtype
func typeText(ctx context.Context, text string, timeout time.Duration) error {
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
// Check if wtype is available
if err := checkWtypeAvailable(); err != nil {
return err
}
@@ -26,7 +24,6 @@ func typeText(ctx context.Context, text string, timeout time.Duration) error {
return nil
}
// checkWtypeAvailable checks if wtype is available on the system
func checkWtypeAvailable() error {
if _, err := exec.LookPath("wtype"); err != nil {
return fmt.Errorf("wtype not found: %w (install wtype package)", err)