update
This commit is contained in:
Binary file not shown.
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user