Continue the implementation of trigger rules (ex scene rules)

This commit is contained in:
Dmitrii Okunev
2024-10-17 21:52:28 +01:00
parent fb33738f1c
commit d17944c0dd
45 changed files with 5077 additions and 1748 deletions

View File

@@ -0,0 +1,27 @@
//go:build linux
// +build linux
package windowmanagerhandler
import (
"context"
"os"
)
type WindowID uint64
type XWMOrWaylandWM interface {
WindowFocusChangeChan(ctx context.Context) <-chan WindowFocusChange
}
type PlatformSpecificWindowManagerHandler struct {
XWMOrWaylandWM
}
func (wmh *WindowManagerHandler) init() error {
if os.Getenv("DISPLAY") != "" {
return wmh.initUsingXServer()
} else {
return wmh.initUsingWayland()
}
}