-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-DISPLAY support #22
Comments
Just to check - are you referring to being able to run a separate clipster daemon for each X session, or running one daemon and maintaining a shared clipboard history for them all? The former is easy to achieve by just creating a separate config and data directories for each session, and using The latter is probably also achievable by watching the clipboards of multiple displays. Currently we do the following to open the default primary selection: self.primary = Gtk.Clipboard.get(Gdk.SELECTION_PRIMARY) This could be changed to accept a display name, something like: self.primary = []
for display_name in (":0", ":1"):
display = Gdk.Display.open(display_name)
self.primary.append(Gtk.Clipboard.get_for_display(display, Gdk.SELECTION_PRIMARY)) It's then just a matter of handling the owner-change events for all the selections in the the list, rather than just one The one issue is that I've not managed to find a way to list all the active displays on a system, so you would need to pass in the list of displays to be 'watched' as a config option at startup. This might be the best option anyway, since you may have 3 displays running, but only want to share the clipboard between 2 of them. This is probably a useful feature, so I'll look into adding it to the code in the near future. |
Awesome, thanks! I can see the use case for both approaches, and it's good that the first one already works by using separate configs. Do you think it's useful to be able to specify only the |
Just realised I never answered the final part of your question - apologies! clipster uses the following mechanism to decide on the root to use for creating the xdg_data_home = os.environ.get('XDG_DATA_HOME', os.path.join(os.environ.get('HOME'), ".local/share")) So if you want to run different instances of clipster with the same config, but different data_dirs, then do:
This should create the directory (Equally, |
As to the idea of a single clipster instance being shared between multiple X displays - I'm going to leave that one open but as a low priority - if there are more people requesting this, or if someone submits a PR for it, I'm happy to revisit this. |
Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am using different X server instances, and have noticed that you can only have one clipster daemon running, and it's bound to that $DISPLAY.
I might be nice to have headless daemon that can be used from different environments, and where
clipster -s
(to open the selection window) uses the current $DISPLAY.The text was updated successfully, but these errors were encountered: