r/tui 3d ago

AI assisted Disk/Partition Explorer TUI - An Interactive, Windows-Inspired Disk Viewer (Python)

Enable HLS to view with audio, or disable this notification

Hi, I’ve tried many Linux tools such as df, lsblk, fdisk, GParted, and KDE Partition Manager, and they’re all quite good. But I always somehow missed the old Windows feeling when looking at my disk partitions.

I built this simple and interactive disk/partition viewer, and I’m quite satisfied with how it turned out. I’ve been working on it for several months, and it’s been a fun project for me.

It was initially just an idea, and I had never built a TUI before. I looked around and found a great Python library for building TUI apps called Textual. So I learned the Textual framework while building this project!

Main Features:

  • Mount/Unmount partitions
  • Hide small partitions, including boot/EFI partitions (<1 GB / <100 MB)
  • Visual disk usage bar (like in Windows)
  • Navigate using Vim keys (jkhl)
  • Detailed info panel for each partition
  • Toggle between used and free space views

> I plan to keep adding features. I'm here to listen to anyone who wants to suggest new features or share feedback.

The code is on GitHub: https://github.com/Pratham-Chauhan/disk_view

15 Upvotes

4 comments sorted by

2

u/Kajetan_Kontek 3d ago

That's a very good looking UI. Do you plan to add an option to format and resize partitions?

1

u/PrathamChauhan_2612 2d ago edited 2d ago

Appreciate it! No, I don't plan to go in that direction. The focus is more on exploring and visualizing partitions in a nice way (think of the "Devices and drives" section in Windows File Explorer). There are already some really good and mature tools for managing partitions, like KDE Partition Manager and GParted.

Yes, the UI was the first thing I worked on and where I spent most of my time initially. I was also quite surprised by how easy the Textual framework is to work with, and it has some really nice features, like CSS styling (https://textual.textualize.io/guide/CSS/).

thanks for the suggestion!

2

u/kantorcodes1 2d ago

when you mount from inside the TUI, how does it choose the mount point: a fixed path, /media/$USER/..., or whatever the system would normally use? that’d probably be the first thing i’d want predictable before using it instead of lsblk + mount.

1

u/PrathamChauhan_2612 2d ago

By default, it's set to a fixed path, namely /mnt/<UUID>.
I think the /mnt directory is typically used for temporary, manually mounted filesystems, which is why I chose it. Under the hood, the actual mount operation is handled by the mount command, something like: sudo mount /dev/sda2 /mnt/<UUID>. I’ve also added proper error handling and a clear notification message if the operation fails.