all repos — dotfiles @ 1f2f3477499fff26fd7db4c0d0d91ac9d3c4b29a

linux dotfiles

config/ranger/plugins/devicons_linemode.py (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
import ranger.api
from ranger.core.linemode import LinemodeBase
from devicons import *

@ranger.api.register_linemode
class DevIconsLinemode(LinemodeBase):
  name = "devicons"

  uses_metadata = False

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

@ranger.api.register_linemode
class DevIconsLinemodeFile(LinemodeBase):
  name = "filename"

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