Coder Social home page Coder Social logo

clipboard-sync's Introduction

felipecrs’ Github Metrics

clipboard-sync's People

Contributors

felipecrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

emejias mizunarei

clipboard-sync's Issues

Not receiving clipboard in some cases

Hi,

Thanks for this tool.

On a Windows 11 computer, when I copy something in my clipboard, I can see the icon with the upload arrow, and then in the OneDrive folder I can see the file created that contains my text.
On the other computer (Windows 10), the icon doesn't show the download arrow, and it seems it doesn't pick the new created file at all.

I checked and the Win 10 computer has the correct folder selected (right click -> open folder). Is there a debug mode I can activate to check what's going on? Any idea why this instance doesn't detect the new file?

They both run the last available version of your app.

Deleted files goes to trash bin

Environment: any Clipboard Sync version on Windows with the OneDrive official client.

This is really annoying. Quickly the trash bin starts to fill up with Clipboard Sync files, and I have to keep cleaning it up manually on both computers.

After investigation, this issue is caused because the folder is synchronized (set as Always keep on this device) on both devices. In this situation, if you delete the file from computer B, when OneDrive synchronizes the deletion with computer A, it will send the file to the trash bin instead of permanently delete it as a "security" measure since the file wasn't explicitly deleted by an action initiated in that computer.

Unfortunately there aren't many options for handling this issue. The only solution I came up with is:

  1. Unset Always keep on this device on both computers
  2. Use a Windows-based, xattr aware file watcher so that files which are not yet downloaded can be detected by Clipboard Sync
  3. If the file name is valid, Clipboard Sync tries to open it. This will cause OneDrive to automatically download the file.
  4. Once Clipboard Sync finished reading the file, it has to mark the file as Online only (as if user had clicked in Free up space in Windows Explorer).
  5. Then, make sure the auto deletion never deletes Online only files.
  6. The original computer, which will have the file available, will then delete the file.
  7. Since this file won't be downloaded in other computers, OneDrive will not send it to the trash bin.

But this is not trivial to implement. I'm keeping this as a note to myself. Any help is of course appreciated.

Support macOS

Hi! Syncing clipboard across devices is a very much needed feature for people working on multiple devices. Thank you for working on such a great idea!

By the way, do you have plan to make it cross platform? Currently it looks kinda weird on macOS.

image

Thanks!

Be less dependent on system time

As we rely on the system's time for writing and reading clipboard files, it's prone to errors when the system time in one of the computers is not correctly set.

For example, I have a managed environment which have the time some seconds ahead of my local environment, and I don't have privilege to adjust or sync the time.

Because of that, Clipboard Sync often loses some events because it thinks it's too old or vice-versa.

I thought in using incremental ids for the clipboard files, like 1, 2, 3. At the time of writing, we figure out the latest and bump. But this may be not perfect, as one system could potentially not have the Clipboard folder to set as "Always available" and thus not all clipboard files would be there for correctly incrementing.

Bundle source code for optimization

It would be cool to bundle the source code, so it can be optimized a bit. However, I stumbled upon a problem, which is that the Electron Forge Webpack plugin mandates the use of a renderer process, which I don't use.

Any help would be appreciated.

Refs electron/forge#2628

Convert code base to a more Object Oriented approach

The current implementation is extremely dirty. When I started the project, I just wanted to make it as quick as possible, because I really wanted to prove my concept.

Now the project is fully functional, but it would be good to add support for more clipboard types.

Converting the codebase to be more objet oriented would help to reduce code repetition and make it much more readable and maintainable.

Stop sending clipboard if no other computer is receiving it

There is already logic to handle this by creating the is-receiving file. However, this file does not get deleted on shutdown, which causes the writing side to believe there is some computer still receiving.

These files should be deleted automatically on shutdown, but if something happens and they don't get deleted, we should clean them up at some point.

We should ensure Clipboard Sync renews this file from time to time, and on the read side, we should only take into account recent enough ones.

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.