Alacritty new terminal emu, ranger devicons, background rotator, 1440p preparedNeed solution for multiple screen resolutions, install.sh selection?

This commit is contained in:
Tristaan
2017-12-22 21:08:09 +01:00
parent 6d903b4eb1
commit 6e9f4a0534
19 changed files with 643 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
':/home/tristan
':/home/tristan/build/angular
v:/home/tristan/build/rineja/app/views
a:/home/tristan/build/rineja/app/assets
c:/home/tristan/build/rineja/app/controllers

194
.config/ranger/devicons.py Executable file
View File

@@ -0,0 +1,194 @@
#!/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 = {
'styl' : '',
'scss' : '',
'htm' : '',
'html' : '',
'slim' : '',
'ejs' : '',
'css' : '',
'less' : '',
'md' : '',
'markdown' : '',
'json' : '',
'js' : '',
'jsx' : '',
'rb' : '',
'php' : '',
'py' : '',
'pyc' : '',
'pyo' : '',
'pyd' : '',
'coffee' : '',
'mustache' : '',
'hbs' : '',
'conf' : '',
'ini' : '',
'yml' : '',
'bat' : '',
'jpg' : '',
'jpeg' : '',
'bmp' : '',
'png' : '',
'gif' : '',
'ico' : '',
'twig' : '',
'cpp' : '',
'c++' : '',
'cxx' : '',
'cc' : '',
'cp' : '',
'c' : '',
'hs' : '',
'lhs' : '',
'lua' : '',
'java' : '',
'sh' : '',
'fish' : '',
'ml' : 'λ',
'mli' : 'λ',
'diff' : '',
'db' : '',
'sql' : '',
'dump' : '',
'clj' : '',
'cljc' : '',
'cljs' : '',
'edn' : '',
'scala' : '',
'go' : '',
'dart' : '',
'xul' : '',
'sln' : '',
'suo' : '',
'pl' : '',
'pm' : '',
't' : '',
'rss' : '',
'f#' : '',
'fsscript' : '',
'fsx' : '',
'fs' : '',
'fsi' : '',
'rs' : '',
'rlib' : '',
'd' : '',
'erl' : '',
'hrl' : '',
'vim' : '',
'vimrc' : '',
'ai' : '',
'psd' : '',
'psb' : '',
'ts' : '',
'jl' : '',
'rc' : '',
'xml' : '',
'log' : '',
'avi' : '',
'mpeg' : '',
'mpg' : '',
'mkv' : '',
'flv' : '',
'mp4' : '',
'mp3' : '',
'flac' : '',
'wav' : '',
'ogg' : '',
'epub' : '',
'pdf' : '',
'7z' : '',
'apk' : '',
'bz2' : '',
'cab' : '',
'cpio' : '',
'deb' : '',
'gem' : '',
'gz' : '',
'gzip' : '',
'lha' : '',
'lzh' : '',
'lzma' : '',
'rar' : '',
'rpm' : '',
'tar' : '',
'tgz' : '',
'xz' : '',
'zip' : ''
}
dir_node_exact_matches = {
# English
'.git' : '',
'Desktop' : '',
'Documents' : '',
'Downloads' : '',
'Dropbox' : '',
'Music' : '',
'Pictures' : '',
'Public' : '',
'Templates' : '',
'Videos' : '',
# French
'Bureau' : '',
'Documents' : '',
'Téléchargements' : '',
'Musique' : '',
'Images' : '',
'Publique' : '',
'Vidéos' : '',
}
file_node_exact_matches = {
'exact-match-case-sensitive-1.txt' : 'X1',
'exact-match-case-sensitive-2' : 'X2',
'gruntfile.coffee' : '',
'gruntfile.js' : '',
'gruntfile.ls' : '',
'gulpfile.coffee' : '',
'gulpfile.js' : '',
'gulpfile.ls' : '',
'dropbox' : '',
'.ds_store' : '',
'.gitconfig' : '',
'.gitignore' : '',
'.bashrc' : '',
'.bashprofile' : '',
'favicon.ico' : '',
'license' : '',
'node_modules' : '',
'react.jsx' : '',
'procfile' : '',
'.Xdefaults' : '',
'.Xresources' : '',
'.dmrc' : '',
'.fasd' : '',
'.gitconfig' : '',
'.jack-settings' : '',
'.mime.types' : '',
'.nvidia-settings-rc' : '',
'.pam_environment' : '',
'.profile' : '',
'.recently-used' : '',
'.selected_editor' : '',
'.vimrc' : '',
'.xinputrc' : '',
'mimeapps.list' : '',
'user-dirs.dirs' : '',
'ini' : '',
'config' : ''
}
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, ''))

View File

View File

@@ -0,0 +1,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

View File

@@ -1 +0,0 @@
/home/tristan/build/dotfiles/.config/ranger

View File

@@ -218,7 +218,9 @@ set line_numbers false
# You can set local options that only affect a single directory.
# Examples:
# setlocal path=~/downloads sort mtime
setlocal path=/media preview_files=False
setlocal path=/media preview_directories=False
# ===================================================================
# == Command Aliases in the Console
@@ -614,3 +616,4 @@ copytmap <ESC> q Q w <C-c>
map pe extracthere
map gM cd /run/media/tristan
map e nvir
default_linemode devicons

View File

@@ -67,9 +67,9 @@ case "$extension" in
# Archive extensions:
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
try als "$path" && { dump | trim; exit 0; }
try acat "$path" && { dump | trim; exit 3; }
try bsdtar -lf "$path" && { dump | trim; exit 0; }
#try als "$path" && { dump | trim; exit 0; }
#try acat "$path" && { dump | trim; exit 3; }
#try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;;
rar)
# avoid password prompt by providing empty password

View File

@@ -11,3 +11,9 @@ r:/home/tristan/build/rineja
s:/home/tristan/build/shoppe
d:/home/tristan/build/dotfiles
b:/home/tristan/build
+:/run/media/tristan/SAMSUNG/Games/PC/linux/Feist-TiNYiSO
+:/run/media/tristan/SAMSUNG/Games/PC/linux/Infinifactory.Linux-ACTiVATED
+:/run/media/tristan/SAMSUNG/Games/PC/linux/RimWorld914Linux
+:/run/media/tristan/SAMSUNG/Games/PC/linux/Shadowrun Returns
+:/run/media/tristan/SAMSUNG/Games/PC/linux/Shovel Knight Linux
+:/run/media/tristan/SAMSUNG/Games/PC/linux/TIS-100 (GOG) (Linux)