1
0
Fork 0

Initial commit

This commit is contained in:
Alexander Yakovlev 2018-09-21 19:43:53 +07:00
commit 3d0f5b4d60
7 changed files with 578 additions and 0 deletions

87
.Xdefaults Normal file
View File

@ -0,0 +1,87 @@
!font settings
xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
!general dialog box (affects main hostname, username, password text)
xscreensaver.Dialog.foreground: #EDEDED
xscreensaver.Dialog.background: #202020
xscreensaver.Dialog.topShadowColor: #202024
xscreensaver.Dialog.bottomShadowColor: #202024
xscreensaver.Dialog.Button.foreground: #EDEDFF
xscreensaver.Dialog.Button.background: #444
!username/password input box and date text colour
xscreensaver.Dialog.text.foreground: #EDEDFF
xscreensaver.Dialog.text.background: #444
xscreensaver.Dialog.internalBorderWidth:24
xscreensaver.Dialog.borderWidth: 20
xscreensaver.Dialog.shadowThickness: 2
!timeout bar (background is actually determined by Dialog.text.background)
xscreensaver.passwd.thermometer.foreground: #A9B7C4
xscreensaver.passwd.thermometer.background: #202020
xscreensaver.passwd.thermometer.width: 8
!datestamp format--see the strftime(3) manual page for details
xscreensaver.dateFormat: %I:%M%P %a %b %d, %Y
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintfull
URxvt.intensityStyles: false
!URxvt*font: xft:Monospace:pixelsize=11
URxvt.perl-ext-common: default,vtwheel
URxvt*font: xft:Courier10 Cyr BT:pixelsize=16:style=Roman
URxvt*boldFont: xft:Courier10 Cyr BT:pixelsize=16:style=Bold
URxvt.talicFont: xft:Courier10 Cyr BT:pixelsize=16:style=Italic
URxvt.bolditalicFont: xft:Courier10 Cyr BT:pixelsize=16:style=Bold Italic
! Fix font space
URxvt*letterSpace: -1
URxvt.url-launcher: /usr/bin/firefox
URxvt.termName: xterm-256color
!urxvt.shading: 75
urxvt.inheritPixmap: false
! URxvt.matcher.button: 1
URxvt.urgentOnBell: true
!URxvt.colorUL: #4682B4
!URxvt.tabbed.tabbar-fg: 244
!URxvt.tabbed.tabbar-bg: 254
!URxvt.tabbed.tab-fg: 235
!URxvt.tabbed.tab-bg: 254
URxvt.depth: 32
URxvt.geometry: 80x30
URxvt.transparent: false
! URxvt.fading: 40
URxvt.fading: 0
URxvt.loginShell: true
URxvt.saveLines: 8192
URxvt.internalBorder: 3
URxvt.lineSpace: 0
! Scrollbar
URxvt.scrollStyle: rxvt
URxvt.scrollBar: false
! Cursor
URxvt.cursorBlink: true
URxvt.cursorColor: #657b83
URxvt.cursorUnderline: false
! Pointer
URxvt.pointerBlank: true
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0
! URxvt.secondaryWheel: 1
URxvt.externalBorder: 1
URxvt*iconFile: /usr/share/icons/Tango/32x32/apps/gnome-terminal.png

10
.gvimrc Normal file
View File

@ -0,0 +1,10 @@
set background=light
Plugin 'altercation/vim-colors-solarized'
colorscheme solarized
let g:tagbar_usearrows = 1
"nnoremap <C-Left> :tabprevious<CR>
"nnoremap <C-Right> :tabnext<CR>
set gfn=Courier10\ Cyr\ BT\ 12
"au FocusGained * :redraw!
se guioptions=imTrgac
set showtabline=0

186
.vimrc Normal file
View File

