2025-01-01 02:18:40 +03:00
# DEPRECATED
You can use now improved version with same functionality: https://github.com/SL-RU/mmtui?tab=readme-ov-file#ranger -file-manager
2021-04-25 21:11:15 +03:00
# Ranger udisk menu
This script draws menu to mount and unmount partitions using udisksctl and ncurses
2021-04-25 21:26:38 +03:00

2021-04-25 21:11:15 +03:00
# Requirements
2021-06-19 14:51:28 +03:00
- python3.8 or newer
2021-04-25 21:11:15 +03:00
- udisks2 (for udisksctl)
2021-06-19 14:51:28 +03:00
- lsblk 2.3 or newer
2021-04-25 21:11:15 +03:00
# How to install
2022-07-22 16:52:24 +04:00
Firstly you need to clone this repo to the plugins directory of ranger
2021-04-25 21:11:15 +03:00
```Bash
2022-07-22 16:52:24 +04:00
cd ~/.config/ranger/plugins
2021-04-25 21:11:15 +03:00
git clone https://github.com/SL-RU/ranger_udisk_menu
```
2021-04-25 21:13:13 +03:00
Then you need to add to `~/.config/ranger/commands.py` line:
2021-04-25 21:11:15 +03:00
```Python3
2022-07-22 16:52:24 +04:00
from plugins.ranger_udisk_menu.mounter import mount
2021-04-25 21:11:15 +03:00
```
Thats all
# How to use
Enter in ranger `:mount` , than will be shown menu. In this menu you can press:
- `j` or `arrow down` or `Ctrl+n` to move selection down
- `k` or `arrow up` or `Ctrl+p` to move selection up
- `Ctrl+g` or `Esc` or `q` to quit
- `g` or `r` to refresh all partitions and drives
- `m` to mount selected partition
- `u` to unmount selected partition
- `e` to unmount all partitions of selected partition's drive
2021-06-12 15:52:06 +03:00
- `p` to power off selected the selected partition's drive (also called safely remove). It can be done only when all partitions of the drive are unmounted
- `ENTER` to open selected mountpoint in current tab of the ranger
2021-06-19 14:51:28 +03:00
# 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 ](https://github.com/coldfix/udiskie/wiki/Permissions )