Devlog #1
Until now the project was simply a prototype to test the idea but I kind of lost track of the time and made way too much before first devlog.
So here it comes: RiverFlow, native file manager alternative for MacOS, part of The Shrimple Project.
Fast as river, no one can stop the flow. It uses all the best stuff Swift language has to make it more resource-efficient than Finder (at least that’s the target) and it’s currently my biggest project.
It is ultimately intended to be developer-friendly and will have a lot of built-in tweaks we as programmers needed a plugin for. I also wanted it to have some Linux-feel and make it customizable in every possible way: from colors and icon sizes to custom windows and built-in plugin maker.
How it actually works
(I had to cut this cause of 4000 chars limit, I will post full devlogs somewhere else)
How it ACTUALLY works
Alright, I’ve been talking about something entirely different. So here is the flow:
- You run the app. First you see all the windows attacking you, begging for permissions but it’s irrevelant. The run calls loadCurrentDirectory method from FolderViewModel class. It is the heart of the app, lCD method (as I call it) is being called every time something happens (well not really automatically but I’ll get to it later).
- lCD creates multiple FileItem class instances. That’s your folders and files as raw data! It also sorts them by your selected method (name / size / modification date) on place.
- In ContentView depending on which viewType has been selected (list or grid) list/gridView is being rendered. For each FileItem it creates FileList/GridItemView, that’s a view for a single file/folder.
And that’s it! If I would want to I can fit all of this in 50-100 lines of code. The real fun starts in coding user interactions with all those objects. I must admit it wasn’t the easiest challenge.
The difficulties
The list is long. I’ve encountered several walls on my way, some cleared up by different websites, for some I had to use AI tho.
The “minor difficulties”: I’ll spare you this rant
The “major difficulties”:
- caching thumbnails for images (and even just making them display and not eating 300 MB of RAM instantly when generating)
- making the full path in toolbar (the animations and proper detection)
- efficiently calculating folder size in Info window
- implementing shift and drag select (took me freaking two days to figure it out)
- making the SwiftUI cooperate with me and not destroy my entire GridView when adding print somewhere
Features list
- main window listing files and folders in two views: list and grid
- toolbar featuring full path copying, sorting, view and hidden files options
- sidebar featuring most used folders resembling the one from Finder (not customizable yet)
- files and directories operations:
- copying, cutting, pasting, deleting multiple files
- selecting items with shift (range), command (specific), drag (area)
- creating empty folder and file from context menu
- item info window showing full path, name, icon, size, modification date
There isn’t much features yet but taking into account that I am using Swift for real for the first time I am proud of myself.
I hope you all will like this project and find it useful in your every day productivity when it’ll be a finished product. Until next time! I will go make myself a real dinner for the first time since two weeks.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.