https://github.com/SL-RU/ranger_udisk_menu
This script draws menu to choose, mount and unmount drives using udisksctl and ncurses for ranger file manager
https://github.com/SL-RU/ranger_udisk_menu
ranger ranger-config ranger-fm ranger-plugin
Last synced: 11 months ago
JSON representation
This script draws menu to choose, mount and unmount drives using udisksctl and ncurses for ranger file manager
- Host: GitHub
- URL: https://github.com/SL-RU/ranger_udisk_menu
- Owner: SL-RU
- License: mit
- Created: 2021-04-25T16:27:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-06T21:20:16.000Z (almost 3 years ago)
- Last Synced: 2024-08-03T18:21:11.166Z (over 1 year ago)
- Topics: ranger, ranger-config, ranger-fm, ranger-plugin
- Language: Python
- Homepage:
- Size: 142 KB
- Stars: 52
- Watchers: 1
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- ranger-awesome - ranger_udisk_menu
README
# DEPRECATED
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
```Bash
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:
```Python3
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:
- `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
- `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
# 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)