1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
575 B

2 years ago
import os
terminal=terminal=os.getenv('TERM')
if terminal != 'linux':
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