@ -0,0 +1,186 @@
set nocompatible
filetype off
set background=light
set rtp+=~/.vim/bundle/Vundle.vim
let g:python_host_prog = '/usr/bin/python2'
let g:python3_host_prog = '/usr/bin/python3'
let g:ruby_host_prog = 'rvm system do neovim-ruby-host'
let g:node_host_prog = '/usr/lib/node_modules/neovim/bin/cli.js'
set clipboard+=unnamedplus
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'docunext/closetag.vim'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'scrooloose/nerdtree'
Plugin 'StanAngeloff/php.vim'
Plugin 'majutsushi/tagbar'
Plugin 'tpope/vim-commentary'
Plugin 'airblade/vim-gitgutter'
Plugin 'Shougo/neosnippet'
Plugin 'Shougo/neosnippet-snippets'
Plugin 'qpkorr/vim-bufkill'
Plugin 'kchmck/vim-coffee-script'
" GPG support
" Plugin 'mhinz/vim-signify'
" Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'junegunn/goyo.vim'
" Plugin 'joonty/vdebug'
" Fountain support
" Plugin 'kblin/vim-fountain'
" Plugin 'leafgarland/typescript-vim'
Plugin 'jason0x43/vim-js-indent'
" Plugin 'Quramy/tsuquyomi'
Plugin 'evidens/vim-twig'
Plugin 'jwalton512/vim-blade'
Plugin 'pseewald/vim-anyfold'
Plugin 'elzr/vim-json'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'maksimr/vim-jsbeautify'
call vundle#end()
filetype plugin indent on
syntax enable
" let g:solarized_termcolors=256
" colorscheme solarized
" set lines=40 " 40 lines of text instead of 24,
if !has('win32') && !has('win64') && !has('nvim')
set term=$TERM " Make arrow and other keys work
endif
set mouse=a
set showtabline=1
set smartindent
set nu
set tabstop=2
set shiftwidth=2
set expandtab
set stal=2
set lbr
set wrap
set fencs=utf-8,default,cp1251,cp866
set backspace=indent,eol,start " backspace for dummys
set linespace=0 " No extra spaces between rows
set foldenable " auto fold code
set hidden " any buffer can be hidden (keeping its changes) without first writing the buffer to a file
set synmaxcol=500
set cursorline
set colorcolumn=110
"set dir=.,/var/tmp,/tmp
set noswapfile
au BufRead,BufNewFile *.tpl set filetype=smarty
au BufRead,BufNewFile *.cson set filetype=coffee
autocmd FileType html,htmldjango,jinjahtml,eruby,mako let b:closetag_html_style=1
autocmd FileType html,xhtml,xml,htmldjango,jinjahtml,eruby,mako source ~/.vim/bundle/closetag.vim/plugin/closetag.vim
if !has('nvim')
set ttymouse=xterm2
endif
" autocmd vimenter * NERDTree
map <C-b> :NERDTreeToggle<CR>
let NERDTreeIgnore=['\\.pyc', '\\\~$', '\\.swo$', '\\.swp$', '\\.git', '\\.hg', '\\.svn', '\\.bzr']
let NERDTreeQuitOnOpen=1
map <C-j> <C-W>j<C-W>_
map <C-k> <C-W>k<C-W>_
map <C-h> <C-W>h<C-W>_
map <C-l> <C-W>l<C-W>_
map ; :
:command Wq wq
:command WQ wq
:command W w
:command Q q
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
nmap \; :TagbarToggle<CR>
if filereadable(expand("\~/.vimrc.local"))
source \~/.vimrc.local
endif
nnoremap <leader>l :TagbarToggle<CR>
" let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_folding_level = 4
let g:vim_markdown_conceal = 0
" TypeScript autocompletion
if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']
let anyfold_activate=1
set foldlevel=4
autocmd User anyfoldLoaded normal zv
set laststatus=1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 0
" Let's save undo info!
if !isdirectory($HOME."/.vim")
call mkdir($HOME."/.vim", "", 0770)
endif
if !isdirectory($HOME."/.vim/undo-dir")
call mkdir($HOME."/.vim/undo-dir", "", 0700)
endif
" persistent undo
set undodir=~/.vim/undo-dir
set undofile
set undolevels=1000 " How many undos
set undoreload=10000 " number of lines to save for undo
" copy with mouse selection
vnoremap <LeftRelease> "*ygv
" neosnippet
imap <c-q> <Plug>(neosnippet_expand_or_jump)
smap <c-q> <Plug>(neosnippet_expand_or_jump)
xmap <c-q> <Plug>(neosnippet_expand_target)
" Enable snipMate compatibility feature.
" let g:neosnippet#enable_snipmate_compatibility = 1
" Tell Neosnippet about the other snippets
" let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets'
" For conceal markers.
if has('conceal')
set conceallevel=2 concealcursor=niv
let g:tex_conceal = ""
endif
map <c-f> :call JsBeautify()<cr>
" Stick with the UTF-8 encoding.
if has('multi_byte')
" Encoding used for the terminal.
if empty(&termencoding)
let &termencoding = &encoding
endif
" Encoding used in buffers, registers, strings in expressions, "viminfo"
" file, etc.
set encoding=utf-8
" Encoding used for writing files.
setglobal fileencoding=utf-8
endif
" Use both Unix and DOS file formats, but favor the Unix one for new files.
set fileformats=unix,dos

