i3ipc-python icon indicating copy to clipboard operation
i3ipc-python copied to clipboard

A custom DISPLAY to determinate the socket_path.

Open rysson opened this issue 3 years ago • 7 comments

Add display argument to sync and async Connetion() classes to determineate the socket_path. Useful when you work with many Xephyr servers.

rysson avatar May 31 '22 12:05 rysson

The socket reconnection support added.

rysson avatar Jun 21 '22 14:06 rysson

Will conflict with #199 Did the current version create errors or is this a "nice to have" thing?

gibbz00 avatar Sep 09 '22 14:09 gibbz00

Hi, It's a "nice to have" thing.

It's easier to connect to many i3 servers with this PR. Similar to DISPLAY=:1, witch works for single connection.

If you accept #199, I could refactor this PR to avoid using xlib. I can use something similar to:

if self._display:
    env = {**os.eviron, 'DISPLAY': self._display}
else:
    env = None
process = run([binary, '--get-socketpath'], stdout=PIPE, stderr=PIPE, env=env)

That's all what I need.

rysson avatar Sep 09 '22 14:09 rysson

Great clarification, thanks :)

I'm unfortunately not the package maintainer for this project, wish I was though. Just emailed the maintainer asking what's up and if I could help out. I'm thinking about creating a fork of this project since it feels unmaintained, but I'll see if he replies first. We'll just have to wait. So it's up to you if you want to preemptively do the refactor before that :)

gibbz00 avatar Sep 09 '22 14:09 gibbz00

:wave: looking at this now

acrisci avatar Sep 11 '22 20:09 acrisci

@rysson thanks, I accepted #199, can you fix the conflicts?

acrisci avatar Sep 11 '22 20:09 acrisci

@rysson thanks, I accepted #199, can you fix the conflicts?

Sure, I updated my commits. Now should be OK.

rysson avatar Sep 12 '22 08:09 rysson