SergioRibera / super_clipboard

Manage your clipboard history with a beautiful and simple interface
MIT License
26 stars 3 forks source link

Added system theme detection and logic to remove duplicate entries #1

Closed Mustafa-Dara-Ozevin closed 1 year ago

Mustafa-Dara-Ozevin commented 1 year ago

Disclaimer: I am very new to programming and don't know what I am doing! added system theme detection with the dark-light crate should work on all platforms. Default theme if system theme doesn't get detected is still Dark.

Added logic to remove duplicates. with the current version if you click a previous entry from the clipboard you get duplicate entries. which clutters the program and makes it harder to access the other entries. I added a logic that simply check for same entry and deletes it if it finds one before added the new one. Which results in the entry you clicked just going to start of the list instead getting duplicated. ezgif com-video-to-gif

SergioRibera commented 1 year ago

You probably have problems with the format and clippy, check the result of the ci so I can pass it, anyway to fix the problem with the format, you can run this command:

cargo fmt --all

And to check the clippy and all the verifications you can run this other one

Note: You need to have cargo-make installed, just run cargo install cargo-make

cargo make

Or if you don't want to install anything

cargo clippy -- -D warnings
SergioRibera commented 1 year ago

I'm going to approve it because it looks good, then I'll upload an update accommodating that error in clippy, don't worry, it looks great, thank you very much for your help :D