49
.xbindkeysrc Normal file
View File

@ -0,0 +1,49 @@
# Play/Pause
#"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
"playerctl play-pause"
XF86AudioPlay
# Next
#"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
"playerctl next"
XF86AudioNext
# Previous
#"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
"playerctl previous"
XF86AudioPrev
# Stop
#"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
"playerctl stop"
XF86AudioStop
# For the benefit of emacs users: -*- shell-script -*-
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
"xte 'keydown Control_L' 'key Insert' 'keyup Control_L'"
b:9
"xte 'keydown Shift_L' 'key Insert' 'keyup Shift_L'"
b:8
# specify a mouse button
#"xterm"
# control + b:2
#"xterm -geom 50x20+20+20"
# Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
# alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a release event starts rxvt
#"rxvt"
# release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
# Control + b:2 + Release

8
.xinitrc Executable file
View File

@ -0,0 +1,8 @@
xrdb -merge /home/alexander/.Xresources &
export BROWSER=firefox
#exec tdm --xstart "dbus-launch awesome"
xset -dpms
exec dbus-launch awesome
setxkbmap -layout 'us,ru' -option 'lv3:ralt_switch,grp:caps_toggle,misc:typo,grp_led:scroll,compose:rctrl'
feh --bg-fill --randomize --recursive ~/Картинки/Wallpapers &
xbindkeys &

124
.zshenv Normal file
View File

