mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
removes ranger plugins v3
This commit is contained in:
parent
697e8d04b9
commit
d6c898431e
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,232 +0,0 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# coding=UTF-8
|
|
||||||
# These glyphs, and the mapping of file extensions to glyphs
|
|
||||||
# has been copied from the vimscript code that is present in
|
|
||||||
# https://github.com/ryanoasis/vim-devicons
|
|
||||||
import re;
|
|
||||||
import os;
|
|
||||||
|
|
||||||
# all those glyphs will show as weird squares if you don't have the correct patched font
|
|
||||||
# My advice is to use NerdFonts which can be found here:
|
|
||||||
# https://github.com/ryanoasis/nerd-fonts
|
|
||||||
file_node_extensions = {
|
|
||||||
'7z' : '',
|
|
||||||
'ai' : '',
|
|
||||||
'apk' : '',
|
|
||||||
'avi' : '',
|
|
||||||
'bat' : '',
|
|
||||||
'bmp' : '',
|
|
||||||
'bz2' : '',
|
|
||||||
'c' : '',
|
|
||||||
'c++' : '',
|
|
||||||
'cab' : '',
|
|
||||||
'cbr' : '',
|
|
||||||
'cbz' : '',
|
|
||||||
'cc' : '',
|
|
||||||
'clj' : '',
|
|
||||||
'cljc' : '',
|
|
||||||
'cljs' : '',
|
|
||||||
'coffee' : '',
|
|
||||||
'conf' : '',
|
|
||||||
'cp' : '',
|
|
||||||
'cpio' : '',
|
|
||||||
'cpp' : '',
|
|
||||||
'css' : '',
|
|
||||||
'cxx' : '',
|
|
||||||
'd' : '',
|
|
||||||
'dart' : '',
|
|
||||||
'db' : '',
|
|
||||||
'deb' : '',
|
|
||||||
'diff' : '',
|
|
||||||
'dump' : '',
|
|
||||||
'edn' : '',
|
|
||||||
'ejs' : '',
|
|
||||||
'epub' : '',
|
|
||||||
'erl' : '',
|
|
||||||
'exe' : '',
|
|
||||||
'f#' : '',
|
|
||||||
'fish' : '',
|
|
||||||
'flac' : '',
|
|
||||||
'flv' : '',
|
|
||||||
'fs' : '',
|
|
||||||
'fsi' : '',
|
|
||||||
'fsscript' : '',
|
|
||||||
'fsx' : '',
|
|
||||||
'gem' : '',
|
|
||||||
'gif' : '',
|
|
||||||
'go' : '',
|
|
||||||
'gz' : '',
|
|
||||||
'gzip' : '',
|
|
||||||
'hbs' : '',
|
|
||||||
'hrl' : '',
|
|
||||||
'hs' : '',
|
|
||||||
'htm' : '',
|
|
||||||
'html' : '',
|
|
||||||
'ico' : '',
|
|
||||||
'ini' : '',
|
|
||||||
'java' : '',
|
|
||||||
'jl' : '',
|
|
||||||
'jpeg' : '',
|
|
||||||
'jpg' : '',
|
|
||||||
'js' : '',
|
|
||||||
'json' : '',
|
|
||||||
'jsx' : '',
|
|
||||||
'less' : '',
|
|
||||||
'lha' : '',
|
|
||||||
'lhs' : '',
|
|
||||||
'log' : '',
|
|
||||||
'lua' : '',
|
|
||||||
'lzh' : '',
|
|
||||||
'lzma' : '',
|
|
||||||
'markdown' : '',
|
|
||||||
'md' : '',
|
|
||||||
'mkv' : '',
|
|
||||||
'ml' : 'λ',
|
|
||||||
'mli' : 'λ',
|
|
||||||
'mov' : '',
|
|
||||||
'mp3' : '',
|
|
||||||
'mp4' : '',
|
|
||||||
'mpeg' : '',
|
|
||||||
'mpg' : '',
|
|
||||||
'mustache' : '',
|
|
||||||
'ogg' : '',
|
|
||||||
'pdf' : '',
|
|
||||||
'php' : '',
|
|
||||||
'pl' : '',
|
|
||||||
'pm' : '',
|
|
||||||
'png' : '',
|
|
||||||
'psb' : '',
|
|
||||||
'psd' : '',
|
|
||||||
'py' : '',
|
|
||||||
'pyc' : '',
|
|
||||||
'pyd' : '',
|
|
||||||
'pyo' : '',
|
|
||||||
'rar' : '',
|
|
||||||
'rb' : '',
|
|
||||||
'rc' : '',
|
|
||||||
'rlib' : '',
|
|
||||||
'rpm' : '',
|
|
||||||
'rs' : '',
|
|
||||||
'rss' : '',
|
|
||||||
'scala' : '',
|
|
||||||
'scss' : '',
|
|
||||||
'sh' : '',
|
|
||||||
'slim' : '',
|
|
||||||
'sln' : '',
|
|
||||||
'sql' : '',
|
|
||||||
'styl' : '',
|
|
||||||
'suo' : '',
|
|
||||||
't' : '',
|
|
||||||
'tar' : '',
|
|
||||||
'tgz' : '',
|
|
||||||
'ts' : '',
|
|
||||||
'twig' : '',
|
|
||||||
'vim' : '',
|
|
||||||
'vimrc' : '',
|
|
||||||
'wav' : '',
|
|
||||||
'webm' : '',
|
|
||||||
'xml' : '',
|
|
||||||
'xul' : '',
|
|
||||||
'xz' : '',
|
|
||||||
'yml' : '',
|
|
||||||
'zip' : '',
|
|
||||||
}
|
|
||||||
|
|
||||||
dir_node_exact_matches = {
|
|
||||||
# English
|
|
||||||
'.git' : '',
|
|
||||||
'Desktop' : '',
|
|
||||||
'Documents' : '',
|
|
||||||
'Downloads' : '',
|
|
||||||
'Dropbox' : '',
|
|
||||||
'Music' : '',
|
|
||||||
'Pictures' : '',
|
|
||||||
'Public' : '',
|
|
||||||
'Templates' : '',
|
|
||||||
'Videos' : '',
|
|
||||||
# Spanish
|
|
||||||
'Escritorio' : '',
|
|
||||||
'Documentos' : '',
|
|
||||||
'Descargas' : '',
|
|
||||||
'Música' : '',
|
|
||||||
'Imágenes' : '',
|
|
||||||
'Público' : '',
|
|
||||||
'Plantillas' : '',
|
|
||||||
'Vídeos' : '',
|
|
||||||
# French
|
|
||||||
'Bureau' : '',
|
|
||||||
'Documents' : '',
|
|
||||||
'Images' : '',
|
|
||||||
'Musique' : '',
|
|
||||||
'Publique' : '',
|
|
||||||
'Téléchargements' : '',
|
|
||||||
'Vidéos' : '',
|
|
||||||
# Portuguese
|
|
||||||
'Documentos' : '',
|
|
||||||
'Imagens' : '',
|
|
||||||
'Modelos' : '',
|
|
||||||
'Música' : '',
|
|
||||||
'Público' : '',
|
|
||||||
'Vídeos' : '',
|
|
||||||
'Área de trabalho' : '',
|
|
||||||
# Italian
|
|
||||||
'Documenti' : '',
|
|
||||||
'Immagini' : '',
|
|
||||||
'Modelli' : '',
|
|
||||||
'Musica' : '',
|
|
||||||
'Pubblici' : '',
|
|
||||||
'Scaricati' : '',
|
|
||||||
'Scrivania' : '',
|
|
||||||
'Video' : '',
|
|
||||||
# German
|
|
||||||
'Bilder' : '',
|
|
||||||
'Dokumente' : '',
|
|
||||||
'Musik' : '',
|
|
||||||
'Schreibtisch' : '',
|
|
||||||
'Vorlagen' : '',
|
|
||||||
'Öffentlich' : '',
|
|
||||||
}
|
|
||||||
|
|
||||||
file_node_exact_matches = {
|
|
||||||
'.Xdefaults' : '',
|
|
||||||
'.Xresources' : '',
|
|
||||||
'.bashprofile' : '',
|
|
||||||
'.bashrc' : '',
|
|
||||||
'.dmrc' : '',
|
|
||||||
'.ds_store' : '',
|
|
||||||
'.fasd' : '',
|
|
||||||
'.gitconfig' : '',
|
|
||||||
'.gitignore' : '',
|
|
||||||
'.jack-settings' : '',
|
|
||||||
'.mime.types' : '',
|
|
||||||
'.nvidia-settings-rc' : '',
|
|
||||||
'.pam_environment' : '',
|
|
||||||
'.profile' : '',
|
|
||||||
'.recently-used' : '',
|
|
||||||
'.selected_editor' : '',
|
|
||||||
'.vimrc' : '',
|
|
||||||
'.xinputrc' : '',
|
|
||||||
'config' : '',
|
|
||||||
'dropbox' : '',
|
|
||||||
'exact-match-case-sensitive-1.txt' : 'X1',
|
|
||||||
'exact-match-case-sensitive-2' : 'X2',
|
|
||||||
'favicon.ico' : '',
|
|
||||||
'gruntfile.coffee' : '',
|
|
||||||
'gruntfile.js' : '',
|
|
||||||
'gruntfile.ls' : '',
|
|
||||||
'gulpfile.coffee' : '',
|
|
||||||
'gulpfile.js' : '',
|
|
||||||
'gulpfile.ls' : '',
|
|
||||||
'ini' : '',
|
|
||||||
'ledger' : '',
|
|
||||||
'license' : '',
|
|
||||||
'mimeapps.list' : '',
|
|
||||||
'node_modules' : '',
|
|
||||||
'procfile' : '',
|
|
||||||
'react.jsx' : '',
|
|
||||||
'user-dirs.dirs' : '',
|
|
||||||
}
|
|
||||||
|
|
||||||
def devicon(file):
|
|
||||||
if file.is_directory: return dir_node_exact_matches.get(file.relative_path, '')
|
|
||||||
return file_node_exact_matches.get(file.relative_path, file_node_extensions.get(file.extension, ''))
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
import ranger.api
|
|
||||||
from ranger.core.linemode import LinemodeBase
|
|
||||||
from plugins.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
|
|
||||||
Loading…
x
Reference in New Issue
Block a user