This commit is contained in:
2025-12-18 15:21:25 +00:00
parent d82389bc42
commit 4f19c2f6c1
10 changed files with 541 additions and 180 deletions

View File

@@ -17,6 +17,15 @@ extern "C" {
#include <unistd.h>
#include <unordered_map>
uint64_t fnv1a_64(const char *s, size_t len) {
uint64_t hash = 1469598103934665603ull;
for (size_t i = 0; i < len; ++i) {
hash ^= (uint8_t)s[i];
hash *= 1099511628211ull;
}
return hash;
}
char *get_from_clipboard(uint32_t *out_len) {
FILE *pipe = popen("xclip -selection clipboard -o", "r");
if (!pipe) {