Remove unnecessary configs from base

This commit is contained in:
natemaia 2019-09-01 23:09:45 -07:00
parent b8af0f049a
commit 75a1854515
17 changed files with 0 additions and 2085 deletions

View File

View File

@ -1,149 +0,0 @@
"""
A ranger color scheme
Made to be eye catchy while maintaining visibility, and base 0-7 colours.
Inspired by themes like Tomorrow, Dracula, Atom, and Spacemacs, but with my own twists
"""
from ranger.gui.colorscheme import ColorScheme
from ranger.gui.color import *
class jinx(ColorScheme):
"""
Defines colours used when colourscheme is enabled
"""
progress_bar_color = 96
def use(self, context):
"""
Main colour block with individual definitions
"""
fg, bg, attr = default_colors
if context.reset:
return default_colors
elif context.in_browser:
if context.selected:
attr = reverse
else:
attr = normal
if context.empty or context.error:
fg = 131
if context.border:
fg = 247
if context.image:
fg = 179
if context.video:
fg = 96
if context.audio:
fg = 117
if context.document:
fg = 38
if context.container:
fg = 108
if context.directory:
fg = 103
elif context.executable and not \
any((context.media, context.fifo, context.container, context.socket)):
fg = 67
if context.socket:
fg = 179
attr |= bold
if context.fifo or context.device:
fg = 214
attr |= bold
if context.link:
fg = 38 if context.good else 131
if context.tag_marker and not context.selected:
fg = 96
attr |= bold
if not context.selected and (context.cut or context.copied):
fg = 247
attr |= underline
if context.main_column:
if context.marked:
attr |= underline
fg = 131
if context.selected:
attr |= normal
if context.badinfo:
if attr & reverse:
bg = 96
else:
fg = 203
elif context.in_titlebar:
attr |= bold
if context.hostname:
fg = 203 if context.bad else 67
elif context.directory:
fg = 96
elif context.tab:
if context.good:
bg = 96
elif context.link:
fg = 117
elif context.in_statusbar:
if context.permissions:
if context.good:
fg = 67
elif context.bad:
fg = 203
if context.marked:
attr |= bold | reverse
fg = 96
if context.message:
if context.bad:
attr |= bold
fg = 96
if context.loaded:
bg = self.progress_bar_color
if context.vcsinfo:
fg = 38
attr &= ~bold
if context.vcscommit:
fg = 108
attr &= ~bold
if context.text:
fg = 254
if context.highlight:
attr |= reverse
if context.in_taskview:
if context.title:
fg = 67
if context.selected:
attr |= reverse
if context.loaded:
if context.selected:
fg = self.progress_bar_color
else:
bg = self.progress_bar_color
if context.vcsfile and not context.selected:
attr &= ~bold
if context.vcsconflict:
fg = 203
elif context.vcschanged:
fg = 174
elif context.vcsunknown:
fg = 174
elif context.vcsstaged:
fg = 108
elif context.vcssync:
fg = 108
elif context.vcsignored:
fg = default
elif context.vcsremote and not context.selected:
attr &= ~bold
if context.vcssync:
fg = 108
elif context.vcsbehind:
fg = 174
elif context.vcsahead:
fg = 67
elif context.vcsdiverged:
fg = 203
elif context.vcsunknown:
fg = 174
return fg, bg, attr

View File

