DEPRECATED
December 31, 2024 ยท View on GitHub
You can use now improved version with same functionality: https://github.com/SL-RU/mmtui?tab=readme-ov-file#ranger-file-manager
Ranger udisk menu
This script draws menu to mount and unmount partitions using udisksctl and ncurses

Requirements
- python3.8 or newer
- udisks2 (for udisksctl)
- lsblk 2.3 or newer
How to install
Firstly you need to clone this repo to the plugins directory of ranger
cd ~/.config/ranger/plugins
git clone https://github.com/SL-RU/ranger_udisk_menu
Then you need to add to ~/.config/ranger/commands.py line:
from plugins.ranger_udisk_menu.mounter import mount
Thats all
How to use
Enter in ranger :mount, than will be shown menu. In this menu you can press:
jorarrow downorCtrl+nto move selection downkorarrow uporCtrl+pto move selection upCtrl+gorEscorqto quitgorrto refresh all partitions and drivesmto mount selected partitionuto unmount selected partitioneto unmount all partitions of selected partition's drivepto power off selected the selected partition's drive (also called safely remove). It can be done only when all partitions of the drive are unmountedENTERto open selected mountpoint in current tab of the ranger
Troubles
If there is trouble with permissions, then you need to create group storage and add your user to it. Then you need to update your Polkit or PolicyKit permissions like it shown here: https://github.com/coldfix/udiskie/wiki/Permissions