Fix and improve dotfiles

This commit is contained in:
2019-01-15 11:34:48 +04:00
parent 64a675368c
commit 5b2844a2f0
10 changed files with 69 additions and 50 deletions

View File

@@ -1,5 +1,9 @@
**min.js **min.js
**/public/** *.lock
**/log/** *.locked
**/tmp/** *.log
**/vendor/bundle/** public/**
log/**
tmp/**
vendor/**
node_modules/**

View File

@@ -37,7 +37,7 @@ mod_statusbar.create{
-- right, respectively, and %systray is a placeholder for system tray -- right, respectively, and %systray is a placeholder for system tray
-- windows and icons. -- windows and icons.
-- --
template=" %battery %battery_remaining | %load | %mem_available | %cpufreq_M %filler %pomodoro [ %timelogger ] %systray | %date ", template=" %battery %battery_remaining | %load | %mem_available | %filler | %taskwarrior | %pomodoro [ %timelogger ] %systray | %date ",
--template="[ %date || load:% %>load || mail:% %>mail_new/%>mail_total ] %filler%systray", --template="[ %date || load:% %>load || mail:% %>mail_new/%>mail_total ] %filler%systray",
--template="[ %date || load: %05load_1min || mail: %02mail_new/%02mail_total ] %filler%systray", --template="[ %date || load: %05load_1min || mail: %02mail_new/%02mail_total ] %filler%systray",
} }

View File

@@ -8,7 +8,7 @@ local task_timer
-- Read the active task -- Read the active task
local function read_task_data () local function read_task_data ()
local f = assert(io.popen("/usr/bin/task statusd limit:1 | head -n 4 | tail -n 1")) local f = assert(io.popen("/usr/bin/task statusd limit:1 | head -n 4 | tail -n 1 | sed 's/\s\+/ /g'"))
local data = f:read("*all") local data = f:read("*all")
f:close() f:close()
return data return data

46
.nvimrc
View File

@@ -11,27 +11,30 @@ Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
" Autocomplete " Autocomplete
Plugin 'Shougo/deoplete.nvim' Plugin 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plugin 'jiangmiao/auto-pairs'
" Plugin 'Valloric/YouCompleteMe'
" Plugin 'Shougo/unite.vim'
" Plugin 'ervandew/supertab' " Plugin 'ervandew/supertab'
" "
Plugin 'terryma/vim-multiple-cursors' Plugin 'terryma/vim-multiple-cursors'
Plugin 'Lokaltog/vim-easymotion' Plugin 'Lokaltog/vim-easymotion'
" Ruby/Rails " Languages
Plugin 'rust-lang/rust.vim'
Plugin 'tpope/vim-rails' Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-rake' Plugin 'tpope/vim-rake'
Plugin 'tpope/vim-bundler' Plugin 'tpope/vim-bundler'
Plugin 'ledger/vim-ledger'
Plugin 'kchmck/vim-coffee-script'
Plugin 'slim-template/vim-slim'
Plugin 'fatih/vim-go'
Plugin 'wavded/vim-stylus'
Plugin 'tpope/vim-haml'
Plugin 'digitaltoad/vim-jade'
Plugin 'Glench/Vim-Jinja2-Syntax'
" Productivity " Productivity
Plugin 'farseer90718/vim-taskwarrior' Plugin 'farseer90718/vim-taskwarrior'
" Money
Plugin 'ledger/vim-ledger'
Plugin 'majutsushi/tagbar' Plugin 'majutsushi/tagbar'
Plugin 'L9' Plugin 'L9'
@@ -48,9 +51,9 @@ Plugin 'vim-scripts/tlib'
" Snippets " Snippets
" Plugin 'garbas/vim-snipmate' " Plugin 'garbas/vim-snipmate'
" Plugin 'honza/vim-snippets'
Plugin 'Shougo/neosnippet' Plugin 'Shougo/neosnippet'
Plugin 'Shougo/neosnippet-snippets' Plugin 'Shougo/neosnippet-snippets'
Plugin 'honza/vim-snippets'
Plugin 'vim-scripts/taglist.vim' Plugin 'vim-scripts/taglist.vim'
@@ -58,15 +61,6 @@ Plugin 'vim-scripts/taglist.vim'
Plugin 'vim-airline/vim-airline' Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes' Plugin 'vim-airline/vim-airline-themes'
" Langs
Plugin 'kchmck/vim-coffee-script'
Plugin 'slim-template/vim-slim'
Plugin 'fatih/vim-go'
Plugin 'wavded/vim-stylus'
Plugin 'tpope/vim-haml'
Plugin 'digitaltoad/vim-jade'
Plugin 'Glench/Vim-Jinja2-Syntax'
" CVS " CVS
Plugin 'phleet/vim-mercenary' Plugin 'phleet/vim-mercenary'
@@ -91,6 +85,7 @@ Plugin 'neomake/neomake'
Plugin 'altercation/vim-colors-solarized' Plugin 'altercation/vim-colors-solarized'
Plugin 'airblade/vim-gitgutter' Plugin 'airblade/vim-gitgutter'
Plugin 'szw/vim-maximizer' Plugin 'szw/vim-maximizer'
Plugin 'kassio/neoterm'
call vundle#end() call vundle#end()
@@ -186,6 +181,8 @@ let g:neosnippet#snippets_directory='~/.config/nvim/bundle/vim-snippets/snippets
autocmd! BufWritePost * Neomake autocmd! BufWritePost * Neomake
autocmd BufUnload,BufWinLeave * lclose autocmd BufUnload,BufWinLeave * lclose
let g:AutoPairsMultilineClose = 0
let g:neomake_ruby_enabled_makers = ['rubocop', 'reek'] let g:neomake_ruby_enabled_makers = ['rubocop', 'reek']
let g:neomake_open_list = 2 let g:neomake_open_list = 2
let g:neomake_list_height = 4 let g:neomake_list_height = 4
@@ -252,6 +249,9 @@ let g:calendar_keys = {'goto_next_month': '<C-Right>',
let g:calendar_monday = 1 let g:calendar_monday = 1
let g:calendar_focus_today = 1 let g:calendar_focus_today = 1
" RustFmt rust
let g:rustfmt_autosave = 1
au BufRead,BufNewFile *.jbuilder setf ruby au BufRead,BufNewFile *.jbuilder setf ruby
au BufRead,BufNewFile *.rabl setf ruby au BufRead,BufNewFile *.rabl setf ruby
au BufRead,BufNewFile *.arb setf ruby au BufRead,BufNewFile *.arb setf ruby
@@ -279,6 +279,12 @@ nnoremap <C-b>n :bn<CR>
nnoremap <C-b>l :bn<CR> nnoremap <C-b>l :bn<CR>
nnoremap <C-b>d :bd<CR> nnoremap <C-b>d :bd<CR>
" Terminal
tnoremap <Esc> <C-\><C-n>
command Term split term://$SHELL
let g:neoterm_autoinsert = 1
let g:neoterm_default_mod = 'rightbelow'
" Vim gitgutter " Vim gitgutter
let g:gitgutter_sign_added = '█' let g:gitgutter_sign_added = '█'
let g:gitgutter_sign_modified = '█' let g:gitgutter_sign_modified = '█'
@@ -364,8 +370,8 @@ set colorcolumn=80,120
set nostartofline " Dont reset cursor to start of line when moving around. set nostartofline " Dont reset cursor to start of line when moving around.
set noeol " Dont add empty newlines at the end of files set noeol " Dont add empty newlines at the end of files
:autocmd InsertEnter * set cul " Show cursor line in insert mode autocmd InsertEnter * set cul " Show cursor line in insert mode
:autocmd InsertLeave * set nocul " Hide cursor line in insert mode autocmd InsertLeave * set nocul " Hide cursor line in insert mode
" Visual " Visual
set showmatch " Show matching brackets. set showmatch " Show matching brackets.

View File

@@ -35,9 +35,6 @@
-- typing them in lower case. -- typing them in lower case.
\set COMP_KEYWORD_CASE upper \set COMP_KEYWORD_CASE upper
-- greeting
\echo '\nWelcome, my magistrate\n'
\set clear '\\! clear;' \set clear '\\! clear;'
--helpful queries --helpful queries

13
.zshrc
View File

@@ -28,10 +28,11 @@ setopt AUTO_CD
# Вопрос на автокоррекцию # Вопрос на автокоррекцию
# SPROMPT='zsh: Исправить '\''%R'\'' на '\''%r'\'' ? [Yes/No/Abort/Edit] ' # SPROMPT='zsh: Исправить '\''%R'\'' на '\''%r'\'' ? [Yes/No/Abort/Edit] '
setopt notify globdots pushdtohome cdablevars autolist # correct setopt notify pushdtohome cdablevars autolist # correct globdots
setopt recexact longlistjobs setopt recexact longlistjobs
setopt autoresume histignoredups pushdsilent noclobber setopt autoresume histignoredups pushdsilent noclobber
setopt autopushd pushdminus rcquotes mailwarning extendedglob setopt autopushd pushdminus rcquotes mailwarning
setopt no_bare_glob_qual no_extended_glob
# End of lines configured by zsh-newuser-install # End of lines configured by zsh-newuser-install
# The following lines were added by compinstall # The following lines were added by compinstall
@@ -83,6 +84,7 @@ autoload -U pick-web-browser
alias -s {html,htm,mht}=pick-web-browser alias -s {html,htm,mht}=pick-web-browser
export LESS="-R" export LESS="-R"
export PAGER="less"
unsetopt nomatch unsetopt nomatch
@@ -130,9 +132,10 @@ esac
# shopt -s extglob; if [[ -z $DISPLAY ]] && ! pgrep X &>/dev/null; then tput setaf 3; tput bold; read -t 5 -p 'Start X? [Y/n] '; tput sgr0; [[ -z $REPLY || $REPLY = [Yy]?([Ee][Ss]) ]] && startx; fi # shopt -s extglob; if [[ -z $DISPLAY ]] && ! pgrep X &>/dev/null; then tput setaf 3; tput bold; read -t 5 -p 'Start X? [Y/n] '; tput sgr0; [[ -z $REPLY || $REPLY = [Yy]?([Ee][Ss]) ]] && startx; fi
export LANGUAGE="en_US:en_GB:en" if [ -d $HOME/.dynamic-colors ]; then
export PATH="$HOME/.dynamic-colors/bin:$PATH" export PATH="$HOME/.dynamic-colors/bin:$PATH"
source $HOME/.dynamic-colors/completions/dynamic-colors.zsh source $HOME/.dynamic-colors/completions/dynamic-colors.zsh
fi
# Load all files from .shell/zshrc.d directory # Load all files from .shell/zshrc.d directory
if [ -d $HOME/.zshrc.d ]; then if [ -d $HOME/.zshrc.d ]; then

View File

@@ -2,11 +2,10 @@
alias sdr="screen -aAdr" alias sdr="screen -aAdr"
alias la="ls -A" alias la="ls -A"
alias ll="ls -lAF" alias ll="ls -lAF"
alias grep='grep --exclude="*.svn*" --exclude="*.git*"'
alias mkpasswd="head -c16 /dev/urandom | xxd -ps" alias mkpasswd="head -c16 /dev/urandom | xxd -ps"
alias mc="mc -b" alias mc="mc -b"
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias less='vimpager' # alias less='vimpager'
if [ -f /usr/bin/grc ]; then if [ -f /usr/bin/grc ]; then
alias ping="grc --colour=auto ping" alias ping="grc --colour=auto ping"
@@ -30,15 +29,22 @@ alias foreman="bundle exec foreman"
alias sidekiq="bundle exec sidekiq" alias sidekiq="bundle exec sidekiq"
alias cap="bundle exec cap" alias cap="bundle exec cap"
alias mina="bundle exec mina" alias mina="bundle exec mina"
alias heroku="$HOME/Soft/heroku-client/bin/heroku"
alias rgrep="grep --exclude-dir=Godeps --exclude-dir=node_modules --exclude-dir=log --exclude-dir=vendor --exclude-dir=tmp --exclude-dir=public --exclude-dir=.git --exclude=.swp -rn"
alias grep="grep --color=auto"
alias wiki="cd ~/wiki && vim index.md"
alias xwiki="cd ~/wiki && xvim index.md"
alias gulp-watch="./node_modules/.bin/gulp watch; notify-send -i error 'Gulp has crashed'" alias rgrep="grep --exclude-dir=Godeps --exclude-dir=node_modules --exclude-dir=log --exclude-dir=vendor --exclude-dir=tmp --exclude-dir=public --exclude-dir=.git --exclude=.swp -rn"
alias grep="grep --exclude-dir=.git --color=auto"
alias wiki="cd $HOME/wiki && vim index.md"
alias xwiki="cd $HOME/wiki && xvim index.md"
alias weather="curl wttr.in/Moscow" alias weather="curl wttr.in/Moscow"
alias ag="ag --path-to-ignore ~/.agignore --nogroup" alias ag="ag --path-to-ignore $HOME/.agignore --nogroup"
alias vim="nvim" alias vim="nvim"
# Typos
alias igt="git" alias igt="git"
alias gti="git" alias gti="git"
alias gitst="git st"
# Ledger
alias ledger="noglob ledger"
alias "bin/ledger"="noglob bin/ledger"

1
.zshrc.d/env.zsh Normal file
View File

@@ -0,0 +1 @@
export TIMELOG=$HOME/.work-ledger/ledger/timelogger.ldg

View File

@@ -1,7 +1,6 @@
# rbenv stuff if [ -d $HOME/.rbenv/bin ] ; then
unset RUBYOPT unset RUBYOPT
PATH=$HOME/.rbenv/bin:$PATH
PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
eval "$(rbenv init -)" source $HOME/.rbenv/completions/rbenv.zsh
fi
source $HOME/.rbenv/completions/rbenv.zsh

3
.zshrc.d/rust.zsh Normal file
View File

@@ -0,0 +1,3 @@
if [ -d $HOME/.cargo/bin ] ; then
PATH=$HOME/.cargo/bin:$PATH
fi