Announcing om, a command line mounter for removable devices
I just published a new opensource project. It is a small program I wrote to solve an inconvenience I experienced with my computer use:
Mounting & unmounting removable devices from command line (on Linux).
Here’s an example of using om
to mount a recently attached device:
$ om
Activate device:
1) /dev/sda1 My USB (12.5G)
2) /dev/mmcblk0 My memory card (116.5G)
Device [1]: ⏎
/dev/sda1: mounted at `/run/media/user/My USB`.
Most of the time, in order to mount a device, one only needs to type the short command and hit Return. Unmounting is analogously simple.
See README for more examples, including encrypted devices and powering off.
Motivation
Whatever DE I use, I tend to work mostly with the keyboard. So I wanted a short command that would do this for me with as little typing and interaction as possible.
That includes mounting / unmounting at the right place, unlocking / locking encrypted volumes, as well as doing anything necessary to safely remove the device (powering off when supported, locking encrypted volumes after unmount, unmounting other partitions on the same device if present, etc).
It uses UDisks as its backend (but multiple backends can be implemented if desired).
Before I wrote this tool, I was using bashmount, which provided inspiration, but I wanted something a bit more ergonomic for my day to day use.
I decided to release it early, as soon as I started using it myself and felt it does the job. If circumstances permit, I’ll be able to add niceties and further smooth out the UX, maybe even add features (see the Roadmap for ideas I have at the moment), but I hope it won’t become “big and professional” 😉 Maybe I can port it to *BSD at some point🤔
Also, this is my first “real” program in Rust.
Enjoy!
(P.S. This program was written during and despite russian war.)