It’s official. Squirrel is now v1.
devlog time is adding logging, updating readme, fixing some small tidbits and polishing up some areas of the app.
Squirrel now prints pretty logs to console when running in development mode and writes logs to a file if running in release.
i realistically can not get a GUI settings panel done due to me needing to divert my attention to more important life stuff. this right here is probably going to be the extent of work done on Squirrel in stardance.
i definitely do plan on working on this in the long term. for example, im not entirely happy and satisfied with the current UI, and global hotkey still does not work on wayland. but right now, more pressing issues are at hand and i cannot give it my all on this project. that said, i do believe that Squirrel is in a very usable 1.0 state, which was my goal.
i might push minor updates if the reviews call for fixes/improvements, but definitely no major features. thanks for reading if you made it here.
now works. setting it to false means history is not retained between sessions. comes with true as default. pinned entries always persist.
attachment shows the behavior when persistence is off.
i ended up deciding not to do the in memory database method for this since it was a bit too much added complexity which could be avoided by just adding an additional is_persistent column to the db.
im not the happiest about how i’ve implemented this right now but im willing to take that hit right now if it means i dont have to deal with databases.
all of the config options are now implemented. we are very close to v1.0.
expect progress to be rather slow from here on out. i’ve had to divert my attention towards other things and haven’t been able to spend a lot of time working on my projects.
maybe i will work on a settings panel. depends on how much work it requires. it’s a maybe. i may just ship it as it stands right now.
expired items are now automatically deleted on program startup.
an entry is considered expired when the current time is more than its expires_at value.
when pinned, the expires_at attribute is nulled, meaning this entry will never expire.
the “Clear all” shortcut Ctrl+Shift+Del now respects pinned entries. it clears everything but leaves pinned entries untouched.
the ephemeral db shenanigans.
also, i have decided that Squirrel needs a settings panel in the frontend for easier config modification. that may or may not happen but it is tempting to do it.
(i genuinely have no idea what to show in the devlog attachment, nothing’s changed visually. so have this stupid ass screenshot.)
now that i’ve given myself the liberty to rethink and redesign Squirrel’s data models and storage in a breaking fashion for v1, we have managed to make a good amount of improvements across the board. database schema has been modified to better suit current needs and make it possible to implement the features I desire for v1. it has been a very satisfying refactor.
timestamp column for events since the id is also the timestamp.BLOB column for image entries to store raw image bytes instead of b64 encoded strings. this makes images weigh about ~33% lighter. decent perf boost.expires_at column to store when an entry expires. pinned entries have an expiry of NULL. provides the base to actually implement expiring entries.ClipboardEventNotice since we no longer do the notify frontend -> write to db -> send data to frontend dance. it is now simply send whole event to frontend -> write to db. we enjoy simplifications.you can specify programs in which Squirrel should not listen to clipboard events.
this is useful when you’re working in a program wherein you need to use copy and paste a bunch. ignoring that program would keep your Squirrel history clean.
also useful to ignore a program that you regularly copy secrets from.
example of notepad being ignored:
devlog attachment obligation: here is me pasting some files i copied a couple minutes ago after i copied stuff on top of that.
that out of the way, devlog.
Squirrel now has a configuration file. squirrel.toml is created in the config directory of your OS (i.e. %appdata%/Squirrel on windows and /home/username/.config/Squirrel on linux), finally allowing some amount of customization support.
right now, only the types and the max_image_size config options work. types allows you to choose which kind of clipboard items are captured/ignored. max_image_size is self explanatory.
attached is the full config file. the remaining options require a bit of work to implement.
Turns out, copy and paste support for files was a one line diff. also, Squirrel is now v0.4.0, yippee.
anyways, moving swiftly on.
Squirrel is now in a state where we have most of the major features i wanted it to have: support for essential clipboard data types, pinning and search. however, it is not quite in a v1.0 state.
there are a bunch of things i want to add to polish up the program and make it feel sort of “complete”, which is mainly focusing on some basic configuration ability.
since sensible defaults are hard to figure out, i’d rather let the user break things instead of being stuck with my arbitrary decisions.
thus, i present the current planned feature list for v1:
this list ofcourse, might change. implementing these features would make Squirrel much more flexible, and make it v1 worthy.
we now have the most basic kind of file support there could be. which is just storing the path to the file. we then provide a link to the file in the frontend, clicking on which reveals the file in your explorer.
we also now have tiny little icons on the entries which indicate the entry type. all icons thanks to https://lucide.dev/
files ofcourse, need a bit more work. right now, you cant really do much except revealing in explorer. i will work on adding copy and paste support for files next, as well as maybe improve the overall performance a bit.
a shipwright recommended i change my banner to include a screenshot of the program. so we now have a shiny new banner that should look good everywhere on the site. this required me to figure out what dimensions the banner is shown at across the site.
i’ve attached a rough template for banners. fitting everything inside the marked areas should make sure your banner isn’t cut off anywhere that matters.
one reviewer rightfully couldn’t figure out how to quick paste items. this is a miss on my part because i didn’t really have a list of shortcuts anywhere and kind of just mentioned them in passing in the README. that has been rectified by adding a Shortcuts section to the readme.
we now cache the last 32 images, fetching from the backend when required and updating the cache. made the image re-rendering issue instantly better.
attached is the demo video i forgot to upload in the second to last devlog showing images in action.
images are a difficult thing to handle, especially when dealing with the system clipboard. i’ve made Squirrel as performant as i could to the best of my abilities, which is to say, it’s not the best. it isn’t as rich as i would like it to be, so i might return to this feature to improve it in the future.
one restriction i’ve put on images to control some of the chaos is limiting the size to 5 megabytes, meaning any image above 5 megs isn’t registered. i could push that to 10, which is still practically instant. but Squirrel is intended to be a quick clipboard, and not dropbox. so this is my cheaty little escape. maybe i’ll relax the limit in the future if 5mb is really restrictive.
i’ll probably bump the minor version and ship (i wouldn’t dare a v1.0 currently). i’d say pinning and image support is enough to warrant a second ship.
beyond that though, stands file(s) support, so a lot of decision making on how i want it to work to have a good balance of performance and usefulness.
a bit of a lengthy devlog this one, and i appreciate if you read all that. but i wanted to clear up some things for myself and just have a frame of reference where Squirrel stands right now after returning from a development break.
yay, yippee even.
i need to implement a frontend cache to store the last X entries’ contents, particularly for images. the way it works right now, every time the images are re-rendered (due to being filtered by search, for example), content is fetched from the backend. this ofcourse, is less than ideal. but shouldnt be a lot of trouble to fix.
some performance enhancements with images. made the clipboard image data fetching happen in Tauri’s dedicated thread pool, effectively parallelizing the operation. this made image copying a lot faster. image support should be merged into master soon enough.
we now have lazy loading for images. image data isn’t loaded until it is scrolled into view. makes startup quick.
enabled Dependabot updates and optimized the lint workflows for PRs. previously, all of the project was lint+checked on PR when changing anything. now it only checks the part that’s changed (i.e. frontend or backend)
we finally have some form of working image support in Squirrel. This required even more sweeping refactoring changes to the codebase, which was a bit painful and im sure the new code isn’t the best quality either and will bite me later, but we’ll deal with it when we deal with it.
getting images is a bit slow however, as right now we’re storing the image as base64 encoded PNGs.
i plan to use the SQLite blob type to just store the raw bytes and pass that back and forth to improve the performance a bit (maybe some sort of caching as well?). there are also other areas where that are to be improved but i wanted to get a somewhat working prototype as fast as i can.
i’ve been distracted by some life stuff, making me neglect my projects a bit. i also got distracted by the ESP32, fun little device. that is where the 9 days went. but, expect me to work semi-regularly again. thanks for reading.
(apologies for the uneventful devlog attachment, i have nothing interesting to show except just code)
to make it a bit more manageable when adding image support, a bunch of refactoring and reorganizing has been done in the backend.
like i’ve previously mentioned, the codebase leaned too hard into only supporting text events. this fixes that.
today’s changes also make the internal communication a bit more efficient. there are a couple more places where performance can be improved. and we will need every bit of performance we can get when dealing with image data.
(shoutout @Hridya for stardance utils, just discovered this)
currently writing the Release workflow for Squirrel. i have to figure out how to upload the artifacts to a github release with proper versioning and all that. the strategy is to run the workflow whenever something is pushed to the release branch.
that is all for today.
bumped the minor version. Squirrel is officially v0.2.0, yippi.
plus, updated the README, adding more explanation about the Wayland issue. also showcased the pin feature. i’ll try to whip up a release workflow to add to my CI tomorrow.
I’m debating whether i should ship v0.2.0. the only major change from 0.1.0 is the addition of pinning. i might wait until i have image support and ship later, or i might change my mind, im unsure.
moved the global launch hotkey logic from the frontend to the backend. it didn’t behave well in certain situations, failing to activate and bringing up the Squirrel window.
we’re experimenting with images. the current functionality is very much caveman and needs a lot of attention to make it actually usable. i’ve decided to stick with clipboard_rs for now, we’ll see how that pans out.