add ranger instructions

This commit is contained in:
Lutsai Aleksandr 2025-01-01 02:16:38 +03:00
parent 535b120f7d
commit 7746a764f7
2 changed files with 42 additions and 3 deletions

View file

@ -2,13 +2,15 @@
TUI disk mount manager for TUI file managers for Linux
![](screencast.gif)
# Dependencies
- udisks2
# mount.yazi
# Binaries
Plugin for yazi file manager: https://github.com/SL-RU/mount.yazi
Latest prebuilt static binary you can find here: https://github.com/SL-RU/mmtui/releases
# Build
@ -20,4 +22,41 @@ Binary will be in `target/release/mmtui`
## AUR
On Archlinux you can install from AUR, package is named `mmtui-bin`: https://aur.archlinux.org/packages/mmtui-bin
On Archlinux you can install from AUR, package is named `mmtui-bin`: https://aur.archlinux.org/packages/mmtui-bin
# Integrations
## Yazi - mount.yazi
Plugin for yazi file manager: https://github.com/SL-RU/mount.yazi
## Ranger file manager
https://github.com/SL-RU/ranger_udisk_menu is deprecated, now you can use this application instead. Download or build `mmtui` and add it location to $PATH environment variable or substitute location in the variable MMTUI_PATH in the script below.
Add this to `ranger config/commands.py`:
```Python
class mount(Command):
""":mount.
Show menu to mount and unmount.
"""
MMTUI_PATH = "mmtui"
def execute(self):
"""Show menu to mount and unmount."""
import os
import tempfile
(f, p) = tempfile.mkstemp()
os.close(f)
self.fm.execute_console(
f'shell bash -c "{self.MMTUI_PATH} 1> {p}"'
)
with open(p, 'r') as f:
d = f.readline().strip()
if os.path.exists(d):
self.fm.cd(d)
os.remove(p)
```

BIN
screencast.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 MiB