Disk View – a very small GTK4 desktop app and project blueprint

Hey everyone,

I’d like to share a little side project I’ve been working on: Disk View.

It’s a pretty simple Linux desktop app that shows all your drives, partitions, and their disk usage in one compact overview.

I wasn’t really happy with GNOME’s default Disks app when all I wanted was a quick overview of how much space was used across my drives. So I ended up building my own little tool. Nothing particularly fancy, but it does exactly what I was looking for.

The app is written in Crystal using GTK4 and libadwaita.

What might actually be more interesting to the Crystal community than the app itself is the project setup. It could serve as a starting point or reference for anyone interested in building native GTK4 desktop applications with Crystal. Especially the GitHub workflow and setup for AppImage and Flatpak.

It includes:

  • GTK4/libadwaita integration using Crystal bindings

  • A fairly typical GNOME desktop app structure

  • Translations for multiple languages

  • A GitHub Actions workflow that automatically builds AppImage and Flatpak packages and attaches them to GitHub releases

The project was AI-agent-engineered and took only a few days, as i already had ported another experimental project, that i originally wrote with Ruby and GTK4. But after it was running well, it did not do well on other systems … this was one of my main reasons to finally spend more time and interest on Crystal. But the original problem that brought me to Crystal was another NodeJS (CLI) project, that i will port soon to crystal, after i have released a stable release of my Crystal Language Plugin for Jetbrains IDEs.

A big thanks to Hugo Parente Lima (@hugopl) for his work on the GTK4 bindings and GI-Crystal. Without projects like these, building native GTK applications in Crystal would be a lot harder. Really appreciate the effort!

Anyway, I thought I’d share it here in case someone finds either the app or parts of its implementation useful.

GitHub: GitHub - magynhard/disk-view.cr: Simple disk overview with usage for Linux (Gnome/GTK) · GitHub

Feedback is always welcome!

Really nice to see native desktop apps like this one.

Considering the bugs from the current Disks app from Gnome, by adding the option to format drives could basically replace it for the most cases.

Congratulations! Starred

Thank you for your feedback.

I think the official disc/drive app from GNOME is to complex to show drives with simple information on the one hand, but to incomplete for formatting on the other hand.

Which kind of formatting were you thinking of? I think, when it starts with partitions, etc… it will get very complex soon. For more complex formatting jobs I prefer GParted anyway. Maybe a simple use case, like formatting only an USB stick, was in your mind?

I tried this, very slick. I’ll definitely use it as a base for projects

I was inspired by the cases I often face problems with Gnome Disks: formatting a hard-drive or a pendrive, and it need multiple attempts in order to succeed.

But you are right that, by opening the “format” feature, a whole world of requisites and scenarios open with it (like formatting and/or resizing partitions), so I agree with you that it becomes complex pretty soon.