@ -0,0 +1,124 @@
export EDITOR=nvim
export VISUAL=nvim
JAVA_HOME=/usr/lib/jvm/java-8-oracle
#ANT_HOME=/opt/ant
#ANDROID_HOME=/opt/android-sdk-linux
#ANDROID_HOME=/opt/android-sdk
JRUBY_HOME=/opt/jruby
MOAI_BIN=/home/alexander/Programming/moai/lib/linux/bin
PATH+=":$JAVA_HOME/jre/bin"
PATH+=":$JAVA_HOME/bin"
PATH+=":$ANT_HOME/bin"
PATH+=":$ANDROID_HOME/platform-tools"
PATH+=":$JRUBY_HOME/bin"
PATH+=":$ANDROID_HOME/tools"
PATH+=":$GOPATH/bin"
PATH+=":$HOME/.cargo/bin"
PATH+=":$HOME/bin"
PATH+=":$HOME/bin/muds"
PATH+=":$HOME/.gem/ruby/2.0.0/bin"
PATH+=":$HOME/.config/composer/vendor/bin"
PATH+=":/usr/local/bin"
PATH+=":/usr/local/texlive/2018/bin/x86_64-linux"
PATH+=":$HOME/.cargo/bin"
#PATH+=":$MOAI_BIN"
PATH+=":./node_modules/.bin"
NODE_PATH+=":/usr/lib/node_modules"
BROWSER=firefox
NVIM_TUI_ENABLE_TRUE_COLOR=1
STARDICT_DATA_DIR="$HOME/.goldendict/dictionaries"
export TWEEGO_PATH="$HOME/.config/tweego"
export DOCKER_HOST="http+unix://var/run/docker.sock"
export GOPATH="/home/alexander/.cache/.go"
export MOZBUILD_STATE_PATH=/home/alexander/.mozilla/build
export HAXE_LIBRARY_PATH=/opt/haxe/std:.
export HAXE_STD_PATH=/opt/haxe/std:.
export CUDNN_PATH=/usr/local/cuda-7.0/lib64/libcudnn.so.5
export LESS='-R'
export LESSOPEN='|~/.lessfilter %s'
#alias youtube-dl="youtube-dl --external-downloader aria2c --external-downloader-args '--file-allocation=falloc --min-split-size=1M --split=16 --max-connection-per-server=16'"
alias youtube="youtube-dl -f '298+140/136+140/299+140/303+140/bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' --sub-lang ru --convert-subtitles srt"
alias grep='grep --color=always'
alias splitcue='cue2tracks -o "%n. %t"'
alias bitcoinotc='wget -q -O - "http://bitcoin-otc.com/otps/470836B6A1EEF7F5" | gpg -q --output - --decrypt | xclip -i'
alias git-short='git log -10 --pretty=format:"%h %s"'
alias password='gpgpwd --fast-git -t -p /home/alexander/.passwords/pwdb'
alias yaoupg='yaourt -Syua --devel'
alias mosh='mosh -a'
alias restartserver='sudo vim /etc/nginx/sites-enabled/default && sudo systemctl restart nginx'
alias serverhere="sudo php -S localhost:91"
alias unzipall="find . -name \*.zip -exec unzip {} \;"
alias screencap="import png:- | curl -T- -s chunk.io"
alias renpy_here="RENPY_BASE=. renpy"
alias balsawood="sudo openvpn /home/alexander/.openvpn/darkstar.ovpn"
alias recordnow="arecord -D plughw:0,0 -f S16_LE -c2 -r44100 -t raw | oggenc -r - -o `date '+%d.%m.%Y_%H-%M'`.ogg"
alias kbdsetup="setxkbmap -layout 'us,ru' -option 'lv3:ralt_switch,grp:caps_toggle,misc:typo,grp_led:scroll,compose:rctrl'"
alias aguu="sudo tsocks apt-get update && sudo tsocks apt-get upgrade"
alias agug="sudo tsocks apt-get upgrade"
alias agr="sudo apt-get autoremove"
record() {
arecord -D plughw:0,0 -f S16_LE -c2 -r44100 -t raw | oggenc -r - -o $*.ogg
}
fromcp() {
iconv -f cp1251 -t utf8 "$*" | sponge "$*"
}
updateschema() { mysqldump -u root --skip-dump-date --skip-comments --skip-add-locks --no-data $* >schema.sql }
cssc () {lessc -x $* $*:r.css}
lookup() {dig $* A +short}
gamebook() {
/home/alexander/Programming/gamebookformat/formatgamebook.py $1 $2
}
pdfpage() {
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dFirstPage=$1 -dLastPage=$1 -sOutputFile=$2.p$1.pdf $2
}
pdfpngpage() {
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -r300 -dFirstPage=$1 -dLastPage=$1 -sOutputFile=$2.p$1.png $2
}
gif2mp4 () {
ffmpeg -r $2 -i $1 -c:v libx264 $1:r.mp4
}
sqlimport() {
pv -petli 1 $1|mysql -u root -p $2
}
writeiso() {
dd if=$1 | pv -s $(stat -c %s $1) | dd of=$2
}
GPG_TTY=$(tty)
export GPG_TTY
#########COMPATIBILITY###########################
typeset -g -A key
bindkey '^?' backward-delete-char
bindkey '^[[7~' beginning-of-line
bindkey '^[[5~' up-line-or-history
bindkey '^[[3~' delete-char
bindkey '^[[8~' end-of-line
bindkey '^[[6~' down-line-or-history
bindkey '^[[A' up-line-or-search
bindkey '^[[D' backward-char
bindkey '^[[B' down-line-or-search
bindkey '^[[C' forward-char
bindkey '^[[2~' overwrite-mode
#################################################
# source /opt/qt57/bin/qt57-env.sh
# smh, I had to put this here
alias :q='exit'
# I'm working in Laravel/Symfony quite alot
alias art='php artisan' # laravel framework cliapp
alias sym='bin/console' # symfony framework cliapp
# This + `mux` alias for tmuxinator are great combo
alias muxreload=tmux source-file ~/.tmux.conf # reload config
# Since Google Chrome now offer headless feature,
# enjoy this alias to export any URL/Website to PDF
function urlpdf {
chrome --headless --disable-gpu --print-to-pdf $1
}
export GOOGLE_API_KEY="no"
export GOOGLE_DEFAULT_CLIENT_ID="no"
export GOOGLE_DEFAULT_CLIENT_SECRET="no"

