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

@@ -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]