A presentable version of dotfiles which can be made public.
This commit is contained in:
commit
35923dd1cc
54 changed files with 6407 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
/mp/*
|
||||
!**/.gitinclude
|
||||
**/__pycache__/*
|
||||
|
||||
**/.DS_Store
|
||||
private
|
0
home/.bash_logout
Normal file
0
home/.bash_logout
Normal file
75
home/.bash_profile
Normal file
75
home/.bash_profile
Normal file
|
@ -0,0 +1,75 @@
|
|||
#~/.bash_profile gets ~/.bashrc!!
|
||||
export AE_ROOT="$HOME/.alex-environ"
|
||||
export AE_HOME="$AE_ROOT/home"
|
||||
|
||||
#Add user bin directory to $PATH
|
||||
PATH=$HOME/.cargo/bin:$PATH
|
||||
PATH=$HOME/.local/bin:$PATH
|
||||
PATH=$HOME/.config/composer/vendor/bin/:$PATH
|
||||
PATH=$HOME/scripts:$PATH
|
||||
PATH=$AE_HOME/.local/bin:$PATH
|
||||
PATH=$AE_HOME/scripts:$PATH
|
||||
PATH=/opt/bin:$PATH
|
||||
export PATH
|
||||
|
||||
PYTHONPATH=$HOME/.python-modules:$PYTHONPATH
|
||||
export PYTHONPATH
|
||||
|
||||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
#Start an agent upon login, or reconnect to a started agent
|
||||
if [ -f ~/.alex-environ/home/scripts/ssh_agent_setup ]; then
|
||||
. ~/.alex-environ/home/scripts/ssh_agent_setup
|
||||
fi
|
||||
|
||||
# Variable overrides
|
||||
vimpath="\vim"
|
||||
export EDITOR="$vimpath"
|
||||
export VISUAL="$vimpath"
|
||||
export SYSTEMD_EDITOR="$vimpath"
|
||||
export SUDO_EDITOR="$vimpath"
|
||||
|
||||
# Fix GPG Bug on WSL.
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Allow DNSSEC Resolving.
|
||||
export RES_OPTIONS=edns0
|
||||
|
||||
#Setup less
|
||||
export LESS="--ignore-case --status-column -M -R -W --tabs=4 --window=-4"
|
||||
LESSOPEN="|lesspipe.sh %s"; export LESSOPEN
|
||||
if type pygmentize >/dev/null 2>&1; then
|
||||
export LESSCOLORIZER='pygmentize'
|
||||
fi
|
||||
|
||||
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
|
||||
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
|
||||
export LESS_TERMCAP_me=$(tput sgr0)
|
||||
export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
|
||||
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
|
||||
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
|
||||
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
|
||||
export LESS_TERMCAP_mr=$(tput rev)
|
||||
export LESS_TERMCAP_mh=$(tput dim)
|
||||
export LESS_TERMCAP_ZN=$(tput ssubm)
|
||||
export LESS_TERMCAP_ZV=$(tput rsubm)
|
||||
export LESS_TERMCAP_ZO=$(tput ssupm)
|
||||
export LESS_TERMCAP_ZW=$(tput rsupm)
|
||||
export GROFF_NO_SGR=1 # For Konsole and Gnome-terminal
|
||||
|
||||
# Pretty LS Colors
|
||||
export LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.yuv=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.flac=01;35:*.mp3=01;35:*.mpc=00;36:*.ogg=00;36:*.wav=00;36:*.mid=00;36:*.midi=00;36:*.au=00;36:*.flac=00;36:*.aac=00;36:*.ra=01;36:*.mka=01;36:"
|
||||
|
||||
# 1password sudo stuff.
|
||||
if [ -n "${sudo_pass_uuid}" ]
|
||||
then
|
||||
export SUDO_ASKPASS=$AE_HOME/scripts/askpass.sh
|
||||
fi
|
||||
|
||||
source $AE_HOME/.bashrc.d/functions.sh
|
||||
|
||||
for f in $AE_HOME/.bash_completions/*
|
||||
do
|
||||
source $f
|
||||
done
|
7
home/.bash_profile.d/prompt
Normal file
7
home/.bash_profile.d/prompt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# add a fancy colored prompt. may be best to copy and alter colors for machine Identification
|
||||
|
||||
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] '
|
||||
|
5
home/.bash_profile.d/root_prompt
Normal file
5
home/.bash_profile.d/root_prompt
Normal file
|
@ -0,0 +1,5 @@
|
|||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
export PS1='\[\033[01;31m\]\u@\h\[\033[00m\] \[\033[01;32m\]\w #\[\033[00m\] '
|
||||
|
33
home/.bashrc
Normal file
33
home/.bashrc
Normal file
|
@ -0,0 +1,33 @@
|
|||
#Alex's global .bashrc
|
||||
|
||||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
#SET PATH IN .BASH_PROFILE
|
||||
|
||||
#don't put duplicate lines or lines beginning with a space into history
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
#append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
#set some max sizes for the history
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
#resize window each command
|
||||
shopt -s checkwinsize
|
||||
|
||||
#set pretty colors for LS
|
||||
alias ls='ls --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias jprint='python3 -m json.tool'
|
||||
alias sl='ls --color=auto'
|
||||
alias vim='vim -p'
|
||||
|
||||
# Onepassword sudo stuff.
|
||||
if [ -n "${sudo_pass_uuid}" ]
|
||||
then
|
||||
alias sudo='sudo -A'
|
||||
fi
|
||||
|
23
home/.bashrc.d/functions.sh
Normal file
23
home/.bashrc.d/functions.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
opin() {
|
||||
export PERSIST_OP=1
|
||||
opon
|
||||
}
|
||||
|
||||
opout() {
|
||||
unset PERSIST_OP
|
||||
opoff
|
||||
}
|
||||
|
||||
opon() {
|
||||
op list vaults 2>&1 > /dev/null || unset OP_SESSION_my
|
||||
if [[ -z $OP_SESSION_my ]]; then
|
||||
eval $(op signin my)
|
||||
fi
|
||||
}
|
||||
|
||||
opoff() {
|
||||
if [[ -z $PERSIST_OP ]]
|
||||
then
|
||||
op signout
|
||||
fi
|
||||
}
|
1
home/.bashrc.d/prompt
Symbolic link
1
home/.bashrc.d/prompt
Symbolic link
|
@ -0,0 +1 @@
|
|||
../.bash_profile.d/prompt
|
1
home/.bashrc.d/root_prompt
Symbolic link
1
home/.bashrc.d/root_prompt
Symbolic link
|
@ -0,0 +1 @@
|
|||
../.bash_profile.d/root_prompt
|
6
home/.bashrc.d/work
Normal file
6
home/.bashrc.d/work
Normal file
|
@ -0,0 +1,6 @@
|
|||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
#things for uni/work machines
|
||||
|
||||
alias sudo='echo "You will probably get told off if you do that"'
|
7
home/.config/flake8
Normal file
7
home/.config/flake8
Normal file
|
@ -0,0 +1,7 @@
|
|||
[flake8]
|
||||
ignore = E203, E266, E501, W503, B950
|
||||
# line length is intentionally set to 80 here because black uses Bugbear
|
||||
# See https://github.com/psf/black/blob/master/README.md#line-length for more details
|
||||
max-line-length = 80
|
||||
max-complexity = 18
|
||||
select = B,C,E,F,W,T4,B9
|
630
home/.config/matplotlib/matplotlibrc
Normal file
630
home/.config/matplotlib/matplotlibrc
Normal file
|
@ -0,0 +1,630 @@
|
|||
### MATPLOTLIBRC FORMAT
|
||||
|
||||
# This is a sample matplotlib configuration file - you can find a copy
|
||||
# of it on your system in
|
||||
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
|
||||
# there, please note that it will be overwritten in your next install.
|
||||
# If you want to keep a permanent local copy that will not be
|
||||
# overwritten, place it in the following location:
|
||||
# unix/linux:
|
||||
# $HOME/.config/matplotlib/matplotlibrc or
|
||||
# $XDG_CONFIG_HOME/matplotlib/matplotlibrc (if $XDG_CONFIG_HOME is set)
|
||||
# other platforms:
|
||||
# $HOME/.matplotlib/matplotlibrc
|
||||
#
|
||||
# See http://matplotlib.org/users/customizing.html#the-matplotlibrc-file for
|
||||
# more details on the paths which are checked for the configuration file.
|
||||
#
|
||||
# This file is best viewed in a editor which supports python mode
|
||||
# syntax highlighting. Blank lines, or lines starting with a comment
|
||||
# symbol, are ignored, as are trailing comments. Other lines must
|
||||
# have the format
|
||||
# key : val # optional comment
|
||||
#
|
||||
# Colors: for the color values below, you can either use - a
|
||||
# matplotlib color string, such as r, k, or b - an rgb tuple, such as
|
||||
# (1.0, 0.5, 0.0) - a hex string, such as ff00ff - a scalar
|
||||
# grayscale intensity such as 0.75 - a legal html color name, e.g., red,
|
||||
# blue, darkslategray
|
||||
|
||||
#### CONFIGURATION BEGINS HERE
|
||||
|
||||
# The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
|
||||
# MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG
|
||||
# Template.
|
||||
# You can also deploy your own backend outside of matplotlib by
|
||||
# referring to the module name (which must be in the PYTHONPATH) as
|
||||
# 'module://my_backend'.
|
||||
backend : TkAgg
|
||||
|
||||
# If you are using the Qt4Agg backend, you can choose here
|
||||
# to use the PyQt4 bindings or the newer PySide bindings to
|
||||
# the underlying Qt4 toolkit.
|
||||
#backend.qt4 : PyQt4 # PyQt4 | PySide
|
||||
|
||||
# Note that this can be overridden by the environment variable
|
||||
# QT_API used by Enthought Tool Suite (ETS); valid values are
|
||||
# "pyqt" and "pyside". The "pyqt" setting has the side effect of
|
||||
# forcing the use of Version 2 API for QString and QVariant.
|
||||
|
||||
# The port to use for the web server in the WebAgg backend.
|
||||
# webagg.port : 8888
|
||||
|
||||
# If webagg.port is unavailable, a number of other random ports will
|
||||
# be tried until one that is available is found.
|
||||
# webagg.port_retries : 50
|
||||
|
||||
# When True, open the webbrowser to the plot that is shown
|
||||
# webagg.open_in_browser : True
|
||||
|
||||
# When True, the figures rendered in the nbagg backend are created with
|
||||
# a transparent background.
|
||||
# nbagg.transparent : False
|
||||
|
||||
# if you are running pyplot inside a GUI and your backend choice
|
||||
# conflicts, we will automatically try to find a compatible one for
|
||||
# you if backend_fallback is True
|
||||
backend_fallback: True
|
||||
|
||||
#interactive : False
|
||||
#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated)
|
||||
#timezone : UTC # a pytz timezone string, e.g., US/Central or Europe/Paris
|
||||
|
||||
# Where your matplotlib data lives if you installed to a non-default
|
||||
# location. This is where the matplotlib fonts, bitmaps, etc reside
|
||||
#datapath : /home/jdhunter/mpldata
|
||||
|
||||
|
||||
### LINES
|
||||
# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more
|
||||
# information on line properties.
|
||||
lines.linewidth : 0.5 # line width in points
|
||||
#lines.linestyle : - # solid line
|
||||
#lines.color : C0 # has no affect on plot(); see axes.prop_cycle
|
||||
#lines.marker : None # the default marker
|
||||
#lines.markeredgewidth : 1.0 # the line width around the marker symbol
|
||||
#lines.markersize : 6 # markersize, in points
|
||||
#lines.dash_joinstyle : miter # miter|round|bevel
|
||||
#lines.dash_capstyle : butt # butt|round|projecting
|
||||
#lines.solid_joinstyle : miter # miter|round|bevel
|
||||
#lines.solid_capstyle : projecting # butt|round|projecting
|
||||
#lines.antialiased : True # render lines in antialiased (no jaggies)
|
||||
|
||||
# The three standard dash patterns. These are scaled by the linewidth.
|
||||
#lines.dashed_pattern : 2.8, 1.2
|
||||
#lines.dashdot_pattern : 4.8, 1.2, 0.8, 1.2
|
||||
#lines.dotted_pattern : 1.1, 1.1
|
||||
#lines.scale_dashes : True
|
||||
|
||||
#markers.fillstyle: full # full|left|right|bottom|top|none
|
||||
|
||||
### PATCHES
|
||||
# Patches are graphical objects that fill 2D space, like polygons or
|
||||
# circles. See
|
||||
# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches
|
||||
# information on patch properties
|
||||
#patch.linewidth : 1 # edge width in points.
|
||||
#patch.facecolor : C0
|
||||
#patch.edgecolor : black # if forced, or patch is not filled
|
||||
#patch.force_edgecolor : False # True to always use edgecolor
|
||||
#patch.antialiased : True # render patches in antialiased (no jaggies)
|
||||
|
||||
### HATCHES
|
||||
#hatch.color : k
|
||||
#hatch.linewidth : 1.0
|
||||
|
||||
### Boxplot
|
||||
#boxplot.notch : False
|
||||
#boxplot.vertical : True
|
||||
#boxplot.whiskers : 1.5
|
||||
#boxplot.bootstrap : None
|
||||
#boxplot.patchartist : False
|
||||
#boxplot.showmeans : False
|
||||
#boxplot.showcaps : True
|
||||
#boxplot.showbox : True
|
||||
#boxplot.showfliers : True
|
||||
#boxplot.meanline : False
|
||||
|
||||
#boxplot.flierprops.color : 'k'
|
||||
#boxplot.flierprops.marker : 'o'
|
||||
#boxplot.flierprops.markerfacecolor : 'none'
|
||||
#boxplot.flierprops.markeredgecolor : 'k'
|
||||
#boxplot.flierprops.markersize : 6
|
||||
#boxplot.flierprops.linestyle : 'none'
|
||||
#boxplot.flierprops.linewidth : 1.0
|
||||
|
||||
#boxplot.boxprops.color : 'k'
|
||||
#boxplot.boxprops.linewidth : 1.0
|
||||
#boxplot.boxprops.linestyle : '-'
|
||||
|
||||
#boxplot.whiskerprops.color : 'k'
|
||||
#boxplot.whiskerprops.linewidth : 1.0
|
||||
#boxplot.whiskerprops.linestyle : '-'
|
||||
|
||||
#boxplot.capprops.color : 'k'
|
||||
#boxplot.capprops.linewidth : 1.0
|
||||
#boxplot.capprops.linestyle : '-'
|
||||
|
||||
#boxplot.medianprops.color : 'C1'
|
||||
#boxplot.medianprops.linewidth : 1.0
|
||||
#boxplot.medianprops.linestyle : '-'
|
||||
|
||||
#boxplot.meanprops.color : 'C2'
|
||||
#boxplot.meanprops.marker : '^'
|
||||
#boxplot.meanprops.markerfacecolor : 'C2'
|
||||
#boxplot.meanprops.markeredgecolor : 'C2'
|
||||
#boxplot.meanprops.markersize : 6
|
||||
#boxplot.meanprops.linestyle : 'none'
|
||||
#boxplot.meanprops.linewidth : 1.0
|
||||
|
||||
### FONT
|
||||
#
|
||||
# font properties used by text.Text. See
|
||||
# http://matplotlib.org/api/font_manager_api.html for more
|
||||
# information on font properties. The 6 font properties used for font
|
||||
# matching are given below with their default values.
|
||||
#
|
||||
# The font.family property has five values: 'serif' (e.g., Times),
|
||||
# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery),
|
||||
# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of
|
||||
# these font families has a default list of font names in decreasing
|
||||
# order of priority associated with them. When text.usetex is False,
|
||||
# font.family may also be one or more concrete font names.
|
||||
#
|
||||
# The font.style property has three values: normal (or roman), italic
|
||||
# or oblique. The oblique style will be used for italic, if it is not
|
||||
# present.
|
||||
#
|
||||
# The font.variant property has two values: normal or small-caps. For
|
||||
# TrueType fonts, which are scalable fonts, small-caps is equivalent
|
||||
# to using a font size of 'smaller', or about 83%% of the current font
|
||||
# size.
|
||||
#
|
||||
# The font.weight property has effectively 13 values: normal, bold,
|
||||
# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as
|
||||
# 400, and bold is 700. bolder and lighter are relative values with
|
||||
# respect to the current weight.
|
||||
#
|
||||
# The font.stretch property has 11 values: ultra-condensed,
|
||||
# extra-condensed, condensed, semi-condensed, normal, semi-expanded,
|
||||
# expanded, extra-expanded, ultra-expanded, wider, and narrower. This
|
||||
# property is not currently implemented.
|
||||
#
|
||||
# The font.size property is the default font size for text, given in pts.
|
||||
# 10 pt is the standard value.
|
||||
#
|
||||
font.family : sans-serif
|
||||
font.style : normal
|
||||
font.variant : normal
|
||||
font.weight : medium
|
||||
font.stretch : normal
|
||||
# note that font.size controls default text sizes. To configure
|
||||
# special text sizes tick labels, axes, labels, title, etc, see the rc
|
||||
# settings for axes and ticks. Special text sizes can be defined
|
||||
# relative to font.size, using the following values: xx-small, x-small,
|
||||
# small, medium, large, x-large, xx-large, larger, or smaller
|
||||
#font.size : 10.0
|
||||
#font.serif : DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
|
||||
font.sans-serif : CMU Sans Serif, Helvetica, DejaVu Sans, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Avant Garde, sans-serif
|
||||
#font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive
|
||||
#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, Humor Sans, xkcd, fantasy
|
||||
#font.monospace : DejaVu Sans Mono, Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace
|
||||
|
||||
### TEXT
|
||||
# text properties used by text.Text. See
|
||||
# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
|
||||
# information on text properties
|
||||
|
||||
#text.color : black
|
||||
|
||||
### LaTeX customizations. See http://wiki.scipy.org/Cookbook/Matplotlib/UsingTex
|
||||
text.usetex : False # use latex for all text handling. The following fonts
|
||||
# are supported through the usual rc parameter settings:
|
||||
# new century schoolbook, bookman, times, palatino,
|
||||
# zapf chancery, charter, serif, sans-serif, helvetica,
|
||||
# avant garde, courier, monospace, computer modern roman,
|
||||
# computer modern sans serif, computer modern typewriter
|
||||
# If another font is desired which can loaded using the
|
||||
# LaTeX \usepackage command, please inquire at the
|
||||
# matplotlib mailing list
|
||||
#text.latex.unicode : True # use "ucs" and "inputenc" LaTeX packages for handling
|
||||
# unicode strings.
|
||||
#text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
|
||||
# AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
|
||||
# IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
|
||||
# preamble is a comma separated list of LaTeX statements
|
||||
# that are included in the LaTeX document preamble.
|
||||
# An example:
|
||||
# text.latex.preamble : \usepackage{bm},\usepackage{euler}
|
||||
# The following packages are always loaded with usetex, so
|
||||
# beware of package collisions: color, geometry, graphicx,
|
||||
# type1cm, textcomp. Adobe Postscript (PSSNFS) font packages
|
||||
# may also be loaded, depending on your font settings
|
||||
|
||||
#text.dvipnghack : None # some versions of dvipng don't handle alpha
|
||||
# channel properly. Use True to correct
|
||||
# and flush ~/.matplotlib/tex.cache
|
||||
# before testing and False to force
|
||||
# correction off. None will try and
|
||||
# guess based on your dvipng version
|
||||
|
||||
#text.hinting : auto # May be one of the following:
|
||||
# 'none': Perform no hinting
|
||||
# 'auto': Use FreeType's autohinter
|
||||
# 'native': Use the hinting information in the
|
||||
# font file, if available, and if your
|
||||
# FreeType library supports it
|
||||
# 'either': Use the native hinting information,
|
||||
# or the autohinter if none is available.
|
||||
# For backward compatibility, this value may also be
|
||||
# True === 'auto' or False === 'none'.
|
||||
#text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
|
||||
# horizontal direction. A value of 1 will hint to full
|
||||
# pixels. A value of 2 will hint to half pixels etc.
|
||||
|
||||
#text.antialiased : True # If True (default), the text will be antialiased.
|
||||
# This only affects the Agg backend.
|
||||
|
||||
# The following settings allow you to select the fonts in math mode.
|
||||
# They map from a TeX font name to a fontconfig font pattern.
|
||||
# These settings are only used if mathtext.fontset is 'custom'.
|
||||
# Note that this "custom" mode is unsupported and may go away in the
|
||||
# future.
|
||||
mathtext.cal : CMU Sans Serif:oblique
|
||||
mathtext.rm : CMU Sans Serif
|
||||
mathtext.tt : CMU Sans Serif
|
||||
mathtext.it : CMU Sans Serif:oblique
|
||||
mathtext.bf : CMU Sans Serif:bold
|
||||
mathtext.sf : CMU Sans Serif
|
||||
mathtext.fontset : custom # Should be 'dejavusans' (default),
|
||||
# 'dejavuserif', 'cm' (Computer Modern), 'stix',
|
||||
# 'stixsans' or 'custom'
|
||||
#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern
|
||||
mathtext.fallback : cm
|
||||
# fonts when a symbol can not be found in one of
|
||||
# the custom math fonts.
|
||||
|
||||
mathtext.default : regular #regular # The default font to use for math.
|
||||
# Can be any of the LaTeX font names, including
|
||||
# the special name "regular" for the same font
|
||||
# used in regular text.
|
||||
|
||||
### AXES
|
||||
# default face and edge color, default tick sizes,
|
||||
# default fontsizes for ticklabels, and so on. See
|
||||
# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes
|
||||
#axes.facecolor : white # axes background color
|
||||
#axes.edgecolor : black # axes edge color
|
||||
#axes.linewidth : 0.8 # edge linewidth
|
||||
#axes.grid : False # display grid or not
|
||||
axes.titlesize : 10 # fontsize of the axes title
|
||||
#axes.titlepad : 6.0 # pad between axes and title in points
|
||||
axes.labelsize : 8 # fontsize of the x any y labels
|
||||
#axes.labelpad : 4.0 # space between label and axis
|
||||
#axes.labelweight : normal # weight of the x and y labels
|
||||
#axes.labelcolor : black
|
||||
#axes.axisbelow : 'line' # draw axis gridlines and ticks below
|
||||
# patches (True); above patches but below
|
||||
# lines ('line'); or above all (False)
|
||||
|
||||
#axes.formatter.limits : -7, 7 # use scientific notation if log10
|
||||
# of the axis range is smaller than the
|
||||
# first or larger than the second
|
||||
#axes.formatter.use_locale : False # When True, format tick labels
|
||||
# according to the user's locale.
|
||||
# For example, use ',' as a decimal
|
||||
# separator in the fr_FR locale.
|
||||
#axes.formatter.use_mathtext : False # When True, use mathtext for scientific
|
||||
# notation.
|
||||
#axes.formatter.useoffset : True # If True, the tick label formatter
|
||||
# will default to labeling ticks relative
|
||||
# to an offset when the data range is
|
||||
# small compared to the minimum absolute
|
||||
# value of the data.
|
||||
#axes.formatter.offset_threshold : 4 # When useoffset is True, the offset
|
||||
# will be used when it can remove
|
||||
# at least this number of significant
|
||||
# digits from tick labels.
|
||||
|
||||
# axes.spines.left : True # display axis spines
|
||||
# axes.spines.bottom : True
|
||||
# axes.spines.top : True
|
||||
# axes.spines.right : True
|
||||
|
||||
|
||||
#axes.unicode_minus : True # use unicode for the minus symbol
|
||||
# rather than hyphen. See
|
||||
# http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
|
||||
#axes.prop_cycle : cycler('color',
|
||||
# ['1f77b4', 'ff7f0e', '2ca02c', 'd62728',
|
||||
# '9467bd', '8c564b', 'e377c2', '7f7f7f',
|
||||
# 'bcbd22', '17becf'])
|
||||
# color cycle for plot lines
|
||||
# as list of string colorspecs:
|
||||
# single letter, long name, or
|
||||
# web-style hex
|
||||
#axes.autolimit_mode : data # How to scale axes limits to the data.
|
||||
# Use "data" to use data limits, plus some margin
|
||||
# Use "round_number" move to the nearest "round" number
|
||||
#axes.xmargin : .05 # x margin. See `axes.Axes.margins`
|
||||
#axes.ymargin : .05 # y margin See `axes.Axes.margins`
|
||||
|
||||
#polaraxes.grid : True # display grid on polar axes
|
||||
#axes3d.grid : True # display grid on 3d axes
|
||||
|
||||
### DATES
|
||||
# These control the default format strings used in AutoDateFormatter.
|
||||
# Any valid format datetime format string can be used (see the python
|
||||
# `datetime` for details). For example using '%%x' will use the locale date representation
|
||||
# '%%X' will use the locale time representation and '%%c' will use the full locale datetime
|
||||
# representation.
|
||||
# These values map to the scales:
|
||||
# {'year': 365, 'month': 30, 'day': 1, 'hour': 1/24, 'minute': 1 / (24 * 60)}
|
||||
|
||||
date.autoformatter.year : %Y
|
||||
date.autoformatter.month : %m/%Y
|
||||
date.autoformatter.day : %d/%m/%Y
|
||||
date.autoformatter.hour : %d/%m %H
|
||||
date.autoformatter.minute : %d %H:%M
|
||||
date.autoformatter.second : %H:%M:%S
|
||||
date.autoformatter.microsecond : %M:%S.%f
|
||||
|
||||
### TICKS
|
||||
# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick
|
||||
#xtick.top : False # draw ticks on the top side
|
||||
#xtick.bottom : True # draw ticks on the bottom side
|
||||
#xtick.major.size : 3.5 # major tick size in points
|
||||
#xtick.minor.size : 2 # minor tick size in points
|
||||
#xtick.major.width : 0.8 # major tick width in points
|
||||
#xtick.minor.width : 0.6 # minor tick width in points
|
||||
#xtick.major.pad : 3.5 # distance to major tick label in points
|
||||
#xtick.minor.pad : 3.4 # distance to the minor tick label in points
|
||||
#xtick.color : k # color of the tick labels
|
||||
xtick.labelsize : 6 # fontsize of the tick labels
|
||||
#xtick.direction : out # direction: in, out, or inout
|
||||
#xtick.minor.visible : False # visibility of minor ticks on x-axis
|
||||
#xtick.major.top : True # draw x axis top major ticks
|
||||
#xtick.major.bottom : True # draw x axis bottom major ticks
|
||||
#xtick.minor.top : True # draw x axis top minor ticks
|
||||
#xtick.minor.bottom : True # draw x axis bottom minor ticks
|
||||
|
||||
#ytick.left : True # draw ticks on the left side
|
||||
#ytick.right : False # draw ticks on the right side
|
||||
#ytick.major.size : 3.5 # major tick size in points
|
||||
#ytick.minor.size : 2 # minor tick size in points
|
||||
#ytick.major.width : 0.8 # major tick width in points
|
||||
#ytick.minor.width : 0.6 # minor tick width in points
|
||||
#ytick.major.pad : 3.5 # distance to major tick label in points
|
||||
#ytick.minor.pad : 3.4 # distance to the minor tick label in points
|
||||
#ytick.color : k # color of the tick labels
|
||||
ytick.labelsize : 6 # fontsize of the tick labels
|
||||
#ytick.direction : out # direction: in, out, or inout
|
||||
#ytick.minor.visible : False # visibility of minor ticks on y-axis
|
||||
#ytick.major.left : True # draw y axis left major ticks
|
||||
#ytick.major.right : True # draw y axis right major ticks
|
||||
#ytick.minor.left : True # draw y axis left minor ticks
|
||||
#ytick.minor.right : True # draw y axis right minor ticks
|
||||
|
||||
|
||||
### GRIDS
|
||||
#grid.color : b0b0b0 # grid color
|
||||
#grid.linestyle : - # solid
|
||||
#grid.linewidth : 0.8 # in points
|
||||
#grid.alpha : 1.0 # transparency, between 0.0 and 1.0
|
||||
|
||||
### Legend
|
||||
#legend.loc : best
|
||||
#legend.frameon : True # if True, draw the legend on a background patch
|
||||
#legend.framealpha : 0.8 # legend patch transparency
|
||||
#legend.facecolor : inherit # inherit from axes.facecolor; or color spec
|
||||
#legend.edgecolor : 0.8 # background patch boundary color
|
||||
#legend.fancybox : True # if True, use a rounded box for the
|
||||
# legend background, else a rectangle
|
||||
#legend.shadow : False # if True, give background a shadow effect
|
||||
#legend.numpoints : 1 # the number of marker points in the legend line
|
||||
#legend.scatterpoints : 1 # number of scatter points
|
||||
#legend.markerscale : 1.0 # the relative size of legend markers vs. original
|
||||
legend.fontsize : 8
|
||||
# Dimensions as fraction of fontsize:
|
||||
#legend.borderpad : 0.4 # border whitespace
|
||||
#legend.labelspacing : 0.5 # the vertical space between the legend entries
|
||||
#legend.handlelength : 2.0 # the length of the legend lines
|
||||
#legend.handleheight : 0.7 # the height of the legend handle
|
||||
#legend.handletextpad : 0.8 # the space between the legend line and legend text
|
||||
#legend.borderaxespad : 0.5 # the border between the axes and legend edge
|
||||
#legend.columnspacing : 2.0 # column separation
|
||||
|
||||
### FIGURE
|
||||
# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
|
||||
figure.titlesize : 14 # size of the figure title (Figure.suptitle())
|
||||
#figure.titleweight : normal # weight of the figure title
|
||||
#figure.figsize : 8, 6 # figure size in inches 6.4, 4.8
|
||||
figure.dpi : 150 # figure dots per inch
|
||||
#figure.facecolor : white # figure facecolor; 0.75 is scalar gray
|
||||
#figure.edgecolor : white # figure edgecolor
|
||||
#figure.autolayout : True # When True, automatically adjust subplot
|
||||
# parameters to make the plot fit the figure
|
||||
figure.max_open_warning : 50 # The maximum number of figures to open through
|
||||
# the pyplot interface before emitting a warning.
|
||||
# If less than one this feature is disabled.
|
||||
|
||||
# The figure subplot parameters. All dimensions are a fraction of the
|
||||
#figure.subplot.left : 0.125 # the left side of the subplots of the figure
|
||||
#figure.subplot.right : 0.9 # the right side of the subplots of the figure
|
||||
#figure.subplot.bottom : 0.11 # the bottom of the subplots of the figure
|
||||
#figure.subplot.top : 0.88 # the top of the subplots of the figure
|
||||
#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots,
|
||||
# expressed as a fraction of the average axis width
|
||||
#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots,
|
||||
# expressed as a fraction of the average axis height
|
||||
|
||||
|
||||
### IMAGES
|
||||
#image.aspect : equal # equal | auto | a number
|
||||
#image.interpolation : nearest # see help(imshow) for options
|
||||
#image.cmap : viridis # A colormap name, gray etc...
|
||||
#image.lut : 256 # the size of the colormap lookup table
|
||||
#image.origin : upper # lower | upper
|
||||
#image.resample : True
|
||||
#image.composite_image : True # When True, all the images on a set of axes are
|
||||
# combined into a single composite image before
|
||||
# saving a figure as a vector graphics file,
|
||||
# such as a PDF.
|
||||
|
||||
### CONTOUR PLOTS
|
||||
#contour.negative_linestyle : dashed # dashed | solid
|
||||
#contour.corner_mask : True # True | False | legacy
|
||||
|
||||
### ERRORBAR PLOTS
|
||||
#errorbar.capsize : 0 # length of end cap on error bars in pixels
|
||||
|
||||
### HISTOGRAM PLOTS
|
||||
#hist.bins : 10 # The default number of histogram bins.
|
||||
# If Numpy 1.11 or later is
|
||||
# installed, may also be `auto`
|
||||
|
||||
### SCATTER PLOTS
|
||||
#scatter.marker : o # The default marker type for scatter plots.
|
||||
|
||||
### Agg rendering
|
||||
### Warning: experimental, 2008/10/10
|
||||
#agg.path.chunksize : 0 # 0 to disable; values in the range
|
||||
# 10000 to 100000 can improve speed slightly
|
||||
# and prevent an Agg rendering failure
|
||||
# when plotting very large data sets,
|
||||
# especially if they are very gappy.
|
||||
# It may cause minor artifacts, though.
|
||||
# A value of 20000 is probably a good
|
||||
# starting point.
|
||||
### SAVING FIGURES
|
||||
#path.simplify : True # When True, simplify paths by removing "invisible"
|
||||
# points to reduce file size and increase rendering
|
||||
# speed
|
||||
#path.simplify_threshold : 0.1 # The threshold of similarity below which
|
||||
# vertices will be removed in the simplification
|
||||
# process
|
||||
#path.snap : True # When True, rectilinear axis-aligned paths will be snapped to
|
||||
# the nearest pixel when certain criteria are met. When False,
|
||||
# paths will never be snapped.
|
||||
#path.sketch : None # May be none, or a 3-tuple of the form (scale, length,
|
||||
# randomness).
|
||||
# *scale* is the amplitude of the wiggle
|
||||
# perpendicular to the line (in pixels). *length*
|
||||
# is the length of the wiggle along the line (in
|
||||
# pixels). *randomness* is the factor by which
|
||||
# the length is randomly scaled.
|
||||
|
||||
# the default savefig params can be different from the display params
|
||||
# e.g., you may want a higher resolution, or to make the figure
|
||||
# background white
|
||||
savefig.dpi : 300 # figure dots per inch or 'figure'
|
||||
#savefig.facecolor : white # figure facecolor when saving
|
||||
#savefig.edgecolor : white # figure edgecolor when saving
|
||||
#savefig.format : png # png, ps, pdf, svg
|
||||
savefig.bbox : tight # 'tight' or 'standard'.
|
||||
# 'tight' is incompatible with pipe-based animation
|
||||
# backends but will workd with temporary file based ones:
|
||||
# e.g. setting animation.writer to ffmpeg will not work,
|
||||
# use ffmpeg_file instead
|
||||
#savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight'
|
||||
#savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter.
|
||||
#savefig.directory : ~ # default directory in savefig dialog box,
|
||||
# leave empty to always use current working directory
|
||||
#savefig.transparent : False # setting that controls whether figures are saved with a
|
||||
# transparent background by default
|
||||
|
||||
# tk backend params
|
||||
#tk.window_focus : False # Maintain shell focus for TkAgg
|
||||
|
||||
# ps backend params
|
||||
#ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10
|
||||
#ps.useafm : False # use of afm fonts, results in small files
|
||||
#ps.usedistiller : False # can be: None, ghostscript or xpdf
|
||||
# Experimental: may produce smaller files.
|
||||
# xpdf intended for production of publication quality files,
|
||||
# but requires ghostscript, xpdf and ps2eps
|
||||
#ps.distiller.res : 6000 # dpi
|
||||
#ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)
|
||||
|
||||
# pdf backend params
|
||||
#pdf.compression : 6 # integer from 0 to 9
|
||||
# 0 disables compression (good for debugging)
|
||||
#pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)
|
||||
|
||||
# svg backend params
|
||||
#svg.image_inline : True # write raster image data directly into the svg file
|
||||
#svg.fonttype : 'path' # How to handle SVG fonts:
|
||||
# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
|
||||
# 'path': Embed characters as paths -- supported by most SVG renderers
|
||||
# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome,
|
||||
# Opera and Safari
|
||||
#svg.hashsalt : None # if not None, use this string as hash salt
|
||||
# instead of uuid4
|
||||
|
||||
# docstring params
|
||||
#docstring.hardcopy = False # set this when you want to generate hardcopy docstring
|
||||
|
||||
# Set the verbose flags. This controls how much information
|
||||
# matplotlib gives you at runtime and where it goes. The verbosity
|
||||
# levels are: silent, helpful, debug, debug-annoying. Any level is
|
||||
# inclusive of all the levels below it. If your setting is "debug",
|
||||
# you'll get all the debug and helpful messages. When submitting
|
||||
# problems to the mailing-list, please set verbose to "helpful" or "debug"
|
||||
# and paste the output into your report.
|
||||
#
|
||||
# The "fileo" gives the destination for any calls to verbose.report.
|
||||
# These objects can a filename, or a filehandle like sys.stdout.
|
||||
#
|
||||
# You can override the rc default verbosity from the command line by
|
||||
# giving the flags --verbose-LEVEL where LEVEL is one of the legal
|
||||
# levels, e.g., --verbose-helpful.
|
||||
#
|
||||
# You can access the verbose instance in your code
|
||||
# from matplotlib import verbose.
|
||||
#verbose.level : silent # helpful # one of silent, helpful, debug, debug-annoying
|
||||
#verbose.fileo : sys.stderr # a log filename, sys.stdout or sys.stderr
|
||||
|
||||
# Event keys to interact with figures/plots via keyboard.
|
||||
# Customize these settings according to your needs.
|
||||
# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '')
|
||||
|
||||
#keymap.fullscreen : f, ctrl+f # toggling
|
||||
#keymap.home : h, r, home # home or reset mnemonic
|
||||
#keymap.back : left, c, backspace # forward / backward keys to enable
|
||||
#keymap.forward : right, v # left handed quick navigation
|
||||
#keymap.pan : p # pan mnemonic
|
||||
#keymap.zoom : o # zoom mnemonic
|
||||
#keymap.save : s # saving current figure
|
||||
#keymap.quit : ctrl+w, cmd+w # close the current figure
|
||||
#keymap.grid : g # switching on/off a grid in current axes
|
||||
#keymap.yscale : l # toggle scaling of y-axes ('log'/'linear')
|
||||
#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear')
|
||||
#keymap.all_axes : a # enable all axes
|
||||
|
||||
# Control location of examples data files
|
||||
#examples.directory : '' # directory to look in for custom installation
|
||||
|
||||
###ANIMATION settings
|
||||
#animation.html : 'none' # How to display the animation as HTML in
|
||||
# the IPython notebook. 'html5' uses
|
||||
# HTML5 video tag.
|
||||
#animation.writer : ffmpeg # MovieWriter 'backend' to use
|
||||
#animation.codec : h264 # Codec to use for writing movie
|
||||
#animation.bitrate: -1 # Controls size/quality tradeoff for movie.
|
||||
# -1 implies let utility auto-determine
|
||||
#animation.frame_format: 'png' # Controls frame format used by temp files
|
||||
#animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path
|
||||
# $PATH is searched
|
||||
#animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg
|
||||
#animation.avconv_path: 'avconv' # Path to avconv binary. Without full path
|
||||
# $PATH is searched
|
||||
#animation.avconv_args: '' # Additional arguments to pass to avconv
|
||||
#animation.mencoder_path: 'mencoder'
|
||||
# Path to mencoder binary. Without full path
|
||||
# $PATH is searched
|
||||
#animation.mencoder_args: '' # Additional arguments to pass to mencoder
|
||||
#animation.convert_path: 'convert' # Path to ImageMagick's convert binary.
|
||||
# On Windows use the full path since convert
|
||||
# is also the name of a system tool.
|
||||
#
|
||||
mpl_toolkits.legacy_colorbar: False
|
2
home/.config/mypy/config
Normal file
2
home/.config/mypy/config
Normal file
|
@ -0,0 +1,2 @@
|
|||
[mypy]
|
||||
ignore_missing_imports = True
|
576
home/.config/pylintrc
Normal file
576
home/.config/pylintrc
Normal file
|
@ -0,0 +1,576 @@
|
|||
[MASTER]
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code.
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
ignore-patterns=
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
|
||||
# number of processors available to use.
|
||||
jobs=0
|
||||
|
||||
# Control the amount of potential inferred values when inferring a single
|
||||
# object. This can help the performance when dealing with large functions or
|
||||
# complex, nested conditions.
|
||||
limit-inference-results=100
|
||||
|
||||
# List of plugins (as comma separated values of python modules names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# Specify a configuration file.
|
||||
#rcfile=
|
||||
|
||||
# When enabled, pylint would attempt to guess common misconfiguration and emit
|
||||
# user-friendly hints instead of false-positive error messages.
|
||||
suggestion-mode=yes
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Only show warnings with the listed confidence levels. Leave empty to show
|
||||
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
|
||||
confidence=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
#disable=print-statement,
|
||||
# parameter-unpacking,
|
||||
# unpacking-in-except,
|
||||
# old-raise-syntax,
|
||||
# backtick,
|
||||
# long-suffix,
|
||||
# old-ne-operator,
|
||||
# old-octal-literal,
|
||||
# import-star-module-level,
|
||||
# non-ascii-bytes-literal,
|
||||
# raw-checker-failed,
|
||||
# bad-inline-option,
|
||||
# locally-disabled,
|
||||
# file-ignored,
|
||||
# suppressed-message,
|
||||
# useless-suppression,
|
||||
# deprecated-pragma,
|
||||
# use-symbolic-message-instead,
|
||||
# apply-builtin,
|
||||
# basestring-builtin,
|
||||
# buffer-builtin,
|
||||
# cmp-builtin,
|
||||
# coerce-builtin,
|
||||
# execfile-builtin,
|
||||
# file-builtin,
|
||||
# long-builtin,
|
||||
# raw_input-builtin,
|
||||
# reduce-builtin,
|
||||
# standarderror-builtin,
|
||||
# unicode-builtin,
|
||||
# xrange-builtin,
|
||||
# coerce-method,
|
||||
# delslice-method,
|
||||
# getslice-method,
|
||||
# setslice-method,
|
||||
# no-absolute-import,
|
||||
# old-division,
|
||||
# dict-iter-method,
|
||||
# dict-view-method,
|
||||
# next-method-called,
|
||||
# metaclass-assignment,
|
||||
# indexing-exception,
|
||||
# raising-string,
|
||||
# reload-builtin,
|
||||
# oct-method,
|
||||
# hex-method,
|
||||
# nonzero-method,
|
||||
# cmp-method,
|
||||
# input-builtin,
|
||||
# round-builtin,
|
||||
# intern-builtin,
|
||||
# unichr-builtin,
|
||||
# map-builtin-not-iterating,
|
||||
# zip-builtin-not-iterating,
|
||||
# range-builtin-not-iterating,
|
||||
# filter-builtin-not-iterating,
|
||||
# using-cmp-argument,
|
||||
# eq-without-hash,
|
||||
# div-method,
|
||||
# idiv-method,
|
||||
# rdiv-method,
|
||||
# exception-message-attribute,
|
||||
# invalid-str-codec,
|
||||
# sys-max-int,
|
||||
# bad-python3-import,
|
||||
# deprecated-string-function,
|
||||
# deprecated-str-translate-call,
|
||||
# deprecated-itertools-function,
|
||||
# deprecated-types-field,
|
||||
# next-method-defined,
|
||||
# dict-items-not-iterating,
|
||||
# dict-keys-not-iterating,
|
||||
# dict-values-not-iterating,
|
||||
# deprecated-operator-function,
|
||||
# deprecated-urllib-function,
|
||||
# xreadlines-attribute,
|
||||
# deprecated-sys-function,
|
||||
# exception-escape,
|
||||
# comprehension-escape
|
||||
|
||||
disable=bad-continuation,unused-variable,line-too-long
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once). See also the "--disable" option for examples.
|
||||
#enable=c-extension-no-member
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a note less than 10 (10 is the highest
|
||||
# note). You have access to the variables errors warning, statement which
|
||||
# respectively contain the number of errors / warnings messages and the total
|
||||
# number of statements analyzed. This is used by the global evaluation report
|
||||
# (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
# Template used to display messages. This is a python new-style format string
|
||||
# used to format the message information. See doc for all details.
|
||||
#msg-template=
|
||||
|
||||
# Set the output format. Available formats are text, parseable, colorized, json
|
||||
# and msvs (visual studio). You can also give a reporter class, e.g.
|
||||
# mypackage.mymodule.MyReporterClass.
|
||||
output-format=text
|
||||
|
||||
# Tells whether to display a full report or only the messages.
|
||||
reports=no
|
||||
|
||||
# Activate the evaluation score.
|
||||
score=yes
|
||||
|
||||
|
||||
[REFACTORING]
|
||||
|
||||
# Maximum number of nested blocks for function / method body
|
||||
max-nested-blocks=5
|
||||
|
||||
# Complete name of functions that never returns. When checking for
|
||||
# inconsistent-return-statements if a never returning function is called then
|
||||
# it will be considered as an explicit return statement and no message will be
|
||||
# printed.
|
||||
never-returning-functions=sys.exit
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
|
||||
expected-line-ending-format=
|
||||
|
||||
# Regexp for a line that is allowed to be longer than the limit.
|
||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
|
||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
||||
# tab).
|
||||
indent-string=' '
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=88
|
||||
|
||||
# Maximum number of lines in a module.
|
||||
max-module-lines=1000
|
||||
|
||||
# List of optional constructs for which whitespace checking is disabled. `dict-
|
||||
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
|
||||
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
|
||||
# `empty-line` allows space-only lines.
|
||||
no-space-check=trailing-comma,
|
||||
dict-separator
|
||||
|
||||
# Allow the body of a class to be on the same line as the declaration if body
|
||||
# contains single statement.
|
||||
single-line-class-stmt=no
|
||||
|
||||
# Allow the body of an if to be on the same line as the test if there is no
|
||||
# else.
|
||||
single-line-if-stmt=no
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid defining new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
# Tells whether unused global variables should be treated as a violation.
|
||||
allow-global-unused-variables=yes
|
||||
|
||||
# List of strings which can identify a callback function by name. A callback
|
||||
# name must start or end with one of those strings.
|
||||
callbacks=cb_,
|
||||
_cb
|
||||
|
||||
# A regular expression matching the name of dummy variables (i.e. expected to
|
||||
# not be used).
|
||||
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore.
|
||||
ignored-argument-names=_.*|^ignored_|^unused_
|
||||
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# List of qualified module names which can have objects that can redefine
|
||||
# builtins.
|
||||
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
|
||||
|
||||
|
||||
[LOGGING]
|
||||
|
||||
# Format style used to check logging format string. `old` means using %
|
||||
# formatting, while `new` is for `{}` formatting.
|
||||
logging-format-style=old
|
||||
|
||||
# Logging modules to check that the string format arguments are in logging
|
||||
# function parameter format.
|
||||
logging-modules=logging
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
# List of decorators that produce context managers, such as
|
||||
# contextlib.contextmanager. Add to this list to register other decorators that
|
||||
# produce valid context managers.
|
||||
contextmanager-decorators=contextlib.contextmanager
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E1101 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=
|
||||
|
||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
||||
ignore-mixin-members=yes
|
||||
|
||||
# Tells whether to warn about missing members when the owner of the attribute
|
||||
# is inferred to be None.
|
||||
ignore-none=yes
|
||||
|
||||
# This flag controls whether pylint should warn about no-member and similar
|
||||
# checks whenever an opaque object is returned when inferring. The inference
|
||||
# can return multiple potential results while evaluating a Python object, but
|
||||
# some branches might not be evaluated, which results in partial inference. In
|
||||
# that case, it might be useful to still emit no-member and other checks for
|
||||
# the rest of the inferred objects.
|
||||
ignore-on-opaque-inference=yes
|
||||
|
||||
# List of class names for which member attributes should not be checked (useful
|
||||
# for classes with dynamically set attributes). This supports the use of
|
||||
# qualified names.
|
||||
ignored-classes=optparse.Values,thread._local,_thread._local
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis. It
|
||||
# supports qualified module names, as well as Unix pattern matching.
|
||||
ignored-modules=
|
||||
|
||||
# Show a hint with possible names when a member name was not found. The aspect
|
||||
# of finding the hint is based on edit distance.
|
||||
missing-member-hint=yes
|
||||
|
||||
# The minimum edit distance a name should have in order to be considered a
|
||||
# similar match for a missing member name.
|
||||
missing-member-hint-distance=1
|
||||
|
||||
# The total number of similar names that should be taken in consideration when
|
||||
# showing a hint for a missing member.
|
||||
missing-member-max-choices=1
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,
|
||||
XXX,
|
||||
TODO
|
||||
|
||||
|
||||
[BASIC]
|
||||
|
||||
# Naming style matching correct argument names.
|
||||
argument-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct argument names. Overrides argument-
|
||||
# naming-style.
|
||||
#argument-rgx=
|
||||
|
||||
# Naming style matching correct attribute names.
|
||||
attr-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||
# style.
|
||||
#attr-rgx=
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma.
|
||||
bad-names=foo,
|
||||
bar,
|
||||
baz,
|
||||
toto,
|
||||
tutu,
|
||||
tata
|
||||
|
||||
# Naming style matching correct class attribute names.
|
||||
class-attribute-naming-style=any
|
||||
|
||||
# Regular expression matching correct class attribute names. Overrides class-
|
||||
# attribute-naming-style.
|
||||
#class-attribute-rgx=
|
||||
|
||||
# Naming style matching correct class names.
|
||||
class-naming-style=PascalCase
|
||||
|
||||
# Regular expression matching correct class names. Overrides class-naming-
|
||||
# style.
|
||||
#class-rgx=
|
||||
|
||||
# Naming style matching correct constant names.
|
||||
const-naming-style=UPPER_CASE
|
||||
|
||||
# Regular expression matching correct constant names. Overrides const-naming-
|
||||
# style.
|
||||
#const-rgx=
|
||||
|
||||
# Minimum line length for functions/classes that require docstrings, shorter
|
||||
# ones are exempt.
|
||||
docstring-min-length=-1
|
||||
|
||||
# Naming style matching correct function names.
|
||||
function-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct function names. Overrides function-
|
||||
# naming-style.
|
||||
#function-rgx=
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma.
|
||||
good-names=i,
|
||||
j,
|
||||
k,
|
||||
ex,
|
||||
ax,
|
||||
f,
|
||||
Run,
|
||||
_,
|
||||
x,
|
||||
y
|
||||
|
||||
# Include a hint for the correct naming format with invalid-name.
|
||||
include-naming-hint=yes
|
||||
|
||||
# Naming style matching correct inline iteration names.
|
||||
inlinevar-naming-style=any
|
||||
|
||||
# Regular expression matching correct inline iteration names. Overrides
|
||||
# inlinevar-naming-style.
|
||||
#inlinevar-rgx=
|
||||
|
||||
# Naming style matching correct method names.
|
||||
method-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct method names. Overrides method-naming-
|
||||
# style.
|
||||
#method-rgx=
|
||||
|
||||
# Naming style matching correct module names.
|
||||
module-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct module names. Overrides module-naming-
|
||||
# style.
|
||||
#module-rgx=
|
||||
|
||||
# Colon-delimited sets of names that determine each other's naming style when
|
||||
# the name regexes allow several styles.
|
||||
name-group=
|
||||
|
||||
# Regular expression which should only match function or class names that do
|
||||
# not require a docstring.
|
||||
no-docstring-rgx=^_
|
||||
|
||||
# List of decorators that produce properties, such as abc.abstractproperty. Add
|
||||
# to this list to register other decorators that produce valid properties.
|
||||
# These decorators are taken in consideration only for invalid-name.
|
||||
property-classes=abc.abstractproperty
|
||||
|
||||
# Naming style matching correct variable names.
|
||||
variable-naming-style=snake_case
|
||||
|
||||
# Regular expression matching correct variable names. Overrides variable-
|
||||
# naming-style.
|
||||
#variable-rgx=
|
||||
|
||||
|
||||
[SPELLING]
|
||||
|
||||
# Limits count of emitted suggestions for spelling mistakes.
|
||||
max-spelling-suggestions=4
|
||||
|
||||
# Spelling dictionary name. Available dictionaries: none. To make it working
|
||||
# install python-enchant package..
|
||||
spelling-dict=
|
||||
|
||||
# List of comma separated words that should not be checked.
|
||||
spelling-ignore-words=
|
||||
|
||||
# A path to a file that contains private dictionary; one word per line.
|
||||
spelling-private-dict-file=
|
||||
|
||||
# Tells whether to store unknown words to indicated private dictionary in
|
||||
# --spelling-private-dict-file option instead of raising a message.
|
||||
spelling-store-unknown-words=no
|
||||
|
||||
|
||||
[STRING]
|
||||
|
||||
# This flag controls whether the implicit-str-concat-in-sequence should
|
||||
# generate a warning on implicit string concatenation in sequences defined over
|
||||
# several lines.
|
||||
check-str-concat-over-line-jumps=no
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Ignore comments when computing similarities.
|
||||
ignore-comments=yes
|
||||
|
||||
# Ignore docstrings when computing similarities.
|
||||
ignore-docstrings=yes
|
||||
|
||||
# Ignore imports when computing similarities.
|
||||
ignore-imports=no
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
|
||||
# Allow wildcard imports from modules that define __all__.
|
||||
allow-wildcard-with-all=no
|
||||
|
||||
# Analyse import fallback blocks. This can be used to support both Python 2 and
|
||||
# 3 compatible code, which means that the block might have code that exists
|
||||
# only in one or another interpreter, leading to false positives when analysed.
|
||||
analyse-fallback-blocks=no
|
||||
|
||||
# Deprecated modules which should not be used, separated by a comma.
|
||||
deprecated-modules=optparse,tkinter.tix
|
||||
|
||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
||||
# not be disabled).
|
||||
ext-import-graph=
|
||||
|
||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
||||
# given file (report RP0402 must not be disabled).
|
||||
import-graph=
|
||||
|
||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
||||
# not be disabled).
|
||||
int-import-graph=
|
||||
|
||||
# Force import order to recognize a module as part of the standard
|
||||
# compatibility libraries.
|
||||
known-standard-library=
|
||||
|
||||
# Force import order to recognize a module as part of a third party library.
|
||||
known-third-party=enchant
|
||||
|
||||
|
||||
[CLASSES]
|
||||
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,
|
||||
__new__,
|
||||
setUp
|
||||
|
||||
# List of member names, which should be excluded from the protected access
|
||||
# warning.
|
||||
exclude-protected=_asdict,
|
||||
_fields,
|
||||
_replace,
|
||||
_source,
|
||||
_make
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
# List of valid names for the first argument in a metaclass class method.
|
||||
valid-metaclass-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[DESIGN]
|
||||
|
||||
# Maximum number of arguments for function / method.
|
||||
max-args=5
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Maximum number of boolean expressions in an if statement.
|
||||
max-bool-expr=5
|
||||
|
||||
# Maximum number of branch for function / method body.
|
||||
max-branches=12
|
||||
|
||||
# Maximum number of locals for function / method body.
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
# Maximum number of return / yield for function / method body.
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of statements in function / method body.
|
||||
max-statements=50
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "BaseException, Exception".
|
||||
overgeneral-exceptions=BaseException,
|
||||
Exception
|
36
home/.config/yamllint/config
Normal file
36
home/.config/yamllint/config
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
braces: enable
|
||||
brackets: enable
|
||||
colons: enable
|
||||
commas: enable
|
||||
comments:
|
||||
require-starting-space: true
|
||||
ignore-shebangs: true
|
||||
min-spaces-from-content: 1
|
||||
comments-indentation: {}
|
||||
document-end: disable
|
||||
document-start:
|
||||
present: true
|
||||
empty-lines: enable
|
||||
empty-values: enable
|
||||
hyphens: enable
|
||||
indentation: enable
|
||||
key-duplicates: enable
|
||||
key-ordering: {}
|
||||
line-length: enable
|
||||
new-line-at-end-of-file: enable
|
||||
new-lines: enable
|
||||
octal-values: enable
|
||||
quoted-strings:
|
||||
quote-type: double
|
||||
trailing-spaces: enable
|
||||
truthy:
|
||||
allowed-values:
|
||||
- 'true'
|
||||
- 'false'
|
||||
- 'on'
|
||||
- 'off'
|
1
home/.fonts
Symbolic link
1
home/.fonts
Symbolic link
|
@ -0,0 +1 @@
|
|||
../private/home/.fonts
|
21
home/.gitconfig
Normal file
21
home/.gitconfig
Normal file
|
@ -0,0 +1,21 @@
|
|||
[core]
|
||||
editor = vim
|
||||
preloadindex = true
|
||||
fscache = true
|
||||
[push]
|
||||
default = simple
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[pull]
|
||||
rebase = false
|
||||
[diff]
|
||||
tool = vimdiff
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
[difftool]
|
||||
prompt = false
|
||||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
3393
home/.local/bin/code2color
Executable file
3393
home/.local/bin/code2color
Executable file
File diff suppressed because it is too large
Load diff
840
home/.local/bin/lesspipe.sh
Executable file
840
home/.local/bin/lesspipe.sh
Executable file
|
@ -0,0 +1,840 @@
|
|||
#!/bin/bash
|
||||
# lesspipe.sh, a preprocessor for less (version 1.83)
|
||||
#===============================================================================
|
||||
### THIS FILE IS GENERATED FROM lesspipe.sh.in, PLEASE GET THE ZIP FILE
|
||||
### from https://github.com/wofr06/lesspipe.sh/archive/lesspipe.zip
|
||||
### AND RUN configure TO GENERATE A lesspipe.sh THAT WORKS IN YOUR ENVIRONMENT
|
||||
#===============================================================================
|
||||
#
|
||||
# Usage: lesspipe.sh is called when the environment variable LESSOPEN is set:
|
||||
# LESSOPEN="|lesspipe.sh %s"; export LESSOPEN (sh like shells)
|
||||
# setenv LESSOPEN "|lesspipe.sh %s" (csh, tcsh)
|
||||
# Use the fully qualified path if lesspipe.sh is not in the search path
|
||||
# View files in multifile archives:
|
||||
# less archive_file:contained_file
|
||||
# This can be used to extract ASCII files from a multifile archive:
|
||||
# less archive_file:contained_file>extracted_file
|
||||
# As less is not good for extracting raw data use instead:
|
||||
# lesspipe.sh archive_file:contained_file>extracted_file
|
||||
# Even a file in a multifile archive that itself is contained in yet
|
||||
# another archive can be viewed this way:
|
||||
# less super_archive:archive_file:contained_file
|
||||
# Display the last file in the file1:..:fileN chain in raw format:
|
||||
# Suppress input filtering: less file1:..:fileN: (append a colon)
|
||||
# Suppress decompression: less file1:..:fileN:: (append 2 colons)
|
||||
#
|
||||
# Required programs and supported formats: see the separate file README
|
||||
# License: GPL (see file LICENSE)
|
||||
# History: see the separate file ChangeLog
|
||||
# Author: Wolfgang Friebel, DESY (Wolfgang.Friebel AT desy.de)
|
||||
#
|
||||
#===============================================================================
|
||||
( [[ -n 1 && -n 2 ]] ) > /dev/null 2>&1 || exec zsh -y --ksh-arrays -- "$0" ${1+"$@"}
|
||||
#setopt KSH_ARRAYS SH_WORD_SPLIT 2>/dev/null
|
||||
set +o noclobber
|
||||
tarcmd='tar'
|
||||
|
||||
dir=${LESSOPEN#\|}
|
||||
dir=${dir%%lesspipe.sh*\%s}
|
||||
dir=${dir%%/}
|
||||
PATH=$PATH:$dir
|
||||
|
||||
cmd_exist () {
|
||||
command -v "$1" > /dev/null 2>&1 && return 0 || return 1
|
||||
}
|
||||
|
||||
filecmd() {
|
||||
file -L -s "$@"
|
||||
file -L -s -i "$@" 2> /dev/null | sed -n 's/.*charset=/;/p' | tr a-z A-Z
|
||||
}
|
||||
|
||||
sep=: # file name separator
|
||||
altsep== # alternate separator character
|
||||
if [[ -e "$1" && "$1" = *$sep* || "$1" = *$altsep ]]; then
|
||||
sep=$altsep
|
||||
xxx="${1%=}"
|
||||
set "$xxx"
|
||||
fi
|
||||
if cmd_exist mktemp; then
|
||||
tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/lesspipe.XXXXXXXXXX")
|
||||
|
||||
nexttmp () {
|
||||
# nexttmp -d returns a directory
|
||||
mktemp $1 "${tmpdir}/XXXXXXXX"
|
||||
}
|
||||
else
|
||||
tmpdir=${TMPDIR:-/tmp}/lesspipe.$RANDOM
|
||||
mkdir $tmpdir
|
||||
|
||||
nexttmp () {
|
||||
new="$tmpdir/lesspipe.$RANDOM"
|
||||
[[ "$1" = -d ]] && mkdir $new
|
||||
echo $new
|
||||
}
|
||||
fi
|
||||
[[ -d "$tmpdir" ]] || exit 1
|
||||
trap "rm -rf '$tmpdir'" 0
|
||||
trap - PIPE
|
||||
|
||||
unset iconv
|
||||
iconv() {
|
||||
if [[ -z "$iconv" ]]; then
|
||||
arg=$(printf "%s$(command iconv --help 2>/dev/null | \
|
||||
sed -n 's/.*\(--.*-subst=\)\(FORMATSTRING\).*/\1\\033[7m?\\033[m/p' | \
|
||||
tr \\n ' ')")
|
||||
if [[ -n "$arg" ]]; then
|
||||
iconv="command iconv -c $arg -t //TRANSLIT"
|
||||
else
|
||||
iconv="command iconv -c"
|
||||
fi
|
||||
fi
|
||||
if $iconv "$@" > /dev/null 2>&1; then
|
||||
msg "append $sep to filename to view the $2 encoded data"
|
||||
$iconv "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
msg () {
|
||||
if [[ -n "$LESSQUIET" ]]; then
|
||||
return
|
||||
fi
|
||||
echo "==> $@"
|
||||
}
|
||||
|
||||
filetype () {
|
||||
# wrapper for 'file' command
|
||||
typeset name
|
||||
name="$1"
|
||||
if [[ "$1" = - ]]; then
|
||||
dd bs=40000 count=1 > "$tmpdir/file" 2>/dev/null
|
||||
set "$tmpdir/file" "$2"
|
||||
name="$filen"
|
||||
fi
|
||||
if [[ ("$name" = *.br || "$name" = *.bro || "$name" = *.tbr) ]]; then
|
||||
# In current format, brotli can only be detected by extension
|
||||
echo " brotli compressed data"
|
||||
return
|
||||
fi
|
||||
typeset type
|
||||
# type=" $(filecmd -b "$1")" # not supported by all versions of 'file'
|
||||
type=$(filecmd "$1" | cut -d : -f 2-)
|
||||
if [[ "$type" = " empty" ]]; then
|
||||
# exit if file returns "empty" (e.g., with "less archive:nonexisting_file")
|
||||
exit 1
|
||||
elif [[ "$type" = *XML* && "$name" = *html ]]; then
|
||||
type=" HTML document text"
|
||||
elif [[ ("$type" = *HTML* || "$type" = *ASCII*) && "$name" = *xml ]]; then
|
||||
type=" XML document text"
|
||||
elif [[ "$type" != *lzip\ compressed* && ("$name" = *.lzma || "$name" = *.tlz) ]]; then
|
||||
type=" LZMA compressed data"
|
||||
elif [[ ("$type" = *Zip* || "$type" = *ZIP*) && ("$name" = *.jar || "$name" = *.xpi) ]]; then
|
||||
type=" Zip compressed Jar archive"
|
||||
elif [[ "$type" = *Microsoft\ Office\ Document* && ("$name" = *.ppt) ]]; then
|
||||
type=" PowerPoint document"
|
||||
elif [[ "$type" = *Microsoft\ Office\ Document* && ("$name" = *.xls) ]]; then
|
||||
type=" Excel document"
|
||||
elif [[ "$type" = *Hierarchical\ Data\ Format* && ("$name" = *.nc4) ]]; then
|
||||
type=" NetCDF Data Format data"
|
||||
elif [[ "$type" = *roff\ *,* && ("$name" = */[Mm]akefile || "$name" = */[Mm]akefile.* || "$name" = */BSDmakefile || "$name" = *.mk) ]]; then
|
||||
# Sometimes a BSD makefile is identified as "troff or
|
||||
# preprocessor input text" probably due to its ".if" style
|
||||
# directives.
|
||||
type=" BSD makefile script,${type#*,}}"
|
||||
fi
|
||||
echo "$type"
|
||||
}
|
||||
|
||||
show () {
|
||||
file1="${1%%$sep*}"
|
||||
rest1="${1#$file1}"
|
||||
while [[ "$rest1" = ::* ]]; do
|
||||
if [[ "$rest1" = "::" ]]; then
|
||||
break
|
||||
else
|
||||
rest1="${rest1#$sep$sep}"
|
||||
file1="${rest1%%$sep*}"
|
||||
rest1="${rest1#$file1}"
|
||||
file1="${1%$rest1}"
|
||||
fi
|
||||
done
|
||||
if [[ ! -e $file1 && "$file1" != '-' ]]; then
|
||||
return
|
||||
fi
|
||||
rest11="${rest1#$sep}"
|
||||
file2="${rest11%%$sep*}"
|
||||
rest2="${rest11#$file2}"
|
||||
while [[ "$rest2" = ::* ]]; do
|
||||
if [[ "$rest2" = "::" ]]; then
|
||||
break
|
||||
else
|
||||
rest2="${rest2#$sep$sep}"
|
||||
file2="${rest2%%$sep*}"
|
||||
rest2="${rest2#$file2}"
|
||||
file2="${rest11%$rest2}"
|
||||
fi
|
||||
done
|
||||
if [[ "$file2" != "" ]]; then
|
||||
in_file="-i$file2"
|
||||
fi
|
||||
rest2="${rest11#$file2}"
|
||||
rest11="$rest1"
|
||||
|
||||
if cmd_exist html2text || cmd_exist elinks || cmd_exist links || cmd_exist lynx || cmd_exist w3m; then
|
||||
PARSEHTML=yes
|
||||
else
|
||||
PARSEHTML=no
|
||||
fi
|
||||
|
||||
if [[ "$cmd" = "" ]]; then
|
||||
type=$(filetype "$file1") || exit 1
|
||||
if cmd_exist lsbom; then
|
||||
if [[ ! -f "$file1" ]]; then
|
||||
if [[ "$type" = *directory* ]]; then
|
||||
if [[ "$file1" = *.pkg ]]; then
|
||||
if [[ -f "$file1/Contents/Archive.bom" ]]; then
|
||||
type="bill of materials"
|
||||
file1="$file1/Contents/Archive.bom"
|
||||
msg "This is a Mac OS X archive directory, showing its contents (bom file)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
get_cmd "$type" "$file1" "$rest1"
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
show "-$rest1"
|
||||
else
|
||||
isfinal "$type" "$file1" "$rest11"
|
||||
fi
|
||||
elif [[ "$c1" = "" ]]; then
|
||||
c1=("${cmd[@]}")
|
||||
type=$("${c1[@]}" | filetype -) || exit 1
|
||||
get_cmd "$type" "$file1" "$rest1"
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
show "-$rest1"
|
||||
else
|
||||
"${c1[@]}" | isfinal "$type" - "$rest11"
|
||||
fi
|
||||
elif [[ "$c2" = "" ]]; then
|
||||
c2=("${cmd[@]}")
|
||||
type=$("${c1[@]}" | "${c2[@]}" | filetype -) || exit 1
|
||||
get_cmd "$type" "$file1" "$rest1"
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
show "-$rest1"
|
||||
else
|
||||
"${c1[@]}" | "${c2[@]}" | isfinal "$type" - "$rest11"
|
||||
fi
|
||||
elif [[ "$c3" = "" ]]; then
|
||||
c3=("${cmd[@]}")
|
||||
type=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | filetype -) || exit 1
|
||||
get_cmd "$type" "$file1" "$rest1"
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
show "-$rest1"
|
||||
else
|
||||
"${c1[@]}" | "${c2[@]}" | "${c3[@]}" | isfinal "$type" - "$rest11"
|
||||
fi
|
||||
elif [[ "$c4" = "" ]]; then
|
||||
c4=("${cmd[@]}")
|
||||
type=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | filetype -) || exit 1
|
||||
get_cmd "$type" "$file1" "$rest1"
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
show "-$rest1"
|
||||
else
|
||||
"${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | isfinal "$type" - "$rest11"
|
||||
fi
|
||||
elif [[ "$c5" = "" ]]; then
|
||||
c5=("${cmd[@]}")
|
||||
type=$("${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | filetype -) || exit 1
|
||||
get_cmd "$type" "$file1" "$rest1"
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
echo "$0: Too many levels of encapsulation"
|
||||
else
|
||||
"${c1[@]}" | "${c2[@]}" | "${c3[@]}" | "${c4[@]}" | "${c5[@]}" | isfinal "$type" - "$rest11"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
get_cmd () {
|
||||
cmd=
|
||||
typeset t
|
||||
if [[ "$1" = *[bg]zip*compress* || "$1" = *compress\'d\ * || "$1" = *packed\ data* || "$1" = *LZMA\ compressed* || "$1" = *lzip\ compressed* || "$1" = *[Xx][Zz]\ compressed* || "$1" = *Zstandard\ compressed* || "$1" = *[Bb]rotli\ compressed* || "$1" = *LZ4\ compressed* ]]; then ## added '#..then' to fix vim's syntax parsing
|
||||
if [[ "$3" = $sep$sep ]]; then
|
||||
return
|
||||
elif [[ "$1" = *bzip*compress* ]] && cmd_exist bzip2; then
|
||||
cmd=(bzip2 -cd "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.bz2) filen="${filen%.bz2}";;
|
||||
*.tbz) filen="${filen%.tbz}.tar";;
|
||||
esac
|
||||
return
|
||||
elif [[ "$1" = *lzip\ compressed* ]] && cmd_exist lzip; then
|
||||
cmd=(lzip -cd "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.lz) filen="${filen%.lz}";;
|
||||
*.tlz) filen="${filen%.tlz}.tar";;
|
||||
esac
|
||||
elif [[ "$1" = *LZMA\ compressed* ]] && cmd_exist lzma; then
|
||||
cmd=(lzma -cd "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.lzma) filen="${filen%.lzma}";;
|
||||
*.tlz) filen="${filen%.tlz}.tar";;
|
||||
esac
|
||||
elif [[ "$1" = *gzip\ compress* || "$1" = *compress\'d\ * || "$1" = *packed\ data* ]]; then ## added '#..then' to fix vim's syntax parsing
|
||||
cmd=(gzip -cd "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.gz) filen="${filen%.gz}";;
|
||||
*.tgz) filen="${filen%.tgz}.tar";;
|
||||
esac
|
||||
elif [[ "$1" = *[Xx][Zz]\ compressed* ]] && cmd_exist xz; then
|
||||
cmd=(xz -cd "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.xz) filen="${filen%.xz}";;
|
||||
*.txz) filen="${filen%.txz}.tar";;
|
||||
esac
|
||||
elif [[ "$1" = *Zstandard\ compressed* ]] && cmd_exist zstd; then
|
||||
cmd=(zstd -cdq "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.zst) filen="${filen%.zst}";;
|
||||
*.tzst) filen="${filen%.tzst}.tar";;
|
||||
esac
|
||||
elif [[ "$1" = *[Bb]rotli\ compressed* ]] && cmd_exist brotli; then
|
||||
cmd=(brotli -cd -- "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.br|*.bro) filen="${filen%.*}";;
|
||||
*.tbr) filen="${filen%.*}.tar";;
|
||||
esac
|
||||
elif [[ "$1" = *LZ4\ compressed* ]] && cmd_exist lz4; then
|
||||
cmd=(lz4 -cdq "$2")
|
||||
if [[ "$2" != - ]]; then filen="$2"; fi
|
||||
case "$filen" in
|
||||
*.lz4) filen="${filen%.*}";;
|
||||
*.tl4|*.tz4|*.tlz4) filen="${filen%.*}.tar";;
|
||||
esac
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
rsave="$rest1"
|
||||
rest1="$rest2"
|
||||
if [[ "$file2" != "" ]]; then
|
||||
if [[ "$1" = *\ tar* || "$1" = *\ tar* ]]; then
|
||||
cmd=(istar "$2" "$file2")
|
||||
elif [[ "$1" = *Debian* ]]; then
|
||||
data=`ar t "$2"|grep data.tar`
|
||||
cmd2=("unpack_cmd" "$data")
|
||||
t=$(nexttmp)
|
||||
if [[ "$file2" = control/* ]]; then
|
||||
istemp "ar p" "$2" control.tar.gz | gzip -dc - > "$t"
|
||||
file2=".${file2:7}"
|
||||
else
|
||||
istemp "ar p" "$2" $data | $("${cmd2[@]}") > "$t"
|
||||
fi
|
||||
cmd=(istar "$t" "$file2")
|
||||
elif [[ "$1" = *RPM* ]] && cmd_exist cpio && ( cmd_exist rpm2cpio || cmd_exist rpmunpack ); then
|
||||
cmd=(isrpm "$2" "$file2")
|
||||
elif [[ "$1" = *Jar\ archive* ]] && cmd_exist fastjar; then
|
||||
cmd=(isjar "$2" "$file2")
|
||||
elif [[ "$1" = *Zip* || "$1" = *ZIP* ]] && cmd_exist unzip; then
|
||||
cmd=(istemp "unzip -avp" "$2" "$file2")
|
||||
elif [[ "$1" = *RAR\ archive* ]]; then
|
||||
if cmd_exist unrar; then
|
||||
cmd=(istemp "unrar p -inul" "$2" "$file2")
|
||||
elif cmd_exist rar; then
|
||||
cmd=(istemp "rar p -inul" "$2" "$file2")
|
||||
elif cmd_exist bsdtar; then
|
||||
cmd=(istemp "bsdtar Oxf" "$2" "$file2")
|
||||
fi
|
||||
elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7za; then
|
||||
cmd=(istemp "7za e -so" "$2" "$file2")
|
||||
elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7zr; then
|
||||
cmd=(istemp "7zr e -so" "$2" "$file2")
|
||||
elif [[ "$1" = *[Cc]abinet* ]] && cmd_exist cabextract; then
|
||||
cmd=(iscab "$2" "$file2")
|
||||
elif [[ "$1" = *\ ar\ archive* ]]; then
|
||||
cmd=(istemp "ar p" "$2" "$file2")
|
||||
elif [[ "$1" = *ISO\ 9660* ]] && cmd_exist isoinfo; then
|
||||
cmd=(isoinfo "-i$2" "-x$file2")
|
||||
fi
|
||||
if [[ "$cmd" != "" ]]; then
|
||||
filen="$file2"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
iscab () {
|
||||
typeset t
|
||||
if [[ "$1" = - ]]; then
|
||||
t=$(nexttmp)
|
||||
cat > "$t"
|
||||
set "$t" "$2"
|
||||
fi
|
||||
cabextract -pF "$2" "$1"
|
||||
}
|
||||
|
||||
istar () {
|
||||
$tarcmd Oxf "$1" "$2" 2>/dev/null
|
||||
}
|
||||
|
||||
isdvi () {
|
||||
typeset t
|
||||
if [[ "$1" != *.dvi ]]; then
|
||||
t="$tmpdir/tmp.dvi"
|
||||
cat "$1" > "$t"
|
||||
set "$t"
|
||||
fi
|
||||
dvi2tty -q "$1"
|
||||
}
|
||||
|
||||
istemp () {
|
||||
typeset prog
|
||||
typeset t
|
||||
prog="$1"
|
||||
t="$2"
|
||||
shift
|
||||
shift
|
||||
if [[ "$t" = - ]]; then
|
||||
t=$(nexttmp)
|
||||
cat > "$t"
|
||||
fi
|
||||
if [[ $# -gt 0 ]]; then
|
||||
$prog "$t" "$@" 2>/dev/null
|
||||
else
|
||||
$prog "$t" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
nodash () {
|
||||
typeset prog
|
||||
prog="$1"
|
||||
shift
|
||||
if [[ "$1" = - ]]; then
|
||||
shift
|
||||
if [[ $# -gt 0 ]]; then
|
||||
$prog "$@" 2>/dev/null
|
||||
else
|
||||
$prog 2>/dev/null
|
||||
fi
|
||||
else
|
||||
$prog "$@" 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
isrpm () {
|
||||
if cmd_exist rpm2cpio && cmd_exist cpio; then
|
||||
typeset t
|
||||
if [[ "$1" = - ]]; then
|
||||
t=$(nexttmp)
|
||||
cat > "$t"
|
||||
set "$t" "$2"
|
||||
fi
|
||||
# setup $b as a batch file containing "$b.out"
|
||||
typeset b
|
||||
b=$(nexttmp)
|
||||
echo "$b.out" > "$b"
|
||||
# to support older versions of cpio the --to-stdout option is not used here
|
||||
rpm2cpio "$1" 2>/dev/null|cpio -i --quiet --rename-batch-file "$b" "$2"
|
||||
cat "$b.out"
|
||||
elif cmd_exist rpmunpack && cmd_exist cpio; then
|
||||
# rpmunpack will write to stdout if it gets file from stdin
|
||||
# extract file $2 from archive $1, assume that cpio is sufficiently new
|
||||
# (option --to-stdout existing) if rpmunpack is installed
|
||||
cat "$1" | rpmunpack | gzip -cd | cpio -i --quiet --to-stdout "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
isjar () {
|
||||
case "$2" in
|
||||
/*) echo "lesspipe can't unjar files with absolute paths" >&2
|
||||
exit 1
|
||||
;;
|
||||
../*) echo "lesspipe can't unjar files with ../ paths" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
typeset d
|
||||
d=$(nexttmp -d)
|
||||
[[ -d "$d" ]] || exit 1
|
||||
cat "$1" | (
|
||||
cd "$d"
|
||||
fastjar -x "$2"
|
||||
if [[ -f "$2" ]]; then
|
||||
cat "$2"
|
||||
fi
|
||||
)
|
||||
}
|
||||
|
||||
#parsexml () { nodash "elinks -dump -default-mime-type text/xml" "$1"; }
|
||||
parsehtml () {
|
||||
if [[ "$PARSEHTML" = no ]]; then
|
||||
msg "No suitable tool for HTML parsing found, install one of html2text, elinks, links, lynx or w3m"
|
||||
return
|
||||
elif cmd_exist html2text; then
|
||||
if [[ "$1" = - ]]; then html2text; else html2text "$1"; fi
|
||||
elif cmd_exist lynx; then
|
||||
if [[ "$1" = - ]]; then set - -stdin; fi
|
||||
lynx -dump -force_html "$1" && return
|
||||
elif cmd_exist w3m; then
|
||||
nodash "w3m -dump -T text/html" "$1"
|
||||
elif cmd_exist elinks; then
|
||||
nodash "elinks -dump -force-html" "$1"
|
||||
elif cmd_exist links; then
|
||||
if [[ "$1" = - ]]; then set - -stdin; fi
|
||||
links -dump -force_html "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
unpack_cmd() {
|
||||
cmd_string="cat"
|
||||
if [[ "$1" == *xz ]]; then
|
||||
cmd_string="xz -dc -"
|
||||
elif [[ "$1" == *gz ]]; then
|
||||
cmd_string="gzip -dc -"
|
||||
elif [[ "$1" == *bz2 ]]; then
|
||||
cmd_string="bzip2 -dc -"
|
||||
elif [[ "$1" == *lzma ]]; then
|
||||
cmd_string="lzma -dc -"
|
||||
elif [[ "$1" == *zst ]]; then
|
||||
cmd_string="zstd -dcq -"
|
||||
elif [[ ("$1" == *br || "$1" == *bro) ]]; then
|
||||
cmd_string="brotli -dc -"
|
||||
elif [[ "$1" == *lz4 ]]; then
|
||||
cmd_string="lz4 -dcq -"
|
||||
fi
|
||||
echo "$cmd_string"
|
||||
}
|
||||
|
||||
isfinal() {
|
||||
typeset t
|
||||
if [[ "$3" = $sep$sep ]]; then
|
||||
cat "$2"
|
||||
return
|
||||
elif [[ "$3" = $sep* ]]; then
|
||||
if [[ "$3" = $sep ]]; then
|
||||
msg "append :. or :<filetype> to activate syntax highlighting"
|
||||
else
|
||||
lang=${3#$sep}
|
||||
lang="-l ${lang#.}"
|
||||
lang=${lang%%-l }
|
||||
if cmd_exist code2color; then
|
||||
code2color $PPID ${in_file:+"$in_file"} $lang "$2"
|
||||
if [[ $? = 0 ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
cat "$2"
|
||||
return
|
||||
fi
|
||||
|
||||
# color requires -r or -R when calling less
|
||||
typeset COLOR
|
||||
if [[ $(tput colors) -ge 8 && ("$LESS" = *-*r* || "$LESS" = *-*R*) ]]; then
|
||||
COLOR="--color=always"
|
||||
fi
|
||||
|
||||
if [[ "$1" = *No\ such* ]]; then
|
||||
exit 1
|
||||
elif [[ "$1" = *directory* ]]; then
|
||||
cmd=(ls -lA $COLOR "$2")
|
||||
if ! ls $COLOR > /dev/null 2>&1; then
|
||||
cmd=(ls -lA -G "$2")
|
||||
if ! ls -lA -G > /dev/null 2>&1; then
|
||||
cmd=(ls -lA "$2")
|
||||
fi
|
||||
fi
|
||||
msg "This is a directory, showing the output of ${cmd[@]}"
|
||||
if [[ ${cmd[2]} = '-G' ]]; then
|
||||
CLICOLOR_FORCE=1 "${cmd[@]}"
|
||||
else
|
||||
"${cmd[@]}"
|
||||
fi
|
||||
elif [[ "$1" = *\ tar* || "$1" = *\ tar* ]]; then
|
||||
msg "use tar_file${sep}contained_file to view a file in the archive"
|
||||
if [[ -n $COLOR ]] && cmd_exist tarcolor; then
|
||||
$tarcmd tvf "$2" | tarcolor
|
||||
else
|
||||
$tarcmd tvf "$2"
|
||||
fi
|
||||
elif [[ "$1" = *RPM* ]]; then
|
||||
header="use RPM_file${sep}contained_file to view a file in the RPM"
|
||||
if cmd_exist rpm; then
|
||||
echo $header
|
||||
istemp "rpm -qivp" "$2"
|
||||
header="";
|
||||
fi
|
||||
if cmd_exist cpio && cmd_exist rpm2cpio; then
|
||||
echo $header
|
||||
echo "================================= Content ======================================"
|
||||
istemp rpm2cpio "$2" 2>/dev/null|cpio -i -tv 2>/dev/null
|
||||
elif cmd_exist cpio && cmd_exist rpmunpack; then
|
||||
echo $header
|
||||
echo "================================= Content ======================================"
|
||||
cat "$2" | rpmunpack | gzip -cd | cpio -i -tv 2>/dev/null
|
||||
else
|
||||
msg "please install rpm2cpio or rpmunpack to see the contents of RPM files"
|
||||
fi
|
||||
elif [[ "$1" = *roff* ]] && cmd_exist groff; then
|
||||
DEV=utf8
|
||||
if [[ $LANG != *UTF*8* && $LANG != *utf*8* ]]; then
|
||||
if [[ "$LANG" = ja* ]]; then
|
||||
DEV=nippon
|
||||
else
|
||||
DEV=latin1
|
||||
fi
|
||||
fi
|
||||
MACRO=andoc
|
||||
if [[ "$2" = *.me ]]; then
|
||||
MACRO=e
|
||||
elif [[ "$2" = *.ms ]]; then
|
||||
MACRO=s
|
||||
fi
|
||||
msg "append $sep to filename to view the nroff source"
|
||||
groff -s -p -t -e -T$DEV -m$MACRO "$2"
|
||||
elif [[ "$1" = *Debian* ]]; then
|
||||
msg "use Deb_file${sep}contained_file to view a file in the Deb"
|
||||
if cmd_exist dpkg; then
|
||||
nodash "dpkg -I" "$2"
|
||||
else
|
||||
echo
|
||||
istemp "ar p" "$2" control.tar.gz | gzip -dc - | $tarcmd tvf - | sed -r 's/(.{48})\./\1control/'
|
||||
fi
|
||||
data=`ar t "$2"|grep data.tar`
|
||||
cmd2=("unpack_cmd" "$data")
|
||||
echo
|
||||
istemp "ar p" "$2" $data | $("${cmd2[@]}") | $tarcmd tvf -
|
||||
# do not display all perl text containing pod using perldoc
|
||||
#elif [[ "$1" = *Perl\ POD\ document\ text* || "$1" = *Perl5\ module\ source\ text* ]]; then
|
||||
elif [[ "$1" = *Perl\ POD\ document\ text* ]] && cmd_exist perldoc; then
|
||||
msg "append $sep to filename to view the perl source"
|
||||
istemp perldoc "$2"
|
||||
elif [[ "$1" = *\ script* ]]; then
|
||||
set "plain text" "$2"
|
||||
elif [[ "$1" = *text\ executable* ]]; then
|
||||
set "plain text" "$2"
|
||||
elif [[ "$1" = *PostScript* ]]; then
|
||||
if cmd_exist pstotext; then
|
||||
msg "append $sep to filename to view the postscript file"
|
||||
nodash pstotext "$2"
|
||||
elif cmd_exist ps2ascii; then
|
||||
msg "append $sep to filename to view the postscript file"
|
||||
istemp ps2ascii "$2"
|
||||
else
|
||||
msg "install pstotext or ps2ascii to view a textual representation of the file contents"
|
||||
fi
|
||||
elif [[ "$1" = *executable* ]]; then
|
||||
msg "append $sep to filename to view the raw file"
|
||||
nodash strings "$2"
|
||||
elif [[ "$1" = *\ ar\ archive* ]]; then
|
||||
msg "use library${sep}contained_file to view a file in the archive"
|
||||
istemp "ar vt" "$2"
|
||||
elif [[ "$1" = *shared* ]] && cmd_exist nm; then
|
||||
msg "This is a dynamic library, showing the output of nm"
|
||||
istemp nm "$2"
|
||||
elif [[ "$1" = *Jar\ archive* ]] && cmd_exist fastjar; then
|
||||
msg "use jar_file${sep}contained_file to view a file in the archive"
|
||||
nodash "fastjar -tf" "$2"
|
||||
elif [[ "$1" = *Zip* || "$1" = *ZIP* ]] && cmd_exist unzip; then
|
||||
msg "use zip_file${sep}contained_file to view a file in the archive"
|
||||
istemp "unzip -lv" "$2"
|
||||
elif [[ "$1" = *RAR\ archive* ]]; then
|
||||
if cmd_exist unrar; then
|
||||
msg "use rar_file${sep}contained_file to view a file in the archive"
|
||||
istemp "unrar v" "$2"
|
||||
elif cmd_exist rar; then
|
||||
msg "use rar_file${sep}contained_file to view a file in the archive"
|
||||
istemp "rar v" "$2"
|
||||
elif cmd_exist bsdtar; then
|
||||
msg "use rar_file${sep}contained_file to view a file in the archive"
|
||||
istemp "bsdtar tvf" "$2"
|
||||
fi
|
||||
elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7za; then
|
||||
typeset res
|
||||
res=$(istemp "7za l" "$2")
|
||||
if [[ "$res" = *\ 1\ file* ]]; then
|
||||
msg "a 7za archive containing one file was silently unpacked"
|
||||
if [[ "$2" != - ]]; then
|
||||
7za e -so "$2" 2>/dev/null
|
||||
else
|
||||
# extract name of temporary file containing the 7za archive
|
||||
t=${res#*Listing\ archive:\ }
|
||||
t2="
|
||||
"
|
||||
t=${t%%$t2*}
|
||||
7za e -so $t 2>/dev/null
|
||||
fi
|
||||
else
|
||||
msg "use 7za_file${sep}contained_file to view a file in the archive"
|
||||
echo "$res"
|
||||
fi
|
||||
elif [[ "$1" = *7-zip\ archive* || "$1" = *7z\ archive* ]] && cmd_exist 7zr; then
|
||||
typeset res
|
||||
res=$(istemp "7zr l" "$2")
|
||||
if [[ "$res" = *\ 1\ file* ]]; then
|
||||
msg "a 7za archive containing one file was silently unpacked"
|
||||
if [[ "$2" != - ]]; then
|
||||
7zr e -so "$2" 2>/dev/null
|
||||
else
|
||||
# extract name of temporary file containing the 7za archive
|
||||
t=${res#*Listing\ archive:\ }
|
||||
t2="
|
||||
"
|
||||
t=${t%%$t2*}
|
||||
7zr e -so $t 2>/dev/null
|
||||
fi
|
||||
else
|
||||
msg "use 7za_file${sep}contained_file to view a file in the archive"
|
||||
echo "$res"
|
||||
fi
|
||||
elif [[ "$1" = *[Cc]abinet* ]] && cmd_exist cabextract; then
|
||||
msg "use cab_file${sep}contained_file to view a file in the cabinet"
|
||||
istemp "cabextract -l" "$2"
|
||||
elif [[ "$1" = *\ DVI* ]] && cmd_exist dvi2tty; then
|
||||
msg "append $sep to filename to view the raw DVI file"
|
||||
isdvi "$2"
|
||||
elif [[ "$PARSEHTML" = yes && "$1" = *HTML* ]]; then
|
||||
msg "append $sep to filename to view the HTML source"
|
||||
parsehtml "$2"
|
||||
elif [[ "$1" = *PDF* ]] && cmd_exist pdftotext; then
|
||||
msg "append $sep to filename to view the PDF source"
|
||||
istemp pdftotext "$2" -
|
||||
elif [[ "$PARSEHTML" = yes && "$1" = *PDF* ]] && cmd_exist pdftohtml; then
|
||||
msg "append $sep to filename to view the PDF source"
|
||||
t=$(nexttmp)
|
||||
cat "$2" > "$t"; pdftohtml -stdout "$t" | parsehtml -
|
||||
elif [[ "$1" = *Hierarchical\ Data\ Format* ]] && cmd_exist h5dump; then
|
||||
istemp h5dump "$2"
|
||||
elif [[ "$1" = *NetCDF* || "$1" = *Hierarchical\ Data\ Format* ]] && cmd_exist ncdump; then
|
||||
istemp ncdump "$2"
|
||||
elif [[ "$1" = *Matlab\ v[0-9.]*\ mat-file* ]] && cmd_exist matdump; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
matdump -d "$2"
|
||||
elif [[ "$1" = *DjVu* ]] && cmd_exist djvutxt; then
|
||||
msg "append $sep to filename to view the DjVu source"
|
||||
djvutxt "$2"
|
||||
elif [[ "$1" = *Microsoft\ Word* || "$1" = *Microsoft\ Office* ]]; then
|
||||
if cmd_exist antiword; then
|
||||
msg "append $sep to filename to view the raw word document"
|
||||
antiword "$2"
|
||||
elif cmd_exist catdoc; then
|
||||
msg "append $sep to filename to view the raw word document"
|
||||
catdoc "$2"
|
||||
else
|
||||
msg "install antiword or catdoc to view human readable text"
|
||||
cat "$2"
|
||||
fi
|
||||
elif [[ "$1" = *Rich\ Text\ Format* ]] && cmd_exist unrtf; then
|
||||
if [[ "$PARSEHTML" = yes ]]; then
|
||||
msg "append $sep to filename to view the RTF source"
|
||||
istemp "unrtf --html" "$2" | parsehtml -
|
||||
else
|
||||
msg "append $sep to filename to view the RTF source"
|
||||
istemp "unrtf --text" "$2" | sed -e "s/^### .*//" | fmt -s
|
||||
fi
|
||||
elif [[ "$PARSEHTML" = yes && "$1" = *Excel\ document* ]] && cmd_exist xlhtml; then
|
||||
msg "append $sep to filename to view the spreadsheet source"
|
||||
xlhtml -te "$2" | parsehtml -
|
||||
elif [[ "$PARSEHTML" = yes && "$1" = *PowerPoint\ document* ]] && cmd_exist ppthtml; then
|
||||
msg "append $sep to filename to view the PowerPoint source"
|
||||
ppthtml "$2" | parsehtml -
|
||||
elif [[ "$PARSEHTML" = yes && ("$1" = *OpenDocument\ [CHMPST]* || "$1" = *OpenOffice\.org\ 1\.x\ [CIWdgpst]*) ]] && cmd_exist unzip; then
|
||||
if cmd_exist o3tohtml; then
|
||||
msg "append $sep to filename to view the OpenOffice or OpenDocument source"
|
||||
istemp "unzip -avp" "$2" content.xml | o3tohtml | parsehtml -
|
||||
elif cmd_exist sxw2txt; then
|
||||
msg "append $sep to filename to view the OpenOffice or OpenDocument source"
|
||||
istemp sxw2txt "$2"
|
||||
else
|
||||
msg "install at least sxw2txt from the lesspipe package to see plain text in openoffice documents"
|
||||
fi
|
||||
elif [[ "$1" = *ISO\ 9660* ]] && cmd_exist isoinfo; then
|
||||
if [[ "$2" != - ]]; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
isoinfo -d -i "$2"
|
||||
joliet=`isoinfo -d -i "$2" | egrep '^Joliet'|cut -c1`
|
||||
echo "================================= Content ======================================"
|
||||
isoinfo -lR$joliet -i "$2"
|
||||
fi
|
||||
elif [[ "$1" = *image\ data* || "$1" = *JPEG\ file* || "$1" = *JPG\ file* ]] && cmd_exist identify; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
identify -verbose "$2"
|
||||
elif [[ "$1" = *MPEG\ *layer\ 3\ audio* || "$1" = *MPEG\ *layer\ III* || "$1" = *mp3\ file* || "$1" = *MP3* ]]; then
|
||||
if cmd_exist id3v2; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
istemp "id3v2 -l" "$2"
|
||||
elif cmd_exist mp3info2; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
mp3info2 "$2"
|
||||
elif cmd_exist mp3info; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
mp3info "$2"
|
||||
fi
|
||||
elif [[ "$1" = *bill\ of\ materials* ]] && cmd_exist lsbom; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
lsbom -p MUGsf "$2"
|
||||
elif [[ "$1" = *perl\ Storable* ]]; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
perl -MStorable=retrieve -MData::Dumper -e '$Data::Dumper::Indent=1;print Dumper retrieve shift' "$2"
|
||||
elif [[ "$1" = *UTF-8* && $LANG != *UTF-8 ]] && cmd_exist iconv -c; then
|
||||
iconv -c -f UTF-8 "$2"
|
||||
elif [[ "$1" = *ISO-8859* && $LANG != *ISO-8859-1 ]] && cmd_exist iconv -c; then
|
||||
iconv -c -f ISO-8859-1 "$2"
|
||||
elif [[ "$1" = *UTF-16* && $LANG != *UTF-16 ]] && cmd_exist iconv -c; then
|
||||
iconv -c -f UTF-16 "$2"
|
||||
elif [[ "$1" = *GPG\ encrypted\ data* || "$1" = *PGP\ *ncrypted* ]] && cmd_exist gpg; then
|
||||
msg "append $sep to filename to view the encrypted file"
|
||||
gpg -d "$2"
|
||||
elif [[ "$1" = *Apple\ binary\ property\ list* ]] && cmd_exist plutil; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
plutil -convert xml1 -o - "$2"
|
||||
elif [[ "$1" = *data* ]]; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
nodash strings "$2"
|
||||
elif [[ "$2" = *.crt || "$2" = *.pem ]] && cmd_exist openssl; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
openssl x509 -hash -text -noout -in "$2"
|
||||
elif [[ "$2" = *.csr ]] && cmd_exist openssl; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
openssl req -text -noout -in "$2"
|
||||
elif [[ "$2" = *.crl ]] && cmd_exist openssl; then
|
||||
msg "append $sep to filename to view the raw data"
|
||||
openssl crl -hash -text -noout -in "$2"
|
||||
else
|
||||
set "plain text" "$2"
|
||||
fi
|
||||
if [[ "$1" = *plain\ text* ]]; then
|
||||
if cmd_exist code2color; then
|
||||
code2color $PPID ${in_file:+"$in_file"} "$2"
|
||||
if [[ $? = 0 ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [[ "$2" = - ]]; then
|
||||
cat
|
||||
fi
|
||||
}
|
||||
|
||||
IFS=$sep a="$@"
|
||||
IFS=' '
|
||||
if [[ "$a" = "" ]]; then
|
||||
if [[ "$0" != /* ]]; then
|
||||
pat=`pwd`/
|
||||
fi
|
||||
if [[ "$SHELL" = *csh ]]; then
|
||||
echo "setenv LESSOPEN \"|$pat$0 %s\""
|
||||
else
|
||||
echo "LESSOPEN=\"|$pat$0 %s\""
|
||||
echo "export LESSOPEN"
|
||||
fi
|
||||
else
|
||||
# check for pipes so that "less -f ... <(cmd) ..." works properly
|
||||
[[ -p "$1" ]] && exit 1
|
||||
show "$a"
|
||||
fi
|
1
home/.local/bin/op
Symbolic link
1
home/.local/bin/op
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../private/home/.local/bin/op
|
1
home/.ssh
Symbolic link
1
home/.ssh
Symbolic link
|
@ -0,0 +1 @@
|
|||
../private/home/.ssh/
|
1
home/.termux/colors.properties
Normal file
1
home/.termux/colors.properties
Normal file
|
@ -0,0 +1 @@
|
|||
# Using default color theme.
|
3
home/.termux/termux.properties
Normal file
3
home/.termux/termux.properties
Normal file
|
@ -0,0 +1,3 @@
|
|||
extra-keys = [['ESC','/','|','-','~','UP',':'],['TAB','CTRL','ALT','_','LEFT','DOWN','RIGHT']]:
|
||||
bell-character=vibrate
|
||||
|
30
home/.tidyrc
Normal file
30
home/.tidyrc
Normal file
|
@ -0,0 +1,30 @@
|
|||
indent: auto
|
||||
indent-spaces: 2
|
||||
wrap: 88
|
||||
markup: yes
|
||||
output-xml: no
|
||||
input-xml: no
|
||||
show-warnings: yes
|
||||
numeric-entities: yes
|
||||
quote-marks: yes
|
||||
quote-nbsp: yes
|
||||
quote-ampersand: yes
|
||||
break-before-br: yes
|
||||
uppercase-tags: no
|
||||
uppercase-attributes: no
|
||||
char-encoding: utf8
|
||||
new-inline-tags: cfif, cfelse, math, mroot,
|
||||
mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover,
|
||||
munder, mover, mmultiscripts, msup, msub, mtext,
|
||||
mprescripts, mtable, mtr, mtd, mth
|
||||
new-blocklevel-tags: cfoutput, cfquery
|
||||
new-empty-tags: cfelse
|
||||
drop-empty-elements: no
|
||||
vertical-space: yes
|
||||
sort-attributes: alpha
|
||||
priority-attributes: id, name
|
||||
clean: yes
|
||||
#Enable the followin go not break jinja templates.
|
||||
#show-body-only: yes
|
||||
#fix-uri: no
|
||||
merge-divs: no
|
63
home/.tmux.conf
Normal file
63
home/.tmux.conf
Normal file
|
@ -0,0 +1,63 @@
|
|||
set-option -g update-environment "DISPLAY \
|
||||
KRB5CCNAME \
|
||||
SSH_ASKPASS \
|
||||
SSH_CONNECTION \
|
||||
WINDOWID \
|
||||
GPG_TTY \
|
||||
XAUTHORITY"
|
||||
|
||||
set-environment -gr "SSH_AUTH_SOCK"
|
||||
# BASIC SETTINGS
|
||||
# --------------------------------
|
||||
|
||||
# Disable the default C-b prefix as well
|
||||
#unbind C-b
|
||||
|
||||
# Switch the default prefix to C-a like in GNU screen
|
||||
#set-option -g prefix C-a
|
||||
|
||||
# Quick window switching on C-a C-a
|
||||
#bind-key C-a last-window
|
||||
|
||||
# Handle nested passthrough Of C-a a
|
||||
#bind-key a send-prefix
|
||||
|
||||
# Use a faster wait time, not waiting for escape sequence
|
||||
set -s escape-time 1
|
||||
|
||||
# Use vim directions for moving around
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
bind H previous-window
|
||||
bind L next-window
|
||||
|
||||
# Logical window numbering from 1 to match keyboard
|
||||
set -g base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
|
||||
# Enable mouse:
|
||||
setw -g mouse on
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
|
||||
# Enable UTF8
|
||||
#set -g status-utf8 on
|
||||
#set -g utf8 on
|
||||
|
||||
# Better colours
|
||||
set -g status-bg white
|
||||
set -g status-fg black
|
||||
|
||||
# Enable 256 colour mode
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
##ALEX
|
||||
set -g status-keys vi
|
||||
set -g visual-bell on
|
||||
|
||||
#Make copy and paste work properly.
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -sel clip > /dev/null"
|
||||
bind-key p run "xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer"
|
1
home/.useful
Symbolic link
1
home/.useful
Symbolic link
|
@ -0,0 +1 @@
|
|||
../private/home/.useful/
|
9
home/.vimrc
Normal file
9
home/.vimrc
Normal file
|
@ -0,0 +1,9 @@
|
|||
if !exists("g:my_environ_dir")
|
||||
let g:my_environ_dir = expand('~/.alex-environ')
|
||||
endif
|
||||
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/base"
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/filetypes"
|
||||
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/plugins"
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/dev-environ"
|
175
home/.vimrc.d/base
Normal file
175
home/.vimrc.d/base
Normal file
|
@ -0,0 +1,175 @@
|
|||
" Definitions
|
||||
" ---------------------------------------
|
||||
let g:my_vim_dir = expand('~/.vim')
|
||||
let g:my_vimrc = expand('~/.vimrc')
|
||||
|
||||
if !exists("g:my_environ_dir")
|
||||
let g:my_environ_dir = expand('~/.alex-environ')
|
||||
endif
|
||||
|
||||
" Remove ALL autocommands to prevent them from being loaded twice.
|
||||
if has('autocmd')
|
||||
autocmd!
|
||||
endif
|
||||
|
||||
" Syntax Highlighting
|
||||
if has('syntax')
|
||||
syntax enable
|
||||
set background=dark
|
||||
endif
|
||||
|
||||
" OPTIONS
|
||||
" ---------------------------------------
|
||||
set nocompatible " The most important VIM option
|
||||
|
||||
scriptencoding utf-8 " Convert all scripts into UTF8 format
|
||||
|
||||
" Typing options:
|
||||
set smarttab
|
||||
set tabstop=4 " Set the default tabstops
|
||||
set shiftwidth=4 " Set the default autoindent
|
||||
set softtabstop=4
|
||||
set expandtab
|
||||
set hidden
|
||||
set omnifunc=syntaxcomplete#Complete "Autocompletion
|
||||
|
||||
set autoindent " Sensible indenting
|
||||
set shiftround " Round indents to a multiple of 'shiftwidth'
|
||||
set complete-=i " Don't scan includes, since it can be very slow.
|
||||
set backspace=indent,eol,start " Set for maximum backspace smartness
|
||||
|
||||
" Searching options:
|
||||
set ignorecase " Ignore case in searches ... (\c\C override)
|
||||
set smartcase " ... unless there are caps in the search
|
||||
set incsearch " Perform incremental search as you type search
|
||||
set hlsearch " Highlight all search matches
|
||||
|
||||
" Highlighting options:
|
||||
set showmatch " Show the matching bracket
|
||||
set matchpairs=(:),{:},[:] " List of characters we expect in balanced pairs
|
||||
set cursorline " Highlights the current line
|
||||
|
||||
" Mouse options:
|
||||
set mouse=a " Enable the mouse for all modes
|
||||
|
||||
" General options:
|
||||
set history=1000 " Save more history.
|
||||
set visualbell " Don't ding all the time
|
||||
|
||||
" Setup line numbers. Relative numbers in normal mode, otherwise normal
|
||||
" numbers.
|
||||
set number relativenumber
|
||||
if has('autocmd')
|
||||
augroup numbertoggle
|
||||
autocmd!
|
||||
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
||||
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
||||
augroup END
|
||||
endif
|
||||
|
||||
" Open new split panes to right and bottom, which feels more natural
|
||||
set splitbelow
|
||||
set splitright
|
||||
|
||||
" BACKUPS, UNDO and SWAP FILES
|
||||
" ---------------------------------------
|
||||
" Save your backups to a less annoying place than the current directory.
|
||||
" If you have .vim-backup in the current directory, it'll use that.
|
||||
" Otherwise it saves it to ~/.vim/backup or . if all else fails.
|
||||
if isdirectory(g:my_vim_dir . '/backup') == 0
|
||||
execute 'silent !mkdir -p ' . g:my_vim_dir . '/backup >/dev/null 2>&1'
|
||||
endif
|
||||
set backupdir-=.
|
||||
set backupdir+=.
|
||||
set backupdir-=~/
|
||||
execute 'set backupdir^=' . g:my_vim_dir . '/backup/'
|
||||
set backupdir^=./.vim-backup/
|
||||
set backup
|
||||
" Prevent backups from overwriting each other. The naming is weird,
|
||||
" since I'm using the 'backupext' variable to append the path.
|
||||
" So the file '/home/docwhat/.vimrc' becomes '.vimrc%home%docwhat~'
|
||||
if has('autocmd')
|
||||
autocmd BufWritePre * nested let &backupext = substitute(expand('%:p:h'), '/', '%', 'g') . '~'
|
||||
endif
|
||||
|
||||
if has('macunix')
|
||||
set backupskip+=/private/tmp/*
|
||||
endif
|
||||
|
||||
" Save your swp files to a less annoying place than the current directory.
|
||||
" If you have .vim-swap in the current directory, it'll use that.
|
||||
" Otherwise it saves it to ~/.vim/swap, ~/tmp or .
|
||||
if isdirectory(g:my_vim_dir . '/swap') == 0
|
||||
execute 'silent !mkdir -p ' . g:my_vim_dir . '/swap >/dev/null 2>&1'
|
||||
endif
|
||||
set directory=./.vim-swap//
|
||||
execute 'set directory+=' . g:my_vim_dir . '/swap//'
|
||||
set directory+=~/tmp//
|
||||
set directory+=.
|
||||
|
||||
" viminfo stores the the state of your previous editing session
|
||||
execute 'set viminfo+=n' . g:my_vim_dir . '/viminfo'
|
||||
set viminfo^=!,h,f0,:100,/100,@100
|
||||
|
||||
if exists('+undofile')
|
||||
" undofile - This allows you to use undos after exiting and restarting
|
||||
" This, like swap and backups, uses .vim-undo first, then ~/.vim/undo
|
||||
" :help undo-persistence
|
||||
" This is only present in 7.3+
|
||||
if isdirectory(g:my_vim_dir . '/undo') == 0
|
||||
execute 'silent !mkdir -p ' . g:my_vim_dir . '/undo >/dev/null 2>&1'
|
||||
endif
|
||||
set undodir=./.vim-undo/
|
||||
execute 'set undodir+=' . g:my_vim_dir . '/undo/'
|
||||
set undofile
|
||||
set undolevels=1000 " maximum number of changes that can be undone
|
||||
set undoreload=10000 " maximum number lines to save for undo on a buffer reload
|
||||
endif
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
" Also don't do it when the mark is in the first line, that is the default
|
||||
" position when opening a file.
|
||||
if has('autocmd')
|
||||
autocmd BufReadPost * nested
|
||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
endif
|
||||
|
||||
" APPEARANCE
|
||||
" ---------------------------------------
|
||||
if has('gui_running')
|
||||
set guifont=Monospace\ 14
|
||||
endif
|
||||
|
||||
" Fallback colors
|
||||
colorscheme peachpuff
|
||||
|
||||
" KEYBOARD BINDINGS
|
||||
" ---------------------------------------
|
||||
map <Leader>[ <ESC>:NERDTreeToggle<RETURN>
|
||||
map <Leader>] <ESC>:CtrlP<RETURN>
|
||||
|
||||
""" FIXES FOR GLITCHES ETC.
|
||||
" ---------------------------------------
|
||||
""" Fix copy and paste
|
||||
if exists('##TextYankPost')
|
||||
augroup OSCYank
|
||||
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankReg "' | endif
|
||||
augroup END
|
||||
endif
|
||||
|
||||
""" Fix the terminal background on WSL
|
||||
if (&term =~ '^xterm' && &t_Co == 256)
|
||||
set t_ut= | set ttyscroll=1
|
||||
endif
|
||||
|
||||
""" MORE tabs.
|
||||
set tabpagemax=100
|
||||
|
||||
""" COMMANDS
|
||||
" ---------------------------------------
|
||||
" For when you forget to sudo... Really Write the file.
|
||||
cnoremap w!! w !sudo tee % >/dev/null
|
10
home/.vimrc.d/coc/coc-settings.json
Normal file
10
home/.vimrc.d/coc/coc-settings.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"python.linting.enabled": false,
|
||||
"rust-client.disableRustup": true,
|
||||
"javascript.format.enabled": false,
|
||||
"javascript.validate.enable": false,
|
||||
"typescript.format.enabled": false,
|
||||
"typescript.validate.enable": false,
|
||||
"json.format.enable": false,
|
||||
"diagnostic.displayByAle": true
|
||||
}
|
44
home/.vimrc.d/dev-environ
Normal file
44
home/.vimrc.d/dev-environ
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
"""Base Settings for ALE
|
||||
command! ALEDisableFixers let g:ale_fix_on_save=0
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
"ALE defaults to all linters turned on, so this turns some off.
|
||||
let g:ale_linters = {
|
||||
\ 'python': ['flake8', 'pylint', 'black'],
|
||||
\ 'php': ['phpcs'],
|
||||
\ 'spec': ['rpmlint'],
|
||||
\}
|
||||
|
||||
" Ale defaults to all fixers turned off, so this turns some on.
|
||||
" Fixing AUTOMATICALLY CHANGES YOUR CODE on save.
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'python': ['black', 'isort'],
|
||||
\ 'yaml': ['prettier'],
|
||||
\ 'go': ['gofmt', 'goimports'],
|
||||
\ 'php': ['php_cs_fixer'],
|
||||
\ 'scss': ['prettier'],
|
||||
\ 'rust': ['rustfmt'],
|
||||
\ 'javascript' : ['eslint'],
|
||||
\ 'typescript': ['eslint'],
|
||||
\ 'vue': ['eslint'],
|
||||
\ 'json' :['jq'],
|
||||
\}
|
||||
|
||||
" ALE settings for speficic languages.
|
||||
"PHP
|
||||
let g:ale_php_phpcs_standard = 'PSR12'
|
||||
|
||||
"FORTRAN
|
||||
let g:ale_fortran_gcc_use_free_form = 0
|
||||
|
||||
"JSON
|
||||
let g:ale_json_jq_options = '--sort-keys'
|
||||
|
||||
"""Base Settings for COC
|
||||
let g:coc_config_home = '~/.alex-environ/home/.vimrc.d/coc'
|
||||
let g:coc_global_extensions = ['coc-python', 'coc-rls', 'coc-tsserver', 'coc-json', 'coc-htmldjango']
|
||||
"""Language Specific Options.
|
||||
"Remeber that COC has it's own settings file too, so most of it's settings are
|
||||
"there.
|
48
home/.vimrc.d/filetypes
Normal file
48
home/.vimrc.d/filetypes
Normal file
|
@ -0,0 +1,48 @@
|
|||
"BASICS
|
||||
" ---------------------------------------
|
||||
"Settings for specific filetypes that rely on base-vim only (no plugins)
|
||||
filetype plugin indent on
|
||||
filetype plugin on
|
||||
|
||||
"LANGUAGE SPECIFIC
|
||||
" ---------------------------------------
|
||||
"Apache
|
||||
au BufNewFile,BufRead /*/httpd/conf.d/* setf apache
|
||||
|
||||
"Django
|
||||
autocmd BufNewFile,BufRead *.djt set syntax=django
|
||||
autocmd BufNewFile,BufRead *.html.djt set syntax=htmldjango
|
||||
|
||||
"Python
|
||||
au BufNewFile,BufRead *.py
|
||||
\ setlocal tabstop=4
|
||||
\ | setlocal softtabstop=4
|
||||
\ | setlocal shiftwidth=4
|
||||
\ | setlocal expandtab
|
||||
\ | setlocal autoindent
|
||||
\ | setlocal fileformat=unix
|
||||
|
||||
"FORTRAN
|
||||
let fortran_fixed_source = 1
|
||||
let fortran_do_enddo=1
|
||||
let fortran_indent_less=1
|
||||
function SetfortranOptions()
|
||||
setlocal incsearch
|
||||
setlocal ignorecase
|
||||
setlocal smartcase
|
||||
setlocal smarttab
|
||||
setlocal expandtab
|
||||
setlocal tabstop=2
|
||||
setlocal shiftwidth=2
|
||||
endfunction
|
||||
autocmd FileType fortran call SetfortranOptions()
|
||||
|
||||
"PHP
|
||||
" Don't beep on > character
|
||||
au BufWinEnter *.php set mps-=<:>
|
||||
|
||||
"Latex
|
||||
let g:tex_flavor='latex'
|
||||
|
||||
"Vim
|
||||
au BufNewFile,BufRead */.vimrc.d/* set filetype=vim
|
60
home/.vimrc.d/plugins
Normal file
60
home/.vimrc.d/plugins
Normal file
|
@ -0,0 +1,60 @@
|
|||
" VUNDLE
|
||||
" ---------------------------------------
|
||||
filetype off " Turn off before processing Vundle (required)
|
||||
let g:ale_disable_lsp = 1 "ALE plays nice with COC. Must be before plugins.
|
||||
|
||||
" PLUGINS
|
||||
" ---------------------------------------
|
||||
function! LoadPlugins()
|
||||
Plug 'scrooloose/nerdtree' " NERDTree for vim file explorer
|
||||
Plug 'w0rp/ale' " Syntax checking and Fixing
|
||||
|
||||
if exists('##TextYankPost')
|
||||
Plug 'ojroques/vim-oscyank', { 'branch': 'main' } " Fix the clipboard
|
||||
endif
|
||||
|
||||
if executable('node') " Coc only works if nodejs is available.
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} "Autocompetion
|
||||
endif
|
||||
|
||||
" THEMES
|
||||
Plug 'altercation/vim-colors-solarized' " Solarized is a pretty colour scheme
|
||||
Plug 'morhetz/gruvbox' " gruvbox is a good colour scheme on 256 colours
|
||||
|
||||
Plug 'amanning9/django-plus.vim' " Improvements for identifying files in django projects.
|
||||
endfunction
|
||||
|
||||
" PLUGIN INITIALISATION
|
||||
" ---------------------------------------
|
||||
" Only install vundle and bundles if git exists...
|
||||
if executable('git') && has('autocmd')
|
||||
" Install Plug and run for the first time
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
echomsg 'Running vim for the first time, bootstrapping vim configuration...'
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
endif
|
||||
|
||||
" Initialise plugins on every vim load
|
||||
execute 'set rtp+=' . g:my_vim_dir . '/bundle/vundle/'
|
||||
silent! call plug#begin('~/.vim/plugged')
|
||||
call LoadPlugins()
|
||||
call plug#end()
|
||||
|
||||
" THEME CONFIGURATION
|
||||
" ---------------------------------------
|
||||
" Use solarized light in GUI, otherwise gruvbox dark
|
||||
if has('gui_running')
|
||||
set background=dark
|
||||
colorscheme solarized
|
||||
"set guifont=Menlo\ Regular:h12
|
||||
else
|
||||
set background=dark
|
||||
colorscheme gruvbox
|
||||
endif
|
||||
|
||||
" Put these back on.
|
||||
filetype plugin indent on
|
||||
filetype plugin on
|
6
home/.vimrc.simple
Normal file
6
home/.vimrc.simple
Normal file
|
@ -0,0 +1,6 @@
|
|||
if !exists("g:my_environ_dir")
|
||||
let g:my_environ_dir = expand('~/.alex-environ')
|
||||
endif
|
||||
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/base"
|
||||
exe "source " . g:my_environ_dir . "/home/.vimrc.d/filetypes"
|
5
home/scripts/askpass.sh
Executable file
5
home/scripts/askpass.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/bash
|
||||
source $AE_HOME/.bashrc.d/functions.sh
|
||||
opon
|
||||
op get item $sudo_pass_uuid --fields password
|
||||
opoff
|
3
home/scripts/hassfix.sh
Executable file
3
home/scripts/hassfix.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
yprint.py $@ | sed -E -e "s/'(\!include.*)'/\1/g"
|
1
home/scripts/puma
Symbolic link
1
home/scripts/puma
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../private/home/scripts/puma
|
1
home/scripts/rootpass
Symbolic link
1
home/scripts/rootpass
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../private/home/scripts/rootpass
|
72
home/scripts/ssh_agent_setup
Executable file
72
home/scripts/ssh_agent_setup
Executable file
|
@ -0,0 +1,72 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
SSH_ENV=$HOME/.ssh/environment.`hostname`
|
||||
|
||||
start_agent ()
|
||||
{
|
||||
# If not running interactively, don't do anything else
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
if [ `uname -o` = "Cygwin" ]
|
||||
then
|
||||
echo "Connecting to ssh-pageant..."
|
||||
eval $(/usr/bin/ssh-pageant -r -a "/tmp/.ssh-pageant-$USERNAME")
|
||||
else
|
||||
ssh-agent > ${SSH_ENV}
|
||||
chmod 600 ${SSH_ENV}
|
||||
. ${SSH_ENV} > /dev/null
|
||||
echo "Created a new ssh-agent $SSH_AGENT_PID"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
load_keys ()
|
||||
{
|
||||
if [ "$alex_load_keys" == "1" ]
|
||||
then
|
||||
ssh-add
|
||||
fi
|
||||
}
|
||||
|
||||
# Source SSH settings, if applicable
|
||||
# If a ssh auth socket exists at this point, it must be from a forwarded agent.
|
||||
if [ -n "${SSH_AUTH_SOCK+set}" ]
|
||||
then
|
||||
if [ -f "${SSH_ENV}" ]
|
||||
then
|
||||
AUTH_SOCK=$SSH_AUTH_SOCK
|
||||
. ${SSH_ENV} > /dev/null
|
||||
kill -9 $SSH_AGENT_PID
|
||||
pkill -9 -u $USER ssh-agent
|
||||
rm $SSH_ENV
|
||||
unset SSH_AGENT_PID
|
||||
unset SSH_ENV
|
||||
SSH_AUTH_SOCK=$AUTH_SOCK
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
echo "Connected to forwarded SSH agent ${SSH_AUTH_SOCK}."
|
||||
echo "The following keys are available:"
|
||||
ssh-add -l
|
||||
else
|
||||
if [ -f "${SSH_ENV}" ]
|
||||
then
|
||||
. ${SSH_ENV} > /dev/null
|
||||
ssh-add -L > /dev/null 2>&1
|
||||
case $? in
|
||||
0) echo "Connected to existing ssh-agent $SSH_AGENT_PID."
|
||||
echo "The following keys are available:"
|
||||
ssh-add -l
|
||||
;;
|
||||
1) echo "Connected to existing ssh-agent $SSH_AGENT_PID. No keys were found in the agent."
|
||||
load_keys
|
||||
;;
|
||||
2) start_agent
|
||||
load_keys
|
||||
;;
|
||||
esac
|
||||
else
|
||||
start_agent
|
||||
load_keys
|
||||
fi
|
||||
fi
|
42
home/scripts/tmux.sh
Executable file
42
home/scripts/tmux.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
#If tmux dosn't exist, or we're already in tmux, don't so anything
|
||||
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]
|
||||
then
|
||||
|
||||
# Get all temux sessions, and see if anyone is attached.
|
||||
sessions=`tmux ls -F "#{session_name}:#{session_attached}"`
|
||||
|
||||
|
||||
# Check what sessions exist.
|
||||
# Pick a disconnected one to connect to. (the last one).
|
||||
connectto="-1"
|
||||
for item in ${sessions//\\n/ }
|
||||
do
|
||||
name=`echo $item | cut -d":" -f1`
|
||||
connected=`echo $item | cut -d":" -f2`
|
||||
if [ $connected -eq "0" ]
|
||||
then
|
||||
connectto=$name
|
||||
fi
|
||||
done
|
||||
|
||||
#iterm2 wants command mode
|
||||
tmuxargs=""
|
||||
if [ `uname -o` = "Darwin" ]
|
||||
then
|
||||
tmuxargs=""
|
||||
fi
|
||||
|
||||
# If we got a session to connect to, connect to it.
|
||||
# If not, safe to create a new session.
|
||||
if [ $connectto -eq "-1" ]
|
||||
then
|
||||
exec tmux $tmuxargs new
|
||||
else
|
||||
exec tmux $tmuxargs attach -t $connectto
|
||||
fi
|
||||
|
||||
#We created a tmux session, bashrc will run inside it. Stop executing this one.
|
||||
return
|
||||
fi
|
23
home/scripts/yprint.py
Executable file
23
home/scripts/yprint.py
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
|
||||
def default_ctor(loader, tag_suffix, node):
|
||||
return tag_suffix + ' ' + node.value
|
||||
|
||||
|
||||
yaml.add_multi_constructor('', default_ctor, Loader=yaml.FullLoader)
|
||||
|
||||
data = sys.stdin.read()
|
||||
|
||||
yobject = yaml.load(data, Loader=yaml.FullLoader)
|
||||
|
||||
tidyyaml = yaml.dump(yobject,
|
||||
default_flow_style=False,
|
||||
explicit_start=True,
|
||||
width=50,
|
||||
indent=4)
|
||||
|
||||
print(tidyyaml)
|
1
setup/auth_keys
Symbolic link
1
setup/auth_keys
Symbolic link
|
@ -0,0 +1 @@
|
|||
../private/setup/auth_keys/
|
1
setup/git_hooks/auth_keys.sh
Symbolic link
1
setup/git_hooks/auth_keys.sh
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../private/setup/auth_keys.sh
|
5
setup/git_hooks/fix-ssh.sh
Executable file
5
setup/git_hooks/fix-ssh.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
chmod 600 ~/.alex-environ/home/.ssh/config
|
||||
chmod 600 ~/.alex-environ/home/.ssh/config.d/config_clever
|
||||
chmod 600 ~/.alex-environ/home/.ssh/config.d/config_xforward
|
10
setup/linters
Normal file
10
setup/linters
Normal file
|
@ -0,0 +1,10 @@
|
|||
from fedora packages
|
||||
python3-flake8
|
||||
python3-pylint
|
||||
tidy
|
||||
csslint
|
||||
yamllinkt
|
||||
vint
|
||||
|
||||
from npm -g
|
||||
fixjson
|
67
setup/setupscript.sh
Executable file
67
setup/setupscript.sh
Executable file
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/env bash
|
||||
#set template path
|
||||
environ_dir=~/.alex-environ
|
||||
template_dir=${environ_dir}/setup/templates
|
||||
environ_home=${environ_dir}/home
|
||||
|
||||
########## Move git repo to standard location
|
||||
cd ~
|
||||
mv alex-environ .alex-environ
|
||||
|
||||
########## Create .config if it doesn't exist
|
||||
mkdir -p ~/.config
|
||||
|
||||
########## Copy templates into local files then edit them with vim.
|
||||
cd ~/.alex-environ/setup/templates
|
||||
|
||||
# VIMrc (first as we are gonna use vim to edit everything else)
|
||||
cat ${template_dir}/vimrc_template >> ~/.vimrc
|
||||
vim ~/.vimrc
|
||||
|
||||
# Bash_profile
|
||||
cat ${template_dir}/bash_profile_local_template >> ~/.bash_profile
|
||||
vim ~/.bash_profile
|
||||
|
||||
# Bashrc
|
||||
cat ${template_dir}/bashrc_local_template >> ~/.bashrc
|
||||
vim ~/.bashrc
|
||||
|
||||
# Bash logout
|
||||
cat ${template_dir}/bash_logout_template >> ~/.bash_logout
|
||||
vim ~/.bash_logout
|
||||
|
||||
# Git config
|
||||
cat ${template_dir}/gitconfig_template >> ~/.gitconfig
|
||||
vim ~/.gitconfig
|
||||
|
||||
# TMUX config
|
||||
cat ${template_dir}/tmux.conf_template >> ~/.tmux.conf
|
||||
vim ~/.tmux.conf
|
||||
|
||||
# SSH config
|
||||
cat ${template_dir}/sshconfig_template >> ~/.ssh/config
|
||||
vim ~/.ssh/config
|
||||
chmod 600 ~/.ssh/config
|
||||
|
||||
########## Setup the git hooks which run when this repo is pulled
|
||||
cp ${template_dir}/post-merge ~/.alex-environ/.git/hooks
|
||||
|
||||
########## Create authorized_keys and run the auth keys script
|
||||
touch ~/.ssh/authorized_keys
|
||||
~/.alex-environ/setup/git_hooks/auth_keys.sh
|
||||
|
||||
########## Link files which do not support includes
|
||||
##### In .config
|
||||
#flake8
|
||||
ln -s ${environ_home}/.config/flake8 ~/.config/flake8
|
||||
#pylint
|
||||
ln -s ${environ_home}/.config/pylintrc ~/.config/pylintrc
|
||||
#matplotlib
|
||||
ln -s ${environ_home}/.config/matplotlib ~/.config/matplotlib
|
||||
#yamllint
|
||||
ln -s ${environ_home}/.config/yamllint ~/.config/yamllint
|
||||
#mypy
|
||||
ln -s ${environ_home}/.config/mypy ~/.config/mypy
|
||||
|
||||
##### In home dir
|
||||
ln -s ${environ_home}/.fonts ~/.fonts
|
5
setup/templates/bash_logout_template
Normal file
5
setup/templates/bash_logout_template
Normal file
|
@ -0,0 +1,5 @@
|
|||
# ~/.bash_logout
|
||||
|
||||
if [ -f ~/.alex-environ/home/.bash_logout ]; then
|
||||
. ~/.alex-environ/home/.bash_logout
|
||||
fi
|
24
setup/templates/bash_profile_local_template
Normal file
24
setup/templates/bash_profile_local_template
Normal file
|
@ -0,0 +1,24 @@
|
|||
# .bash_profile
|
||||
|
||||
# Get the aliases and functions
|
||||
if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi
|
||||
|
||||
#Add to PATH HERE
|
||||
#PATH=$PATH:
|
||||
|
||||
export alex_load_keys=0
|
||||
|
||||
#source alex's global bash_profile
|
||||
if [ -f ~/.alex-environ/home/.bash_profile ]; then
|
||||
. ~/.alex-environ/home/.bash_profile
|
||||
fi
|
||||
|
||||
#set my prompt. Comment this for local propt color
|
||||
if [ -f ~/.alex-environ/home/.bash_profile.d/prompt ]; then
|
||||
. ~/.alex-environ/home/.bash_profile.d/prompt
|
||||
fi
|
||||
|
||||
#Start Tmux, if we want it
|
||||
# . ~/.alex-environ/home/scripts/tmux.sh
|
20
setup/templates/bashrc_local_template
Normal file
20
setup/templates/bashrc_local_template
Normal file
|
@ -0,0 +1,20 @@
|
|||
# .bashrc
|
||||
# .bashrc template
|
||||
|
||||
#SET PATH IN .BASH_PROFILE
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
# GLOBAL bashrc
|
||||
if [ -f ~/.alex-environ/home/.bashrc ]; then
|
||||
. ~/.alex-environ/home/.bashrc
|
||||
fi
|
||||
|
||||
#if [ -f ~/.alex-environ/home/.bashrc.d/work ]; then
|
||||
#. ~/.alex-environ/home/.bashrc.d/work
|
||||
#fi
|
||||
|
||||
# Local User specific aliases and functions
|
5
setup/templates/gitconfig_template
Normal file
5
setup/templates/gitconfig_template
Normal file
|
@ -0,0 +1,5 @@
|
|||
[user]
|
||||
email = mail@alex-m.co.uk
|
||||
name = Alex Manning
|
||||
[include]
|
||||
path = .alex-environ/home/.gitconfig
|
3
setup/templates/post-merge
Executable file
3
setup/templates/post-merge
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
~/.alex-environ/setup/git_hooks/fix-ssh.sh
|
||||
~/.alex-environ/setup/git_hooks/auth_keys.sh
|
2
setup/templates/sshconfig_template
Normal file
2
setup/templates/sshconfig_template
Normal file
|
@ -0,0 +1,2 @@
|
|||
Include ~/.alex-environ/home/.ssh/config
|
||||
Include ~/.alex-environ/home/.ssh/config.d/config_clever
|
1
setup/templates/tmux.conf_template
Normal file
1
setup/templates/tmux.conf_template
Normal file
|
@ -0,0 +1 @@
|
|||
source-file ~/.alex-environ/home/.tmux.conf
|
1
setup/templates/vimrc_template
Normal file
1
setup/templates/vimrc_template
Normal file
|
@ -0,0 +1 @@
|
|||
source ~/.alex-environ/home/.vimrc
|
0
tmp/.gitinclude
Normal file
0
tmp/.gitinclude
Normal file
Loading…
Reference in a new issue