114
.zshrc Normal file
View File

@ -0,0 +1,114 @@
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="sorin"
# Comment this out to disable weekly auto-update checks
#DISABLE_AUTO_UPDATE="true"
# If this option is set, and you type something with no arguments
# which isn't a command, zsh will check to see if it's actually a directory.
# This is particularly useful in the form '..'
AUTO_CD="true"
#CORRECT="false"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"
source $HOME/.zsh/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle git-extras
antigen bundle composer
antigen bundle command-not-found
antigen bundle paulirish/git-open
#antigen bundle unixorn/autoupdate-antigen.zshplugin
antigen bundle djui/alias-tips
# OS specific plugins
if [[ $CURRENT_OS == 'Linux' ]]; then
if [[ $DISTRO == 'Ubuntu' ]]; then
antigen bundle ubuntu
fi
fi
# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search
#antigen bundle tarruda/zsh-autosuggestions
# Load the theme.
antigen theme $ZSH_THEME
antigen apply
# ZSH Higher Order Functions
source $HOME/.zsh/functional/functional.plugin.zsh
#zstyle :omz:plugins:ssh-agent agent-forwarding on
#zstyle ':completion:*' completer _complete _ignored _approximate
#zstyle ':completion:*' matcher-list '' '' '' 'r:|[._-]=* r:|=*'
#zstyle :compinstall filename '/home/alexander/.zshrc'
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
autoload -U zmv
autoload -Uz compinit
compinit
#setopt extendedglob
setopt completealiases
setopt completeinword
setopt prompt_subst
SHARE_HISTORY="false"
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
# Vi mode
bindkey -v
bindkey '^R' history-incremental-pattern-search-backward
# Allow deleting backwards
# http://www.zsh.org/mla/workers/2008/msg01653.html
bindkey -M viins '^?' backward-delete-char
bindkey -M viins '^H' backward-delete-char
# Make sure the terminal is in application mode, when zle is active. Only then
# are the values from $terminfo valid. And also activate autosuggestions.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
# Bind UP and DOWN arrow keys to history-substring-search.
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
function zle-line-init () {
printf '%s' "${terminfo[smkx]}"
# Enable autosuggestions automatically
# zle autosuggest-start
}
function zle-line-finish () {
printf '%s' "${terminfo[rmkx]}"
}
zle -N zle-line-init
zle -N zle-line-finish
fi
#start_agent_nossh
keychain --nogui --quick $HOME/.ssh/id_rsa $HOME/.ssh/id_ed25519
[[ ( -a $HOME/.keychain/verres-sh ) ]] && source $HOME/.keychain/verres-sh
[[ ( -a $HOME/.keychain/verres-sh-gpg ) ]] && source $HOME/.keychain/verres-sh-gpg
source ~/.zshenv
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
# added by travis gem
[ -f /home/alexander/.travis/travis.sh ] && source /home/alexander/.travis/travis.sh
# . /home/alexander/Programming/torch/install/bin/torch-activate