Giter VIP home page Giter VIP logo

Comments (1)

dnut avatar dnut commented on June 25, 2024

bbac459

I came up with a compromise approach that still links inputs to outputs but doesn't bother trying to hybridize displays. It just finds all the x11 and wayland displays using the standard approaches to access those displays without any fancy attempts to create hybrids that work for known specific displays like mutter. So far this looks good enough because if a wayland compositor does not support the wayland standard, it seems to support the x11 clipboard. Treating mutter as x11 works just as well as treating it as a hybrid (or possibly better since calling the wl-paste cli has some weird behaviors).

This is slightly less flexible than the proposed solution because it can't handle these situations:

  1. a display only works with inputs from one implementation and outputs from another implementation,
  2. either a getter or setter exists on its own without any known complement

1 should be doable but it is more complicated so I didn't bother with it yet. I'll leave this issue open to address that approach later.

2 might actually be the easiest approach if you just ignore how any displays are linked together, but that's not optimal because you end up with duplicates. So there should at least be some round of optimization that checks for linkages between inputs and outputs and checks for duplicate representations of displays.

Then there's a question for 2, whether we should be including getters and setters that can be instantiated and called without error, even if they don't appear to be connected to any complementary setter or getter. Would there ever be a real clipboard that has this pattern? Or is it more likely that we'd just be calling useless functions that simply return because the library designer decided to return Ok(()) even if the clipboard doesn't exist? This could actually result in monitoring hundreds of imaginary clipboards that don't exist when there are only a couple clipboards on the machine. So I'm inclined not to include this feature unless there is a known concrete benefit.

from clipboard-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.