This commit is contained in:
2026-01-10 00:03:22 +00:00
parent 0539d183b1
commit 7727fafeec
6 changed files with 25 additions and 6 deletions

View File

@@ -131,9 +131,14 @@ for_window [app_id="chromium-browser"] fullscreen enable
// Write sway config before starting
const configPath = await this.writeSwayConfig(config);
// Use a fixed socket path so we can reliably connect
const swaySocketPath = `${config.runtimeDir}/sway-ipc.sock`;
this.swaySocket = swaySocketPath;
const env: Record<string, string> = {
XDG_RUNTIME_DIR: config.runtimeDir,
WLR_BACKENDS: config.backends,
SWAYSOCK: swaySocketPath,
};
if (config.allowSoftwareRendering) {

View File

@@ -1 +1 @@
export const VERSION = "0.4.11";
export const VERSION = "0.4.12";

View File

@@ -110,9 +110,16 @@ class EcoVDAgent:
# Search common locations
runtime_dir = os.environ.get('XDG_RUNTIME_DIR', '/run/user/1000')
# Try to find sway socket
# Try to find sway socket - check fixed path first, then glob patterns
import glob
# Check for fixed socket path first (set by eco-daemon)
fixed_socket = f'{runtime_dir}/sway-ipc.sock'
if os.path.exists(fixed_socket):
return fixed_socket
# Fall back to glob patterns for standard Sway socket naming
for pattern in [f'{runtime_dir}/sway-ipc.*.sock', '/run/user/*/sway-ipc.*.sock']:
import glob
sockets = glob.glob(pattern)
if sockets:
return sockets[0]