Skip to content

Commit

Permalink
Merge pull request #35 from cjbassi/master
Browse files Browse the repository at this point in the history
Install devicons.py to plugin directory
  • Loading branch information
alexanderjeurissen authored Dec 25, 2018
2 parents d77113c + 3031c55 commit e37c147
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit e37c147

Please sign in to comment.