Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install devicons.py to plugin directory #35

Merged
merged 1 commit into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ RC_FILE=$(RANGER_DIR)/rc.conf

install:
install -d $(PLUGIN_DIR)
install -b devicons.py $(RANGER_DIR)/devicons.py
install -b devicons.py $(PLUGIN_DIR)/devicons.py
install -b devicons_linemode.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)

uninstall:
$(RM) $(RANGER_DIR)/devicons.py
$(RM) $(PLUGIN_DIR)/devicons.py
$(RM) $(PLUGIN_DIR)/devicons_linemode.py
4 changes: 2 additions & 2 deletions devicons_linemode.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ranger.api
from ranger.core.linemode import LinemodeBase
from devicons import *
from plugins.devicons import *

@ranger.api.register_linemode
class DevIconsLinemode(LinemodeBase):
Expand All @@ -16,4 +16,4 @@ class DevIconsLinemodeFile(LinemodeBase):
name = "filename"

def filetitle(self, file, metadata):
return devicon(file) + ' ' + file.relative_path
return devicon(file) + ' ' + file.relative_path