@@ -12,10 +12,11 @@ type Injector interface {
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Backends []string // Ordered list: "ydotool", "wtype", "clipboard"
|
||||
YdotoolTimeout time.Duration // Timeout for ydotool commands
|
||||
WtypeTimeout time.Duration // Timeout for wtype commands
|
||||
ClipboardTimeout time.Duration // Timeout for clipboard operations
|
||||
Backends []string // Ordered list: "clipboard-paste", "ydotool", "wtype", "clipboard"
|
||||
YdotoolTimeout time.Duration // Timeout for ydotool commands
|
||||
WtypeTimeout time.Duration // Timeout for wtype commands
|
||||
ClipboardTimeout time.Duration // Timeout for clipboard operations
|
||||
CtrlShiftVClasses []string // Hyprland window-class substrings that paste with Ctrl+Shift+V
|
||||
}
|
||||
|
||||
type injector struct {
|
||||
@@ -34,6 +35,8 @@ func NewInjector(config Config) Injector {
|
||||
backends = append(backends, NewWtypeBackend())
|
||||
case "clipboard":
|
||||
backends = append(backends, NewClipboardBackend())
|
||||
case "clipboard-paste":
|
||||
backends = append(backends, NewClipboardPasteBackend(config.CtrlShiftVClasses))
|
||||
default:
|
||||
log.Printf("Injection: unknown backend %q, skipping", name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user