Kevin Mok
6 years ago
20 changed files with 319 additions and 50 deletions
-
48aliases/key_aliases
-
22fish/.config/fish/completions/watson.fish
-
5fish/.config/fish/functions/cd.fish
-
4i3/.config/i3/config
-
2i3blocks/.config/i3blocks/i3blocks.conf
-
4i3blocks/.config/i3blocks/sam-i3blocks.conf
-
6i3blocks/.config/i3blocks/scripts/spotify
-
0ranger/.config/ranger/plugins/__init__.py
-
BINranger/.config/ranger/plugins/__pycache__/__init__.cpython-37.opt-1.pyc
-
BINranger/.config/ranger/plugins/__pycache__/devicons.cpython-37.opt-1.pyc
-
BINranger/.config/ranger/plugins/__pycache__/devicons_linemode.cpython-37.opt-1.pyc
-
232ranger/.config/ranger/plugins/devicons.py
-
19ranger/.config/ranger/plugins/devicons_linemode.py
-
3ranger/.config/ranger/rc.conf
-
3scripts/shuffler
-
2txt/ideas.md
-
2txt/ideas.txt
-
1txt/key_dirs.txt
-
6txt/key_files.txt
-
10vim/.vimrc
@ -1,4 +1,10 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
|
case "$BLOCK_BUTTON" in |
||||
|
1) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause ;; |
||||
|
2) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous ;; |
||||
|
3) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next ;; |
||||
|
esac |
||||
|
|
||||
. "/home/kevin/.cache/wal/colors.sh" |
. "/home/kevin/.cache/wal/colors.sh" |
||||
printf "$(spotify-now -i '%artist - %title' -p '' -e '')\n$(spotify-now -i '%title' -p '' -e '')\n%s\n" "$color7" |
printf "$(spotify-now -i '%artist - %title' -p '' -e '')\n$(spotify-now -i '%title' -p '' -e '')\n%s\n" "$color7" |
@ -0,0 +1,232 @@ |
|||||
|
#!/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, '')) |
@ -0,0 +1,19 @@ |
|||||
|
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 |
@ -0,0 +1,2 @@ |
|||||
|
- nnn |
||||
|
- spotify blocklet - escape chars. |
@ -1,2 +0,0 @@ |
|||||
- nnn |
|
||||
- set (control+)alt+w to choose brightness/editing |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue