mirror of
https://github.com/SL-RU/ranger_udisk_menu.git
synced 2025-02-06 18:25:03 +01:00
Merge pull request #8 from aik2mlj/master
use relative path for calling menu.py & clone to ~/.config/ranger/plugins instead
This commit is contained in:
commit
d7f107c352
2 changed files with 4 additions and 5 deletions
|
@ -9,17 +9,17 @@ This script draws menu to mount and unmount partitions using udisksctl and ncurs
|
||||||
- lsblk 2.3 or newer
|
- lsblk 2.3 or newer
|
||||||
|
|
||||||
# How to install
|
# How to install
|
||||||
Firstly you need to clone this repo to ranger config directory
|
Firstly you need to clone this repo to the plugins directory of ranger
|
||||||
|
|
||||||
```Bash
|
```Bash
|
||||||
cd ~/.config/ranger
|
cd ~/.config/ranger/plugins
|
||||||
git clone https://github.com/SL-RU/ranger_udisk_menu
|
git clone https://github.com/SL-RU/ranger_udisk_menu
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you need to add to `~/.config/ranger/commands.py` line:
|
Then you need to add to `~/.config/ranger/commands.py` line:
|
||||||
|
|
||||||
```Python3
|
```Python3
|
||||||
from ranger_udisk_menu.mounter import mount
|
from plugins.ranger_udisk_menu.mounter import mount
|
||||||
```
|
```
|
||||||
|
|
||||||
Thats all
|
Thats all
|
||||||
|
|
|
@ -20,8 +20,7 @@ class mount(Command):
|
||||||
""" Show menu to mount and unmount """
|
""" Show menu to mount and unmount """
|
||||||
(f, p) = tempfile.mkstemp()
|
(f, p) = tempfile.mkstemp()
|
||||||
os.close(f)
|
os.close(f)
|
||||||
self.fm.execute_console(
|
self.fm.execute_console(f"shell python3 {os.getcwd()}/menu.py {p}")
|
||||||
f"shell python3 ~/.config/ranger/ranger_udisk_menu/menu.py {p}")
|
|
||||||
with open(p, 'r') as f:
|
with open(p, 'r') as f:
|
||||||
d = f.readline()
|
d = f.readline()
|
||||||
if os.path.exists(d):
|
if os.path.exists(d):
|
||||||
|
|
Loading…
Reference in a new issue