diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..102ebc8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +.mypy_cache/ diff --git a/Makefile b/Makefile index 31cc25a..0e6180d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ RC_FILE=$(RANGER_DIR)/rc.conf install: install -d $(PLUGIN_DIR) install -b devicons.py $(PLUGIN_DIR)/devicons.py - install -b devicons_linemode.py $(PLUGIN_DIR)/devicons_linemode.py + install -b __init__.py $(PLUGIN_DIR)/devicons_linemode.py grep -q 'default_linemode devicons' $(RC_FILE) || echo '# a plugin that adds file glyphs / icon support to Ranger:' >> $(RC_FILE) grep -q 'default_linemode devicons' $(RC_FILE) || echo '# https://github.com/alexanderjeurissen/ranger_devicons' >> $(RC_FILE) grep -q 'default_linemode devicons' $(RC_FILE) || echo 'default_linemode devicons' >> $(RC_FILE) diff --git a/README.md b/README.md index 882d268..693caf8 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,14 @@ screenshot), this and other NERDfonts and the install instructions for these fon the following repository: https://github.com/ryanoasis/nerd-fonts ## Install instructions +### Stable method: A makefile is included to install and uninstall this plugin. to install simply run: `make install` and to uninstall the plugin run `make uninstall`. + +### Experimental method: +Ranger has added support for loading directories in the plugins folder to `master` which makes it easier to install and keep plugins updated. +To install, just clone the repo into the plugins folder: +```bash +git clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons +``` +Then add `default_linemode devicons` to your `rc.conf`. diff --git a/devicons_linemode.py b/__init__.py similarity index 93% rename from devicons_linemode.py rename to __init__.py index d826330..aeca62b 100755 --- a/devicons_linemode.py +++ b/__init__.py @@ -1,6 +1,6 @@ import ranger.api from ranger.core.linemode import LinemodeBase -from plugins.devicons import * +from .devicons import * @ranger.api.register_linemode class DevIconsLinemode(LinemodeBase):