@ -1,465 +0,0 @@
# ===================================================================
# == Options
# ===================================================================
set viewmode miller
set column_ratios 1,2,4
set scroll_offset 8
set show_cursor false
set mouse_enabled true
set confirm_on_delete always
set colorscheme default
set shorten_title 4
set update_title true
# set update_tmux_title true
set tilde_in_titlebar true
set hostname_in_titlebar true
set max_history_size 20
set max_console_history_size 50
set save_console_history true
set open_all_images false
set preview_images false
set use_preview_script true
set preview_images_method w3m
set preview_script ~/.config/ranger/scope.sh
set automatically_count_files true
set preview_max_size 0
set preview_files true
set preview_directories true
set collapse_preview true
set unicode_ellipsis true
set padding_right false
set draw_borders true
set dirname_in_tabs true
set status_bar_on_top false
set draw_progress_bar_in_status_bar true
set display_size_in_main_column true
set display_size_in_status_bar false
set display_tags_in_all_columns true
set flushinput true
set autosave_bookmarks true
set autoupdate_cumulative_size false
# Enable this if key combinations with the Alt Key don't work for you. (Especially on xterm)
set xterm_alt_key false
set sort natural
set sort_reverse false
set sort_unicode false
set sort_case_insensitive true
set sort_directories_first true
set vcs_aware true
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set vcs_backend_svn disabled
set cd_bookmarks true
set cd_tab_case sensitive
set cd_tab_fuzzy true
set show_selection_in_titlebar true
set idle_delay 2000
set metadata_deep_search false
set clear_filters_on_dir_change true
set line_numbers false
set one_indexed false
set save_tabs_on_exit true
set wrap_scroll false
set global_inode_type_filter
set show_hidden true
set show_hidden_bookmarks true
set hidden_filter ^\.|\.(?:pyc|pyo|bak|old|swp)$|^lost\+found$|^__(py)?cache__$
# ===================================================================
# == Local Options
# ===================================================================
# You can set local options that only affect a single directory.
# Examples:
# setlocal path=~/downloads sort mtime
# ===================================================================
# == Command Aliases in the Console
# ===================================================================
# aliases
alias e edit
alias q quit
alias q! quit!
alias qa quitall
alias qa! quitall!
alias qall quitall
alias qall! quitall!
alias setl setlocal
alias filter scout -prt
alias find scout -aeit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefklst
# ===================================================================
# == Define keys for the browser
# ===================================================================
# Basic
map Q quitall
map q quit
copymap q ZZ ZQ
map R reload_cwd
map F set freeze_files!
map <C-r> reset
map <C-l> redraw_window
map <C-c> abort
map <Esc> change_mode normal
map ~ set viewmode!
map i display_file
map ? help
map W display_log
map w taskview_open
map S shell $SHELL
map : console
map ; console
map ! console shell%space
map @ console -p6 shell %%s
map # console shell -p%space
map s console shell%space
map f console find%space
map r chain draw_possible_programs; console open_with%%space
map cd console cd%space
# Tagging / Marking
map t tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map v toggle_visual_mode
map uv toggle_visual_mode reverse=True
map V mark_files all=True toggle=True
map uV mark_files all=True val=False
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F2> rename_append
map <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
map <DELETE> console delete
map <INSERT> console touch%space
# VIM like
copymap <Up> k
copymap <Down> j
copymap <Left> h
copymap <Right> l
copymap <Home> gg
copymap <End> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
# Jumping around
map L history_go 1
map H history_go -1
map ] move_parent 1
map [ move_parent -1
map } traverse
map ) jump_non
map E edit
# Better file renaming
map a rename_append
map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.execute_console("rename_append")
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
# Open file in a new tmux pane
map eh eval import shlex; fm.run("tmux splitw -h rifle " + shlex.quote(fm.thisfile.basename))
map ev eval import shlex; fm.run("tmux splitw -v rifle " + shlex.quote(fm.thisfile.basename))
map ew eval import shlex; fm.run("tmux new-window rifle " + shlex.quote(fm.thisfile.basename))
map pp paste
map phl paste_hardlink
map pP paste append=True
map pr shell sudo cp %c %d
map po paste overwrite=True
map pht paste_hardlinked_subtree
map pL paste_symlink relative=True
map pl paste_symlink relative=False
map pO paste overwrite=True append=True
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map dt cut mode=toggle
map dc get_cumulative_size
map dD console delete
map DD shell rm -rf %s
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map yp yank path
map yd yank dir
map yn yank name
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
map yt copy mode=toggle
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
# Searching
map n search_next
map / console search%space
map f console scout -ftsea%space
# Sorting
map or set sort_reverse!
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
# Settings
map zi set preview_images!
map zp set preview_files!
map zP set preview_directories!
map zv set use_preview_script!
map zd set sort_directories_first!
map zc set collapse_preview!
map zI set flushinput!
map zm set mouse_enabled!
map zh set show_hidden!
map zf console filter%space
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map \<any> set_bookmark %any
map u\<any> unset_bookmark %any
map \<bg> draw_bookmarks
copymap \<bg> u\<bg> `<bg> '<bg>
# Tabs
map tq tab_close
map tr tab_restore
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
map <A-l> tab_move 1
map <A-h> tab_move -1
map <C-n> tab_new
map <C-w> tab_close
map tn eval fm.tab_new('%d')
map uq tab_restore
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
# Generate all the chmod bindings with some python help
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# ===================================================================
# == Define keys for the console
# ===================================================================
# Basic
cmap <C-l> redraw_window
cmap <Tab> eval fm.ui.console.tab()
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
cmap <S-Tab> eval fm.ui.console.tab(-1)
copycmap <CR> <C-j>
copycmap <ESC> <C-c>
# Move around
cmap <Left> eval fm.ui.console.move(left=1)
cmap <Right> eval fm.ui.console.move(right=1)
cmap <Up> eval fm.ui.console.history_move(-1)
cmap <Down> eval fm.ui.console.history_move(1)
cmap <A-left> eval fm.ui.console.move_word(left=1)
cmap <A-right> eval fm.ui.console.move_word(right=1)
cmap <Home> eval fm.ui.console.move(right=0, absolute=True)
cmap <End> eval fm.ui.console.move(right=-1, absolute=True)
# Line Editing
cmap <C-y> eval fm.ui.console.paste()
cmap <Delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <Backspace> eval fm.ui.console.delete(-1)
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <allow_quantifiers> false
copycmap <Backspace> <Backspace2>
# ===================================================================
# == Pager Keybindings
# ===================================================================
# Movement
pmap <Up> pager_move up=1
pmap <Home> pager_move to=0
pmap <End> pager_move to=-1
pmap <Down> pager_move down=1
pmap <Left> pager_move left=4
pmap <Right> pager_move right=4
pmap <C-u> pager_move up=0.5 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <Pageup> pager_move up=1.0 pages=True
pmap <Pagedown> pager_move down=1.0 pages=True
copypmap <End> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <Home> g
copypmap <Left> h
copypmap <Right> l
copypmap <Up> k <C-p>
copypmap <Down> j <C-n> <CR>
copypmap <Pageup> p b <C-B>
copypmap <Pagedown> n f <C-F> <Space>
# Basic
pmap E edit_file
pmap <ESC> pager_close
pmap <C-l> redraw_window
copypmap <ESC> q Q i <F3>
# ===================================================================
# == Taskview Keybindings
# ===================================================================
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
# ===================================================================
# == Additional Keybinds
# ===================================================================
## New
map Nf console touch%space
map Nd console mkdir%space
## Set background
map sZ shell nitrogen --set-zoom-fill --head=0 --save %f
map sz shell nitrogen --set-zoom-fill --head=1 --save %f
map sS shell nitrogen --set-scaled --head=0 --save %f
map ss shell nitrogen --set-scaled --head=1 --save %f
map sF shell nitrogen --set-zoom-fill --head=-1 --save %f
map sf shell nitrogen --set-scaled --head=-1 --save %f
## Go / cd
map gh cd ~
map g/ cd /
map gE cd /etc
map gu cd /usr
map gb cd ~/bin
map gm cd ~/Music
map g. cd ~/.config
map gp cd ~/Pictures
map gd cd ~/Downloads
map gr cd ~/.config/ranger
map g? cd /usr/share/doc/ranger
## Move
map mD shell mv %s ~/Documents/
map md shell mv %s ~/Downloads/
map mp shell mv %s ~/Pictures/
map m. shell mv %s ~/.config/
map mv shell mv %s ~/Videos/
map mm shell mv %s ~/Music/
map mb shell mv %s ~/bin/
map mh shell mv %s ~/
## Copy
map YD shell cp -r %s ~/Documents/
map Yd shell cp -r %s ~/Downloads/
map Yp shell cp -r %s ~/Pictures/
map Y. shell cp -r %s ~/.config/
map Yv shell cp -r %s ~/Videos/
map Ym shell cp -r %s ~/Music/
map Yb shell cp -r %s ~/bin/
map Yh shell cp -r %s ~/

View File

@ -1,158 +0,0 @@
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
# $1-$9 | The n-th selected file
# $@ | All selected files
#
# If you use the special command "ask", rifle will ask you what program to run.
#
# Prefixing a condition with "!" will negate its result.
# These conditions are currently supported:
# match <regexp> | The regexp matches $1
# ext <regexp> | The regexp matches the extension of $1
# mime <regexp> | The regexp matches the mime type of $1
# name <regexp> | The regexp matches the basename of $1
# path <regexp> | The regexp matches the absolute path of $1
# has <program> | The program is installed (i.e. located in $PATH)
# env <variable> | The environment variable "variable" is non-empty
# file | $1 is a file
# directory | $1 is a directory
# number <n> | change the number of this command to n
# terminal | stdin, stderr and stdout are connected to a terminal
# X | $DISPLAY is not empty (i.e. Xorg runs)
#
# There are also pseudo-conditions which have a "side effect":
# flag <flags> | Change how the program is run. See below.
# label <label> | Assign a label or name to the command so it can
# | be started with :open_with <label> in ranger
# | or `rifle -p <label>` in the standalone executable.
# else | Always true.
#
# Flags are single characters which slightly transform the command:
# f | Fork the program, make it run in the background.
# | New command = setsid $command >& /dev/null &
# r | Execute the command with root permissions
# | New command = sudo $command
# t | Run the program in a new terminal. If $TERMCMD is not defined,
# | rifle will attempt to extract it from $TERM.
# | New command = $TERMCMD -e $command
# Note: The "New command" serves only as an illustration, the exact
# implementation may differ.
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
# -- Alternative example for opening files using xdg-open
# Replace your rifle.conf with this file to use xdg-open as your file opener.
# This is, of course, adaptable for use with any other file opener.
# else = xdg-open "$1"
# You need an "editor" and "pager" in order to use certain functions in ranger:
# label editor = "$EDITOR" -- "$@"
# label pager = "$PAGER" -- "$@"
# -- End example
#-------------------------------------------
# Text
#
mime ^text, label editor = $EDITOR -- "$@"
mime ^text, label pager = $PAGER -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $PAGER -- "$@"
#-------------------------------------------
# Webpages
#
ext x?html?, X, flag f = firefox -- "$@"
ext x?html?, terminal = w3m "$@"
#-------------------------------------------
# Code
#
ext 1|5 = man "$1"
ext exe = wine "$1"
ext py = python -- "$1"
ext pl = perl -- "$1"
ext rb = ruby -- "$1"
ext js = node -- "$1"
ext sh = bash -- "$1"
ext php = php -- "$1"
name ^[mM]akefile$ = make
name ^PKGBUILD$ = makepkg --printsrcinfo >.SRCINFO && makepkg -f
#--------------------------------------------
# Audio without X
#
mime ^audio|ogg$, terminal, flag f, has mplayer2 = mplayer2 -- "$@"
mime ^audio|ogg$, terminal, flag f, has mpv = mpv -- "$@"
mime ^audio|ogg$, terminal, flag f, has mplayer = mplayer -- "$@"
ext midi?, terminal, flag f, has wildmidi = wildmidi -- "$@"
#--------------------------------------------
# Video/Audio with a GUI
#
ext gif, has mpv, X, flag f = mpv --loop -- "$1"
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
mime ^video, has mpv, X, flag f = mpv -- "$@"
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
# Without GUI:
ext gif, terminal, !X, has mpv, flag f = mpv --loop -- "$1"
mime ^video, terminal, !X, has mpv, flag f = mpv -- "$@"
mime ^video, terminal, !X, has mplayer2, flag f = mplayer2 -- "$@"
mime ^video, terminal, !X, has mplayer, flag f = mplayer -- "$@"
#-------------------------------------------
# Documents
#
ext pdf|djvu, has zathura, X, flag f = zathura -- "$@"
ext pdf|djvu, has evince, X, flag f = evince -- "$@"
ext pdf|djvu, has mupdf, X, flag f = mupdf "$@"
ext pdf|djvu, has mupdf-x11, X, flag f = mupdf-x11 "$@"
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
ext pptx?|od[dfgpst]|docx?|sxc, has libreoffice, X, flag f = libreoffice "$@"
ext xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc, has soffice, X, flag f = soffice "$@"
ext xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc, has ooffice, X, flag f = ooffice "$@"
ext xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
#-------------------------------------------
# Image Viewing:
#
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
mime ^image, has feh, X, flag f = feh -- "$@"
mime ^image, has gimp, X, flag f = gimp -- "$@"
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
ext xcf, has gimp, X, flag f = gimp -- "$@"
#-------------------------------------------
# Archives
#
ext to|torrent, flag f, has deluge = deluge "$1"
ext to|torrent, flag f, has transmission = transmission "$1"
ext 7z|ace|ar|arc|xar|xpi|xz|zip|gz, has aunpack = aunpack -- "$@"
ext bz2?|cab|cpio|cpt|deb|dgc|dmg, has aunpack = aunpack -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz, has aunpack = aunpack -- "$@"
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $PAGER -- "$@"
mime application/x-executable = "$1"

View File

@ -1,161 +0,0 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
# If the option `use_preview_script` is set to `true`,
# then this script will be called and its output will be displayed in ranger.
# ANSI color codes are supported.
# STDIN is disabled, so interactive scripts won't work properly
# This script is considered a configuration file and must be updated manually.
# It will be left untouched if you upgrade ranger.
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | Display stdout as preview
# 1 | no preview | Display no preview at all
# 2 | plain text | Display the plain content of the file
# 3 | fix width | Don't reload when width changes
# 4 | fix height | Don't reload when height changes
# 5 | fix both | Don't ever reload
# 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
# 7 | image | Display the file directly as an image
# script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="${FILE_EXTENSION,,}"
# Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=4
HIGHLIGHT_STYLE='pablo'
PYGMENTIZE_STYLE='autumn'
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
ace|arc|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|tar|tbz|tbz2|tgz|tlz|txz|tzo|zip)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1
;;
xz|rpm)
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1
;;
rar)
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1
;;
7z)
7z l -p -- "${FILE_PATH}" && exit 5
exit 1
;;
pdf)
pdftoppm -jpeg -singlefile "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1
;;
odt|ods|odp|sxw)
odt2txt "${FILE_PATH}" && exit 5
exit 1
;;
htm|html|xhtml)
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
esac
}
handle_image() {
local mimetype="${1}"
case "${mimetype}" in
image/svg+xml)
convert "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
exit 1
;;
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
exit 7
;;
video/*)
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
exit 1
;;
application/pdf)
pdftoppm -f 1 -l 1 -scale-to-x 1920 -scale-to-y -1 -singlefile -jpeg -tiffcompression \
jpeg -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" && exit 6 || exit 1
esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
text/*|*/xml)
if [[ "$(stat --printf='%s' -- "${FILE_PATH}")" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$(tput colors)" -ge 256 ]]; then
local highlight_format='xterm256'
else
local highlight_format='ansi'
fi
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
exit 2
;;
image/*)
local orientation
orientation="$(identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}")"
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
video/*)
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

View File

@ -16,14 +16,3 @@ gtk-xft-antialias=1
gtk-xft-hinting=1 gtk-xft-hinting=1
gtk-xft-hintstyle="hintslight" gtk-xft-hintstyle="hintslight"
gtk-xft-rgba="rgb" gtk-xft-rgba="rgb"
style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 10
base[NORMAL] = "#000000"
base[SELECTED] = "#71B9FF"
base[ACTIVE] = "#71B9FF"
fg[NORMAL] = "#fcfcfc"
fg[SELECTED] = "#ffffff"
fg[ACTIVE] = "#ffffff"
}
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

View File

@ -1,102 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>ArchLabs Home</title>
<link rel="stylesheet" href="style.css">
<meta charset="utf-8">
<link rel="shortcut icon" href="res/logo-dark.png"/>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<div class="stripe" style="background-color:#090909">
<div class="title">
<span>Official</span>
</div>
<div class="content">
<span class="item">
<a href="https://archlabsblog.wordpress.com">Official Website</a>
</span>
<span class="item">
<a href="https://forum.archlabslinux.com/">ArchLabs Forum</a>
</span>
<span class="item">
<a href="https://www.reddit.com/r/ArchLabsLinux/">ArchLabs Reddit</a>
</span>
<span class="item">
<a href="https://twitter.com/ArchLabsLinux">ArchLabs Twitter</a>
</span>
</div>
</div>
<div class="stripe" style="background-color:#9E3B58">
<div class="title">
<span>Openbox</span>
</div>
<div class="content">
<span class="item">
<a href="https://www.opendesktop.org/">Box Look</a>
</span>
<span class="item">
<a href="https://urukrama.wordpress.com/openbox-guide/">Urukrama's Openbox Guide+</a>
</span>
<span class="item">
<a href="https://forums.bunsenlabs.org/viewforum.php?id=9">Bunsenlabs Openbox Scripts etc.</a>
</span>
</div>
</div>
<div class="stripe" style="background-color:#1AADB5">
<div class="title">
<span>Wikis</span>
</div>
<div class="content">
<span class="item">
<a href="http://openbox.org/wiki/Main_Page">Openbox Wiki</a>
</span>
<span class="item">
<a href="https://wiki.archlinux.org/index.php/Openbox">Arch Wiki</a>
</span>
<span class="item">
<a href="https://i3wm.org/docs/">i3 Wiki</a>
</span>
</div>
</div>
<div class="stripe" style="background-color:#BA386F">
<div class="title">
<span>ArchLabs</span>
</div>
<div class="content">
<span class="item">
<a href="https://bitbucket.org/archlabslinux/iso/issues/new">Got an Issue?</a>
</span>
<span class="item">
<a href="https://forum.archlabslinux.com/">Got a Suggestion?</a>
</span>
</div>
</div>
<h2>
<div>
<img src="res/logo.png"></img>
</div>
</h2>
<h3>
<div>ArchLabs</div>
</h3>
<form method="get" action="https://www.duckduckgo.com">
<input type="text" name="q" placeholder="Search..." autofocus>
<p>
<span name="yt">arch.wiki</span>
<span name="sr">arch.forums</span>
<span name="a">arch.packages</span>
<span name="w">openbox.official</span>
</p>
</form>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -1,47 +0,0 @@
$(document).ready(function() {
//Search Bar
var $search = $("input[name='q']");
$("span[name='yt']").click(function() {
var curr = $search.val();
$search.val("!arch " + curr);
$search.focus();
});
$("span[name='sr']").click(function() {
var curr = $search.val();
$search.val("!archforums " + curr);
$search.focus();
});
$("span[name='a']").click(function() {
var curr = $search.val();
$search.val("!pkg " + curr);
$search.focus();
});
$("span[name='w']").click(function() {
var curr = $search.val();
$search.val("!openbox" + curr);
$search.focus();
});
//Tabs
$(".stripe").mouseenter(function() {
$(this).stop().animate({
width: '100vw'
});
$(this).find(".content").stop().fadeIn().children().show();
});
$(".stripe").mouseleave(function() {
$(this).stop().animate({
width: '40px'
});
$(this).find(".content").stop().fadeOut();
});
});

View File

@ -1,139 +0,0 @@
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400');
* {
margin: 0;
padding: 0;
font-family: "Ubuntu";
}
body {
width: 100vw;
height: 100vh;
background:url("res/archlabs02.png");
}
h2 {
width: 100vw;
position: absolute;
top: calc(90vh - 20px);
left: calc(85vh - 0px);
text-align: center;
font-weight: 300;
font-size: 35px;
}
h3 {
width: 100vw;
position: absolute;
top: calc(90vh - 0px);
left: calc(75vh - 0px);
text-align: center;
font-weight: 500;
font-size: 0px;
color: white;
}
form {
position: absolute;
left: 50%;
top: 40%;
width: 600px;
height: 50px;
transform: translateX(-50%);
font-weight: 300;
z-index: 1;
}
form p {
display: flex;
margin-top: 10px;
justify-content: space-between;
color: #ACB6BF;
padding-left: 5px;
padding-right: 5px;
}
form p span {
cursor: pointer;
transition: color 0.5s;
}
form p span:hover {
color: #ACB6BF;
}
input[type=text] {
width: 600px;
height: 50px;
border: 1px solid #a0a0a0;
border-radius: 2px;
padding: 10px;
font-weight: 300;
}
input[type=text]:focus {
border-color: #707070
}
.stripe {
position: relative;
width: 40px;
height: 25vh;
color: white;
z-index: 2;
}
.stripe .title {
position: relative;
width: 40px;
height: 100%;
float: left;
box-sizing: border-box;
}
.stripe .title span {
position: absolute;
top: 50%;
left: 50%;
display: block;
transform: translateX(-50%) translateY(-50%) rotate(-90deg);
font-weight: 400;
}
.stripe .content {
position: absolute;
left: calc(5vw + 40px);
width: calc(90vw - 40px);
display: none;
padding: 20px;
box-sizing: border-box;
height: 100%;
font-weight: 300;
display: flex;
justify-content: space-between;
}
.stripe .content div {
position: relative;
height: 100%;
width: 150px;
display: none;
}
.stripe .content div img {
position: absolute;
max-height: 100px;
max-width: 150px;
top: 50%;
transform: translateY(-50%);
}
.stripe .content span {
line-height: calc(25vh - 50px);
display: none;
}
.stripe .content span a {
text-decoration: none;
color: white;
}

View File

View File

@ -1,266 +0,0 @@
" Common ANSI-standard functions
syn keyword cAnsiFunction MULU_ DIVU_ MODU_ MUL_ DIV_ MOD_
syn keyword cAnsiFunction main typeof
syn keyword cAnsiFunction open close read write lseek dup dup2
syn keyword cAnsiFunction fcntl ioctl
syn keyword cAnsiFunction wctrans towctrans towupper
syn keyword cAnsiFunction towlower wctype iswctype
syn keyword cAnsiFunction iswxdigit iswupper iswspace
syn keyword cAnsiFunction iswpunct iswprint iswlower
syn keyword cAnsiFunction iswgraph iswdigit iswcntrl
syn keyword cAnsiFunction iswalpha iswalnum wcsrtombs
syn keyword cAnsiFunction mbsrtowcs wcrtomb mbrtowc
syn keyword cAnsiFunction mbrlen mbsinit wctob
syn keyword cAnsiFunction btowc wcsfxtime wcsftime
syn keyword cAnsiFunction wmemset wmemmove wmemcpy
syn keyword cAnsiFunction wmemcmp wmemchr wcstok
syn keyword cAnsiFunction wcsstr wcsspn wcsrchr
syn keyword cAnsiFunction wcspbrk wcslen wcscspn
syn keyword cAnsiFunction wcschr wcsxfrm wcsncmp
syn keyword cAnsiFunction wcscoll wcscmp wcsncat
syn keyword cAnsiFunction wcscat wcsncpy wcscpy
syn keyword cAnsiFunction wcstoull wcstoul wcstoll
syn keyword cAnsiFunction wcstol wcstold wcstof
syn keyword cAnsiFunction wcstod ungetwc putwchar
syn keyword cAnsiFunction putwc getwchar getwc
syn keyword cAnsiFunction fwide fputws fputwc
syn keyword cAnsiFunction fgetws fgetwc wscanf
syn keyword cAnsiFunction wprintf vwscanf vwprintf
syn keyword cAnsiFunction vswscanf vswprintf vfwscanf
syn keyword cAnsiFunction vfwprintf swscanf swprintf
syn keyword cAnsiFunction fwscanf fwprintf zonetime
syn keyword cAnsiFunction strfxtime strftime localtime
syn keyword cAnsiFunction gmtime ctime asctime
syn keyword cAnsiFunction time mkxtime mktime
syn keyword cAnsiFunction difftime clock strlen
syn keyword cAnsiFunction strerror memset strtok
syn keyword cAnsiFunction strstr strspn strrchr
syn keyword cAnsiFunction strpbrk strcspn strchr
syn keyword cAnsiFunction memchr strxfrm strncmp
syn keyword cAnsiFunction strcoll strcmp memcmp
syn keyword cAnsiFunction strncat strcat strncpy
syn keyword cAnsiFunction strcpy memmove memcpy
syn keyword cAnsiFunction wcstombs mbstowcs wctomb
syn keyword cAnsiFunction mbtowc mblen lldiv
syn keyword cAnsiFunction ldiv div llabs
syn keyword cAnsiFunction labs abs qsort
syn keyword cAnsiFunction bsearch system getenv
syn keyword cAnsiFunction exit atexit abort
syn keyword cAnsiFunction realloc malloc free
syn keyword cAnsiFunction calloc srand rand
syn keyword cAnsiFunction strtoull strtoul strtoll
syn keyword cAnsiFunction strtol strtold strtof
syn keyword cAnsiFunction strtod atoll atol
syn keyword cAnsiFunction atoi atof perror
syn keyword cAnsiFunction ferror feof clearerr
syn keyword cAnsiFunction rewind ftell fsetpos
syn keyword cAnsiFunction fseek fgetpos fwrite
syn keyword cAnsiFunction fread ungetc puts
syn keyword cAnsiFunction putchar putc gets
syn keyword cAnsiFunction getchar getc fputs
syn keyword cAnsiFunction fputc fgets fgetc
syn keyword cAnsiFunction vsscanf vsprintf vsnprintf
syn keyword cAnsiFunction vscanf vprintf vfscanf
syn keyword cAnsiFunction vfprintf sscanf sprintf
syn keyword cAnsiFunction snprintf scanf printf
syn keyword cAnsiFunction fscanf fprintf setvbuf
syn keyword cAnsiFunction setbuf freopen fopen
syn keyword cAnsiFunction fflush fclose tmpnam
syn keyword cAnsiFunction tmpfile rename remove
syn keyword cAnsiFunction offsetof va_start va_end
syn keyword cAnsiFunction va_copy va_arg raise signal
syn keyword cAnsiFunction longjmp setjmp isunordered
syn keyword cAnsiFunction islessgreater islessequal isless
syn keyword cAnsiFunction isgreaterequal isgreater fmal
syn keyword cAnsiFunction fmaf fma fminl
syn keyword cAnsiFunction fminf fmin fmaxl
syn keyword cAnsiFunction fmaxf fmax fdiml
syn keyword cAnsiFunction fdimf fdim nextafterxl
syn keyword cAnsiFunction nextafterxf nextafterx nextafterl
syn keyword cAnsiFunction nextafterf nextafter nanl
syn keyword cAnsiFunction nanf nan copysignl
syn keyword cAnsiFunction copysignf copysign remquol
syn keyword cAnsiFunction remquof remquo remainderl
syn keyword cAnsiFunction remainderf remainder fmodl
syn keyword cAnsiFunction fmodf fmod truncl
syn keyword cAnsiFunction truncf trunc llroundl
syn keyword cAnsiFunction llroundf llround lroundl
syn keyword cAnsiFunction lroundf lround roundl
syn keyword cAnsiFunction roundf round llrintl
syn keyword cAnsiFunction llrintf llrint lrintl
syn keyword cAnsiFunction lrintf lrint rintl
syn keyword cAnsiFunction rintf rint nearbyintl
syn keyword cAnsiFunction nearbyintf nearbyint floorl
syn keyword cAnsiFunction floorf floor ceill
syn keyword cAnsiFunction ceilf ceil tgammal
syn keyword cAnsiFunction tgammaf tgamma lgammal
syn keyword cAnsiFunction lgammaf lgamma erfcl
syn keyword cAnsiFunction erfcf erfc erfl
syn keyword cAnsiFunction erff erf sqrtl
syn keyword cAnsiFunction sqrtf sqrt powl
syn keyword cAnsiFunction powf pow hypotl
syn keyword cAnsiFunction hypotf hypot fabsl
syn keyword cAnsiFunction fabsf fabs cbrtl
syn keyword cAnsiFunction cbrtf cbrt scalblnl
syn keyword cAnsiFunction scalblnf scalbln scalbnl
syn keyword cAnsiFunction scalbnf scalbn modfl
syn keyword cAnsiFunction modff modf logbl
syn keyword cAnsiFunction logbf logb log2l
syn keyword cAnsiFunction log2f log2 log1pl
syn keyword cAnsiFunction log1pf log1p log10l
syn keyword cAnsiFunction log10f log10 logl
syn keyword cAnsiFunction logf log ldexpl
syn keyword cAnsiFunction ldexpf ldexp ilogbl
syn keyword cAnsiFunction ilogbf ilogb frexpl
syn keyword cAnsiFunction frexpf frexp expm1l
syn keyword cAnsiFunction expm1f expm1 exp2l
syn keyword cAnsiFunction exp2f exp2 expl
syn keyword cAnsiFunction expf exp tanhl
syn keyword cAnsiFunction tanhf tanh sinhl
syn keyword cAnsiFunction sinhf sinh coshl
syn keyword cAnsiFunction coshf cosh atanhl
syn keyword cAnsiFunction atanhf atanh asinhl
syn keyword cAnsiFunction asinhf asinh acoshl
syn keyword cAnsiFunction acoshf acosh tanl
syn keyword cAnsiFunction tanf tan sinl
syn keyword cAnsiFunction sinf sin cosl
syn keyword cAnsiFunction cosf cos atan2l
syn keyword cAnsiFunction atan2f atan2 atanl
syn keyword cAnsiFunction atanf atan asinl
syn keyword cAnsiFunction asinf asin acosl
syn keyword cAnsiFunction acosf acos signbit
syn keyword cAnsiFunction isnormal isnan isinf
syn keyword cAnsiFunction isfinite fpclassify localeconv
syn keyword cAnsiFunction setlocale wcstoumax wcstoimax
syn keyword cAnsiFunction strtoumax strtoimax feupdateenv
syn keyword cAnsiFunction fesetenv feholdexcept fegetenv
syn keyword cAnsiFunction fesetround fegetround fetestexcept
syn keyword cAnsiFunction fesetexceptflag feraiseexcept fegetexceptflag
syn keyword cAnsiFunction feclearexcept toupper tolower
syn keyword cAnsiFunction isxdigit isupper isspace
syn keyword cAnsiFunction ispunct isprint islower
syn keyword cAnsiFunction isgraph isdigit iscntrl
syn keyword cAnsiFunction isalpha isalnum creall
syn keyword cAnsiFunction crealf creal cprojl
syn keyword cAnsiFunction cprojf cproj conjl
syn keyword cAnsiFunction conjf conj cimagl
syn keyword cAnsiFunction cimagf cimag cargl
syn keyword cAnsiFunction cargf carg csqrtl
syn keyword cAnsiFunction csqrtf csqrt cpowl
syn keyword cAnsiFunction cpowf cpow cabsl
syn keyword cAnsiFunction cabsf cabs clogl
syn keyword cAnsiFunction clogf clog cexpl
syn keyword cAnsiFunction cexpf cexp ctanhl
syn keyword cAnsiFunction ctanhf ctanh csinhl
syn keyword cAnsiFunction csinhf csinh ccoshl
syn keyword cAnsiFunction ccoshf ccosh catanhl
syn keyword cAnsiFunction catanhf catanh casinhl
syn keyword cAnsiFunction casinhf casinh cacoshl
syn keyword cAnsiFunction cacoshf cacosh ctanl
syn keyword cAnsiFunction ctanf ctan csinl
syn keyword cAnsiFunction csinf csin ccosl
syn keyword cAnsiFunction ccosf ccos catanl
syn keyword cAnsiFunction catanf catan casinl
syn keyword cAnsiFunction casinf casin cacosl
syn keyword cAnsiFunction cacosf cacos assert
syn keyword cAnsiFunction UINTMAX_C INTMAX_C UINT64_C
syn keyword cAnsiFunction UINT32_C UINT16_C UINT8_C
syn keyword cAnsiFunction INT64_C INT32_C INT16_C INT8_C
" Common ANSI-standard Names
syn keyword cAnsiName PRId8 PRIi16 PRIo32 PRIu64
syn keyword cAnsiName PRId16 PRIi32 PRIo64 PRIuLEAST8
syn keyword cAnsiName PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16
syn keyword cAnsiName PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32
syn keyword cAnsiName PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64
syn keyword cAnsiName PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8
syn keyword cAnsiName PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16
syn keyword cAnsiName PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32
syn keyword cAnsiName PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64
syn keyword cAnsiName PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX
syn keyword cAnsiName PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR
syn keyword cAnsiName PRIdFAST64 PRIiMAX PRIoPTR PRIx8
syn keyword cAnsiName PRIdMAX PRIiPTR PRIu8 PRIx16
syn keyword cAnsiName PRIdPTR PRIo8 PRIu16 PRIx32
syn keyword cAnsiName PRIi8 PRIo16 PRIu32 PRIx64
syn keyword cAnsiName PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32
syn keyword cAnsiName PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64
syn keyword cAnsiName PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8
syn keyword cAnsiName PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16
syn keyword cAnsiName PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32
syn keyword cAnsiName PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64
syn keyword cAnsiName PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX
syn keyword cAnsiName PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR
syn keyword cAnsiName PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8
syn keyword cAnsiName PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16
syn keyword cAnsiName PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32
syn keyword cAnsiName PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64
syn keyword cAnsiName PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8
syn keyword cAnsiName PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16
syn keyword cAnsiName PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32
syn keyword cAnsiName PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64
syn keyword cAnsiName PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8
syn keyword cAnsiName PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16
syn keyword cAnsiName PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32
syn keyword cAnsiName PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64
syn keyword cAnsiName PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX
syn keyword cAnsiName PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR
syn keyword cAnsiName PRIXMAX SCNiFAST8 SCNuLEAST8
syn keyword cAnsiName PRIXPTR SCNiFAST16 SCNuLEAST16
syn keyword cAnsiName errno environ
syn keyword cAnsiName STDC CX_LIMITED_RANGE
syn keyword cAnsiName STDC FENV_ACCESS
syn keyword cAnsiName STDC FP_CONTRACT
syn keyword cAnsiName AF_INET SOCK_STREAM INADDR_ANY AF_INET
syn keyword cAnsiName SOL_SOCKET SO_REUSEPORT SO_REUSEADDR
syn keyword cAnsiName SO_RCVTIMEO IPPROTO_TCP TCP_NODELAY
syn keyword cAnsiName SOCK_DGRAM POLLIN
syn keyword cAnsiName and bitor not_eq xor
syn keyword cAnsiName and_eq compl or xor_eq
syn keyword cAnsiName bitand not or_eq
hi def link cAnsiFunction cFunction
hi def link cAnsiName cIdentifier
" Operators
syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)="
syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->"
syn match cOperator "[.!~*&%<>^|=,+-]"
syn match cOperator "/[^/*=]"me=e-1
syn match cOperator "/$"
syn match cOperator "&&\|||"
syn match cOperator "[][]"
" Preprocs
syn keyword cDefined defined contained containedin=cDefine
hi def link cDefined cDefine
" Functions
syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator
hi def link cUserFunction cFunction
hi def link cUserFunctionPointer cFunction
" Delimiters
syn match cDelimiter "[();\\]"
" foldmethod=syntax fix, courtesy of Ivan Freitas
syn match cBraces display "[{}]"
" Booleans
syn keyword cBoolean true false TRUE FALSE
" Links
hi def link cFunction Function
hi def link cIdentifier Identifier
hi def link cDelimiter Delimiter
" foldmethod=syntax fix, courtesy of Ivan Freitas
hi def link cBraces Delimiter
hi def link cBoolean Boolean

View File

@ -1,454 +0,0 @@
" ------------------- jinx ---------------------- "
" written by Nathaniel Maia, 2017 - 2019 "
" ----------------------------------------------- "
" ---------- Setup and Checks ----------- " {{{1
if exists('syntax_on') " {{{2
highlight clear
syntax reset
endif
" color definitions {{{2
" start with an empty color dictionary
let s:jinx = {}
" NOTE: For those looking to edit the theme
"
" Color definition is done for both true color
" and 256 color. The format is in ['HEX', 256color, 16color]
"
" let s:jinx.black = ['#000000', 0, 0]
let g:terminal_ansi_colors = [
\ '#4D545E', '#D9534F', '#80B080', '#FFEB56', '#6699CC', '#CC99CC', '#5DD5FF', '#E1E1E1',
\ '#4D545E', '#D9534F', '#80B080', '#FFEB56', '#6699CC', '#CC99CC', '#5DD5FF', '#E1E1E1'
\ ]
let s:i = 0
for s:color in g:terminal_ansi_colors
let g:terminal_color_{s:i} = s:color
let s:i += 1
endfor
let s:jinx.red = ['#EE5555', 210, 1]
let s:jinx.green = ['#88BB88', 108, 2]
let s:jinx.yellow = ['#FFCC66', 220, 3]
let s:jinx.blue = ['#4488CC', 32, 4]
let s:jinx.purple = ['#AA88CC', 140, 5]
let s:jinx.cyan = ['#44CCEE', 81, 6]
let s:jinx.orange = ['#FF8844', 172, 9]
if exists('g:jinx_theme') && g:jinx_theme =~? 'day'
set background=light
let s:jinx.fgr = ['#494949', 238, 0]
let s:jinx.bgr = ['#E1E1E1', 254, 7]
let s:jinx.line = ['#D0D0D0', 252, 15]
let s:jinx.select = ['#D0D0D0', 252, 1]
let s:jinx.folded = ['#B2B2B2', 249, 15]
let s:jinx.commnt = ['#808080', 244, 15]
let s:jinx.yellow = ['#EE9911', 178, 3]
let s:jinx.cyan = ['#3388AA', 37, 6]
elseif exists('g:jinx_theme') && g:jinx_theme =~? 'midnight'
set background=dark
let s:jinx.fgr = ['#CCCCCC', 251, 15]
let s:jinx.bgr = ['#111111', 234, 0]
let s:jinx.line = ['#2A2A2F', 237, 8]
let s:jinx.select = ['#2A2A2F', 237, 1]
let s:jinx.folded = ['#2A2A2F', 237, 8]
let s:jinx.commnt = ['#777777', 243, 7]
else " night
set background=dark
let s:jinx.fgr = ['#E1E1E1', 254, 15]
let s:jinx.bgr = ['#4D545E', 237, 0]
let s:jinx.line = ['#5F6772', 243, 8]
let s:jinx.select = ['#5F6772', 243, 8]
let s:jinx.folded = ['#5F6772', 243, 8]
let s:jinx.commnt = ['#B9B9B9', 250, 7]
endif
function! <SID>hlg(GRP, FG, BG, ATT) abort " {{{2
if a:FG !=# ''
let l:fg_col = get(s:jinx, a:FG)
let l:fg_true = l:fg_col[0]
if $TERM =~? 'linux' || &t_Co < 256
let l:fg_term = l:fg_col[2]
else
let l:fg_term = l:fg_col[1]
endif
exec 'highlight! '.a:GRP.' guifg='.l:fg_true.' ctermfg='.l:fg_term
endif
if a:BG !=# ''
let l:bg_col = get(s:jinx, a:BG)
let l:bg_true = l:bg_col[0]
if $TERM =~? 'linux' || &t_Co < 256
let l:bg_term = l:bg_col[2]
else
let l:bg_term = l:bg_col[1]
endif
exec 'highlight! '.a:GRP.' guibg='.l:bg_true.' ctermbg='.l:bg_term
endif
if a:ATT !=# ''
exec 'highlight! '.a:GRP.' gui='.a:ATT.' cterm='.a:ATT
endif
endfunction
" ---------- Highlight Groups ------------ " {{{1
" Editor {{{2
call <SID>hlg('Title', 'commnt', 'bgr', 'bold')
call <SID>hlg('Visual', '', 'select', '')
call <SID>hlg('SignColumn', '', 'line', '')
call <SID>hlg('CursorLine', '', 'line', '')
call <SID>hlg('CursorColumn', '', 'line', '')
call <SID>hlg('CursorLineNr', 'cyan', 'line', '')
call <SID>hlg('LineNr', 'commnt', 'line', '')
call <SID>hlg('ColorColumn', 'fgr', 'red', '')
call <SID>hlg('Error', 'red', 'bgr', '')
call <SID>hlg('ErrorMsg', 'red', 'bgr', '')
call <SID>hlg('WarningMsg', 'red', 'bgr', '')
call <SID>hlg('MatchParen', 'yellow', 'bgr', '')
call <SID>hlg('ModeMsg', 'cyan', 'bgr', '')
call <SID>hlg('MoreMsg', 'cyan', 'bgr', '')
call <SID>hlg('Directory', 'blue', 'bgr', '')
call <SID>hlg('Question', 'green', 'bgr', '')
call <SID>hlg('NonText', 'commnt', 'bgr', '')
call <SID>hlg('SpecialKey', 'commnt', 'bgr', '')
call <SID>hlg('Folded', 'commnt', 'folded', '')
call <SID>hlg('Search', 'bgr', 'blue', '')
call <SID>hlg('HLNext', 'bgr', 'red', '')
call <SID>hlg('Normal', 'fgr', 'bgr', '')
call <SID>hlg('VertSplit', 'line', 'commnt', '')
" Tabline {{{2
call <SID>hlg('TabLine', 'fgr', 'line', '')
call <SID>hlg('TabLineFill', 'line', 'line', '')
call <SID>hlg('TabLineSel', 'line', 'green', '')
call <SID>hlg('WildMenu', 'bgr', 'fgr', '')
call <SID>hlg('Pmenu', 'bgr', 'commnt', '')
call <SID>hlg('PmenuSel', 'fgr', 'bgr', '')
call <SID>hlg('PmenuSbar', 'commnt', 'line', '')
call <SID>hlg('PmenuThumb', 'commnt', 'line', '')
call <SID>hlg('StatusLine', 'line', 'fgr', '')
call <SID>hlg('StatusLineNC', 'fgr', 'line', '')
" Spelling {{{2
call <SID>hlg('SpellBad', '', '', 'underline')
call <SID>hlg('SpellLocal', '', '', 'underline')
call <SID>hlg('SpellRare', '', '', 'underline')
" ALE linter {{{2
call <SID>hlg('ALEErrorSign', 'red', 'line', '')
call <SID>hlg('ALEWarningSign', 'orange', 'line', '')
call <SID>hlg('ALEError', 'red', '', 'underline')
call <SID>hlg('ALEWarning', 'red', '', 'underline')
call <SID>hlg('ALEStyleError', 'orange', '', 'underline')
call <SID>hlg('ALEStyleWarning', 'orange', '', 'underline')
" Generic {{{2
call <SID>hlg('Comment', 'commnt', '', '')
call <SID>hlg('Todo', 'red', '', '')
call <SID>hlg('Exception', 'red', '', '')
call <SID>hlg('Float', 'cyan', '', '')
call <SID>hlg('Number', 'cyan', '', '')
call <SID>hlg('Include', 'cyan', '', '')
call <SID>hlg('Character', 'blue', '', '')
call <SID>hlg('Operator', 'blue', '', '')
call <SID>hlg('String', 'blue', '', '')
call <SID>hlg('Label', 'green', '', '')
call <SID>hlg('Repeat', 'purple', '', '')
call <SID>hlg('Statement', 'green', '', '')
call <SID>hlg('Conditional', 'green', '', '')
call <SID>hlg('Boolean', 'green', '', '')
call <SID>hlg('Keyword', 'green', '', '')
call <SID>hlg('Macro', 'purple', '', '')
call <SID>hlg('Define', 'purple', '', '')
call <SID>hlg('Special', 'purple', '', '')
call <SID>hlg('Tag', 'purple', '', '')
call <SID>hlg('Type', 'purple', '', '')
call <SID>hlg('TypeDef', 'purple', '', '')
call <SID>hlg('Structure', 'purple', '', '')
call <SID>hlg('StorageClass', 'purple', '', '')
call <SID>hlg('PreProc', 'yellow', '', '')
call <SID>hlg('Constant', 'yellow', '', '')
call <SID>hlg('Identifier', 'yellow', '', '')
call <SID>hlg('PreCondit', 'yellow', '', '')
call <SID>hlg('Conceal', 'orange', '', '')
call <SID>hlg('Function', 'orange', '', '')
" Vim {{{2
call <SID>hlg('vimCommand', 'green', '', '')
call <SID>hlg('vimVar', 'yellow', '', '')
call <SID>hlg('vimGroup', 'yellow', '', '')
call <SID>hlg('vimGroupName', 'yellow', '', '')
call <SID>hlg('VimFunction', 'orange', '', '')
call <SID>hlg('VimFunctionKey', 'orange', '', '')
call <SID>hlg('vimMapModKey', 'purple', '', '')
call <SID>hlg('vimBracket', 'purple', '', '')
call <SID>hlg('vimOption', 'purple', '', '')
call <SID>hlg('vimMapMod', 'purple', '', '')
call <SID>hlg('vimNotation', 'purple', '', '')
" Shell {{{2
call <SID>hlg('shSet', 'green', '', '')
call <SID>hlg('shLoop', 'green', '', '')
call <SID>hlg('shFor', 'yellow', '', '')
call <SID>hlg('shTestOpr', 'blue', '', '')
call <SID>hlg('shConstant', 'yellow', '', '')
call <SID>hlg('shFunctionKey', 'orange', '', '')
call <SID>hlg('shStatement', 'green', '', '')
call <SID>hlg('shKeyword', 'purple', '', '')
call <SID>hlg('zshStatement', 'green', '', '')
call <SID>hlg('zshOption', 'purple', '', '')
call <SID>hlg('zshParentheses', 'purple', '', '')
call <SID>hlg('zshBrackets', 'purple', '', '')
call <SID>hlg('zshRepeat', 'green', '', '')
call <SID>hlg('zshRedir', 'fgr', '', '')
call <SID>hlg('zshFunction', 'orange', '', '')
call <SID>hlg('zshVariableDef', 'yellow', '', '')
call <SID>hlg('zshVariable', 'yellow', '', '')
call <SID>hlg('zshOperator', 'blue', '', '')
call <SID>hlg('zshPreProc', 'commnt', '', '')
" C {{{2
call <SID>hlg('cConditional', 'green', '', '')
call <SID>hlg('cRepeat', 'purple', '', '')
call <SID>hlg('cStorageClass', 'purple', '', '')
call <SID>hlg('cType', 'yellow', '', '')
" PHP {{{2
call <SID>hlg('phpMemberSelector', 'blue', '', '')
call <SID>hlg('phpVarSelector', 'red', '', '')
call <SID>hlg('phpConditional', 'green', '', '')
call <SID>hlg('phpStatement', 'green', '', '')
call <SID>hlg('phpKeyword', 'purple', '', '')
call <SID>hlg('phpRepeat', 'purple', '', '')
" Ruby {{{2
call <SID>hlg('rubyInclude', 'blue', '', '')
call <SID>hlg('rubyAttribute', 'blue', '', '')
call <SID>hlg('rubySymbol', 'green', '', '')
call <SID>hlg('rubyStringDelimiter', 'green', '', '')
call <SID>hlg('rubyRepeat', 'purple', '', '')
call <SID>hlg('rubyControl', 'purple', '', '')
call <SID>hlg('rubyConditional', 'purple', '', '')
call <SID>hlg('rubyException', 'purple', '', '')
call <SID>hlg('rubyCurlyBlock', 'orange', '', '')
call <SID>hlg('rubyLocalVariableOrMethod', 'orange', '', '')
call <SID>hlg('rubyInterpolationDelimiter', 'orange', '', '')
call <SID>hlg('rubyAccess', 'yellow', '', '')
call <SID>hlg('rubyConstant', 'yellow', '', '')
" Python {{{2
call <SID>hlg('pythonRun', 'red', '', '')
call <SID>hlg('pythonOperator', 'blue', '', '')
call <SID>hlg('pythonClass', 'blue', '', '')
call <SID>hlg('pythonClassParameters', 'purple', '', '')
call <SID>hlg('pythonParam', 'purple', '', '')
call <SID>hlg('pythonDecorator', 'blue', '', '')
call <SID>hlg('pythonExClass', 'blue', '', '')
call <SID>hlg('pythonException', 'blue', '', '')
call <SID>hlg('pythonExceptions', 'blue', '', '')
call <SID>hlg('pythonBrackets', 'blue', '', '')
call <SID>hlg('pythonEscape', 'blue', '', '')
call <SID>hlg('pythonImport', 'green', '', '')
call <SID>hlg('pythonRepeat', 'green', '', '')
call <SID>hlg('pythonCoding', 'green', '', '')
call <SID>hlg('pythonInclude', 'green', '', '')
call <SID>hlg('pythonPreCondit', 'green', '', '')
call <SID>hlg('pythonStatement', 'green', '', '')
call <SID>hlg('pythonConditional', 'green', '', '')
call <SID>hlg('pythonDef', 'yellow', '', '')
call <SID>hlg('pythonSelf', 'blue', '', '')
call <SID>hlg('pythonBuiltinType', 'purple', '', '')
call <SID>hlg('pythonBuiltin', 'purple', '', '')
call <SID>hlg('pythonBuiltinObj', 'purple', '', '')
call <SID>hlg('pythonBuiltinFunc', 'orange', '', '')
call <SID>hlg('pythonDot', 'orange', '', '')
call <SID>hlg('pythonLambda', 'orange', '', '')
call <SID>hlg('pythonLambdaExpr', 'orange', '', '')
call <SID>hlg('pythonFunction', 'orange', '', '')
call <SID>hlg('pythonDottedName', 'orange', '', '')
call <SID>hlg('pythonBuiltinObjs', 'orange', '', '')
" LaTeX {{{2
call <SID>hlg('texZone', 'red', '', 'none')
call <SID>hlg('texStatement', 'blue', '', 'none')
call <SID>hlg('texRefLabel', 'blue', '', 'none')
call <SID>hlg('texRefZone', 'green', '', 'none')
call <SID>hlg('texMath', 'orange', '', 'none')
call <SID>hlg('texMathZoneX', 'orange', '', 'none')
call <SID>hlg('texMathZoneA', 'orange', '', 'none')
call <SID>hlg('texMathZoneB', 'orange', '', 'none')
call <SID>hlg('texMathZoneC', 'orange', '', 'none')
call <SID>hlg('texMathZoneD', 'orange', '', 'none')
call <SID>hlg('texMathZoneE', 'orange', '', 'none')
call <SID>hlg('texMathMatcher', 'orange', '', 'none')
call <SID>hlg('texDelimiter', 'purple', '', 'none')
call <SID>hlg('texComment', 'commnt', '', 'none')
" JavaScript {{{2
call <SID>hlg('javaScriptNumber', 'cyan', '', '')
call <SID>hlg('javascriptNull', 'red', '', '')
call <SID>hlg('javascriptStatement', 'green', '', '')
call <SID>hlg('javaScriptConditional', 'green', '', '')
call <SID>hlg('javaScriptRepeat', 'purple', '', '')
call <SID>hlg('javaScriptBraces', 'purple', '', '')
call <SID>hlg('javascriptGlobal', 'yellow', '', '')
call <SID>hlg('javaScriptFunction', 'orange', '', '')
call <SID>hlg('javaScriptMember', 'orange', '', '')
" HTML {{{2
call <SID>hlg('htmlTag', 'red', '', '')
call <SID>hlg('htmlTagName', 'red', '', '')
call <SID>hlg('htmlLink', 'blue', '', '')
call <SID>hlg('htmlArg', 'green', '', '')
call <SID>hlg('htmlScriptTag', 'purple', '', '')
call <SID>hlg('htmlTitle', 'blue', '', '')
call <SID>hlg('htmlH1', 'blue', '', '')
call <SID>hlg('htmlH2', 'cyan', '', '')
call <SID>hlg('htmlH3', 'cyan', '', '')
call <SID>hlg('htmlH4', 'green', '', '')
call <SID>hlg('htmlH5', 'green', '', '')
" YAML {{{2
call <SID>hlg('yamlKey', 'red', '', '')
call <SID>hlg('yamlAnchor', 'red', '', '')
call <SID>hlg('yamlAlias', 'blue', '', '')
call <SID>hlg('yamlDocumentHeader', 'green', '', '')
" Markdown {{{2
call <SID>hlg('markdownHeadingRule', 'red', '', '')
call <SID>hlg('markdownHeadingDelimiter', 'red', '', '')
call <SID>hlg('markdownListMarker', 'blue', '', '')
call <SID>hlg('markdownOrderedListMarker', 'blue', '', '')
call <SID>hlg('markdownCode', 'purple', '', '')
call <SID>hlg('markdownCodeBlock', 'purple', '', '')
call <SID>hlg('markdownCodeDelimiter', 'purple', '', '')
call <SID>hlg('markdownH1', 'blue', '', '')
call <SID>hlg('markdownH2', 'blue', '', '')
call <SID>hlg('markdownH3', 'cyan', '', '')
call <SID>hlg('markdownH4', 'cyan', '', '')
call <SID>hlg('markdownH5', 'green', '', '')
" ShowMarks {{{2
call <SID>hlg('ShowMarksHLm', 'cyan', '', '')
call <SID>hlg('ShowMarksHLl', 'orange', '', '')
call <SID>hlg('ShowMarksHLo', 'purple', '', '')
call <SID>hlg('ShowMarksHLu', 'yellow', '', '')
" Lua {{{2
call <SID>hlg('luaRepeat', 'purple', '', '')
call <SID>hlg('luaStatement', 'purple', '', '')
call <SID>hlg('luaCond', 'green', '', '')
call <SID>hlg('luaCondEnd', 'green', '', '')
call <SID>hlg('luaCondStart', 'green', '', '')
call <SID>hlg('luaCondElseif', 'green', '', '')
" Go {{{2
call <SID>hlg('goDeclType', 'blue', '', '')
call <SID>hlg('goLabel', 'purple', '', '')
call <SID>hlg('goRepeat', 'purple', '', '')
call <SID>hlg('goBuiltins', 'purple', '', '')
call <SID>hlg('goStatement', 'purple', '', '')
call <SID>hlg('goDirective', 'purple', '', '')
call <SID>hlg('goDeclaration', 'purple', '', '')
call <SID>hlg('goConditional', 'purple', '', '')
call <SID>hlg('goTodo', 'yellow', '', '')
call <SID>hlg('goConstants', 'orange', '', '')
" Clojure {{{2
call <SID>hlg('clojureException', 'red', '', '')
call <SID>hlg('clojureParen', 'cyan', '', '')
call <SID>hlg('clojureCond', 'blue', '', '')
call <SID>hlg('clojureFunc', 'blue', '', '')
call <SID>hlg('clojureMeta', 'blue', '', '')
call <SID>hlg('clojureMacro', 'blue', '', '')
call <SID>hlg('clojureDeref', 'blue', '', '')
call <SID>hlg('clojureQuote', 'blue', '', '')
call <SID>hlg('clojureRepeat', 'blue', '', '')
call <SID>hlg('clojureRepeat', 'blue', '', '')
call <SID>hlg('clojureUnquote', 'blue', '', '')
call <SID>hlg('clojureAnonArg', 'blue', '', '')
call <SID>hlg('clojureDispatch', 'blue', '', '')
call <SID>hlg('clojureString', 'green', '', '')
call <SID>hlg('clojureRegexp', 'green', '', '')
call <SID>hlg('clojureKeyword', 'green', '', '')
call <SID>hlg('clojureDefine', 'purple', '', '')
call <SID>hlg('clojureSpecial', 'purple', '', '')
call <SID>hlg('clojureVariable', 'yellow', '', '')
call <SID>hlg('clojureBoolean', 'orange', '', '')
call <SID>hlg('clojureNumber', 'orange', '', '')
call <SID>hlg('clojureConstant', 'orange', '', '')
call <SID>hlg('clojureCharacter', 'orange', '', '')
" Scala {{{2
call <SID>hlg('scalaPackage', 'red', '', '')
call <SID>hlg('scalaVar', 'cyan', '', '')
call <SID>hlg('scalaDefName', 'blue', '', '')
call <SID>hlg('scalaBackTick', 'blue', '', '')
call <SID>hlg('scalaMethodCall', 'blue', '', '')
call <SID>hlg('scalaXml', 'green', '', '')
call <SID>hlg('scalaString', 'green', '', '')
call <SID>hlg('scalaBackTick', 'green', '', '')
call <SID>hlg('scalaEmptyString', 'green', '', '')
call <SID>hlg('scalaStringEscape', 'green', '', '')
call <SID>hlg('scalaMultiLineString', 'green', '', '')
call <SID>hlg('scalaTypeSpecializer', 'yellow', '', '')
call <SID>hlg('scalaDefSpecializer', 'yellow', '', '')
call <SID>hlg('scalaType', 'yellow', '', '')
call <SID>hlg('scalaCaseType', 'yellow', '', '')
call <SID>hlg('scalaAnnotation', 'orange', '', '')
call <SID>hlg('scalaSymbol', 'orange', '', '')
call <SID>hlg('scalaUnicode', 'orange', '', '')
call <SID>hlg('scalaBoolean', 'orange', '', '')
call <SID>hlg('scalaNumber', 'orange', '', '')
call <SID>hlg('scalaChar', 'orange', '', '')
call <SID>hlg('scalaImport', 'purple', '', '')
call <SID>hlg('scalaDef', 'purple', '', '')
call <SID>hlg('scalaVal', 'purple', '', '')
call <SID>hlg('scalaClass', 'purple', '', '')
call <SID>hlg('scalaTrait', 'purple', '', '')
call <SID>hlg('scalaObject', 'purple', '', '')
call <SID>hlg('scalaKeywordModifier', 'purple', '', '')
call <SID>hlg('scalaDocComment', 'commnt', '', '')
call <SID>hlg('scalaComment', 'commnt', '', '')
call <SID>hlg('scalaDocTags', 'commnt', '', '')
call <SID>hlg('scalaLineComment', 'commnt', '', '')
" Diff {{{2
call <SID>hlg('DiffDelete', 'red', '', '')
call <SID>hlg('DiffChange', 'blue', '', '')
call <SID>hlg('DiffAdd', 'green', '', '')
call <SID>hlg('DiffText', 'line', 'blue', '')
" Cleanup {{{2
" Remove the highlight function as it's no longer needed.
" Will cause problems reloading the theme if not deleted.
delfunction <SID>hlg
let g:colors_name = 'jinx'
" vim:fdm=marker

View File

@ -1,133 +0,0 @@
" Sane vim defaults for ArchLabs
scriptencoding utf8
" Arch defaults
runtime! archlinux.vim
" create the backup and undo directories
silent! call mkdir($HOME.'/.config/nvim/undo', 'p')
silent! call mkdir($HOME.'/.config/nvim/backup', 'p')
" leader key
let g:mapleader = "\<Space>"
syntax enable
set clipboard^=unnamed,unnamedplus " system clipboard (requires +clipboard)
set number " enable line numbers
set backup " create backup files in runtimepath/backup/
set undofile " persistent undo files in runtimepath/undo/
set modeline " enable vim modelines
set hlsearch " highlight search items
set incsearch " searches are performed as you type
set confirm " ask confirmation like save before quit.
set tabstop=4 " tab is equivalent to how many spaces
set softtabstop=4 " tab is equivalent to how many spaces
set shiftwidth=4 " amount of spaces for indentation
set shortmess+=aAcws " hide or shorten certain messages
set wildmenu " tab completion menu in command mode
set linebreak breakindent
set list listchars=tab:>>,trail:~
set wildignore+=*~,*.pyc,*/.git/*,*.so,*.swp,*.o,*.zip,*.zwc,*.png,*.jpg
set mouse=niv " use the terminal mouse in command mode (:)
if has('mouse_sgr') " sgr mouse is better but not every term supports it
set ttymouse=sgr
endif
let g:netrw_altv = 1
let g:netrw_liststyle = 3
let g:netrw_browse_split = 3
if $TERM !=? 'linux'
set termguicolors
if has('multi_byte') && $TERM !=? 'linux'
set list listchars=tab:▏\ ,extends:,precedes:
set fillchars=vert:┃ showbreak=
endif
endif
" set the colorscheme variant.. midnight, night, or day
let g:jinx_theme = 'midnight'
try
colorscheme jinx
catch
colorscheme evening
endtry
" change cursor shape for different editing modes, neovim does this by default
if !has('nvim')
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[5 q\<Esc>\\"
let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
elseif $TERM ==# 'linux'
let &t_SI = "\e[?0c"
let &t_EI = "\e[?8c"
else
let &t_SI = "\e[6 q"
let &t_SR = "\e[4 q"
let &t_EI = "\e[2 q"
endif
endif
" ------ commands ------
command! D Explore
command! W exec 'silent w !sudo tee % >/dev/null'|edit!
" ------ basic maps ------
" alt defaults
nnoremap 0 ^
nnoremap Y y$
nnoremap n nzzzv
nnoremap N Nzzzv
nnoremap <Tab> ==1j
vnoremap <Tab> ==
" gj/k but preserve numbered jumps ie: 12j or 45k
nmap <buffer><silent><expr>j v:count ? 'j' : 'gj'
nmap <buffer><silent><expr>k v:count ? 'k' : 'gk'
" toggle folding
nnoremap <leader>za :set foldenable!<CR>
" fix syntax highlighting issues
nnoremap U :syntax sync fromstart<CR>:redraw!<CR>
" ------ autocmd ------
" when quitting a file save the cursor position and reload if file changed
augroup load_changed_file
autocmd!
autocmd BufReadPost * call setpos(".", getpos("'\""))
autocmd FocusGained,BufEnter * if mode() !=? 'c' | checktime | endif
autocmd FileChangedShellPost * echo "Changes loaded from source file"
augroup END
" make the built-in terminal behave a bit better
if has('nvim')
augroup open_terminal
autocmd!
autocmd TermOpen * setlocal nonumber norelativenumber modifiable | startinsert
autocmd TermClose * buffer #
augroup END
elseif has('terminal')
augroup open_terminal
autocmd!
autocmd TerminalOpen * setlocal nonumber norelativenumber
augroup END
endif
" when not running in a linux console toggle some things when in insert mode
if $TERM !=# 'linux'
augroup active_cursorline
autocmd!
autocmd InsertEnter * setlocal cursorline listchars-=trail:•
autocmd InsertLeave * setlocal nocursorline listchars+=trail:•
augroup END
else
" otherwise disable cursorline
set nocursorline
endif