diff --git a/get_clients.go b/get_clients.go index 3764c63..4c42986 100644 --- a/get_clients.go +++ b/get_clients.go @@ -70,6 +70,15 @@ func GetClients() ([]*Client, error) { return clients, nil } +func WaitForDefaultClient(ctx context.Context) (*Client, error) { + signature, ok := os.LookupEnv("HYPRLAND_INSTANCE_SIGNATURE") + if !ok { + return nil, errors.New("default instance not found because HYPRLAND_INSTANCE_SIGNATURE is not set") + } + + return WaitForClient(ctx, signature) +} + func WaitForClient(ctx context.Context, signature string) (*Client, error) { lockFilePath := fmt.Sprintf("/run/user/1000/hypr/%s/hyprland.lock", signature)