updated vim, i3 and i3blocks

This commit is contained in:
Tristaan
2017-11-17 05:06:28 +01:00
parent 72acf479a3
commit c994b76339
3 changed files with 95 additions and 45 deletions

View File

@@ -1,11 +1,13 @@
# T's desktop v3 # T's desktop v3
exec --no-startup-id xrandr --output HDMI-0 --auto --mode 1920x1080 --primary --dpi 96/HDMI-0 exec --no-startup-id xrandr --output HDMI-0 --auto --mode 1920x1080 --primary --dpi 96/HDMI-0
exec --no-startup-id mplayer -fs ~/.i3/boot.mp4 exec --no-startup-id mplayer -fs ~/.i3/boot.mp4
exec --no-startup-id i3lock -f "xos4 Terminus" -F 40 -X 200 -Y 100 -i '~/Pictures/backgrounds/6a171c_5499051.jpg' exec --no-startup-id xautolock -time 10 -locker ~/.i3/scripts/locker.sh
exec --no-startup-id xautolock -locknow
#DAEMONS #DAEMONS
exec --no-startup-id urxvtd -q exec --no-startup-id urxvtd -q
exec --no-startup-id udiskie -f "urxranger" -t exec --no-startup-id udiskie -f "urxranger" -t
exec --no-startup-id nitrogen --restore exec --no-startup-id nitrogen --restore
exec --no-startup-id compton -G -b
#exec --no-startup-id mpd #exec --no-startup-id mpd
#exec --no-startup-id megasync #exec --no-startup-id megasync
exec --no-startup-id parcellite exec --no-startup-id parcellite

View File

@@ -5,26 +5,36 @@ if has("nvim")
set t_8b=^[[48;2;%lu;%lu;%lum " Ditto set t_8b=^[[48;2;%lu;%lu;%lum " Ditto
set termguicolors set termguicolors
endif endif
set encoding=utf-8
set t_Co=256 set t_Co=256
set t_ut= set t_ut=
"Encoding settings
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8
"Timeout for <esc> and <leader> "Timeout for <esc> and <leader>
set ttimeoutlen=1000 set ttimeoutlen=100
set timeoutlen=800 set timeoutlen=400
set hidden "Multiple buffers set hidden "Multiple buffers
set laststatus=2 "Always show status lines set laststatus=2 "Always show status lines
set number numberwidth=2 " Show line number column set number numberwidth=2 " Show line number column
set relativenumber " Show numbers relative to current position set relativenumber " Show numbers relative to current position
if !&diff
set cursorline set cursorline
endif
set autoindent "Automatic indentation of files set autoindent "Automatic indentation of files
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab "Tab Settings set tabstop=4 softtabstop=4 shiftwidth=4 expandtab "Tab Settings
set nosol set nosol
set fileformats=unix,dos,mac
set showcmd "Show command in status bar set showcmd "Show command in status bar
set showmatch "Show matching brackets set showmatch "Show matching brackets
set noshowmode set noshowmode
"Swap file off
set noswapfile set noswapfile
set wildignore=.svn,CVS,.git,.hg,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif set wildignore=.svn,CVS,.git,.hg,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif
set incsearch " Incremental search set incsearch " Incremental search
set hlsearch " Highlight search match set hlsearch " Highlight search match
@@ -36,6 +46,54 @@ if has("mouse")
endif endif
set mousehide " Hide mouse pointer on insert mode." set mousehide " Hide mouse pointer on insert mode."
"MAPPINGS
set pastetoggle=<F2>
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\. synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\. synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
nnoremap <F5> :Denite buffer<CR>
nnoremap <F6> :Startify<CR>
"Mappings to reduce keypresses
let mapleader=" "
imap jk <esc>
nnoremap <leader>w <C-w>
nnoremap <leader>f :<C-u>:VimFilerExplorer<CR>
nnoremap <leader>l :bnext<CR>
nnoremap <leader>h :bprevious<CR>
nnoremap <leader>c :Bdelete<CR>
nnoremap <leader>r :make<CR>
nnoremap <leader>ad :ArduinoUploadAndSerial<CR>
nnoremap <leader>as :ArduinoSerial<CR>
nnoremap <leader>ab :ArduinoChooseBoard<CR>
nnoremap <leader>ap :ArduinoChoosePort<CR>
nnoremap <Left> :bprev<CR>
nnoremap <Right> :bnext<CR>
" Set working dir
nnoremap <leader>. :lcd %:p:h<CR>
" Session management
nnoremap <leader>so :OpenSession<Space>
nnoremap <leader>ss :SaveSession<Space>
nnoremap <leader>sd :DeleteSession<CR>
nnoremap <leader>sc :CloseSession<CR>
"Git maps
noremap <Leader>gs :Gstatus<CR>
noremap <Leader>ga :Gwrite<CR>
noremap <Leader>gc :Gcommit<CR>
noremap <Leader>gsh :Gpush<CR>
noremap <Leader>gb :Gblame<CR>
noremap <Leader>gr :Gremove<CR>
noremap <Leader>gll :Gpull<CR>
noremap <Leader>gd :Gvdiff<CR>
" Split
noremap <Leader>b :<C-u>split<CR>
noremap <Leader>v :<C-u>vsplit<CR>
"Plugins
filetype off filetype off
set rtp+=~/.vim/bundle/Vundle.vim set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
@@ -53,10 +111,12 @@ Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-repeat' Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-endwise' Plugin 'tpope/vim-endwise'
Plugin 'moll/vim-bbye' Plugin 'moll/vim-bbye'
Plugin 'stevearc/vim-arduino' Plugin 'w0rp/ale'
Plugin 'Shougo/deoplete.nvim' Plugin 'Shougo/deoplete.nvim'
Plugin 'fishbullet/deoplete-ruby' Plugin 'fishbullet/deoplete-ruby'
Plugin 'Shougo/deoplete-rct' Plugin 'Shougo/deoplete-rct'
Plugin 'editorconfig/editorconfig-vim'
"GIT "GIT
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter' Plugin 'airblade/vim-gitgutter'
@@ -66,6 +126,8 @@ Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-bundler' Plugin 'tpope/vim-bundler'
Plugin 'tpope/vim-rake' Plugin 'tpope/vim-rake'
"Javascript
" EMMET - HTML autocompletions " EMMET - HTML autocompletions
Plugin 'mattn/emmet-vim' Plugin 'mattn/emmet-vim'
@@ -86,6 +148,12 @@ syntax enable
colorscheme smooth colorscheme smooth
set omnifunc=syntaxcomplete#Complete set omnifunc=syntaxcomplete#Complete
"VIM SESSIONS
let g:session_directory = "~/.vim/session"
let g:session_autoload = "no"
let g:session_autosave = "no"
let g:session_command_aliases = 1
"VIMFILER "VIMFILER
let g:vimfiler_as_default_explorer = 1 let g:vimfiler_as_default_explorer = 1
@@ -93,6 +161,10 @@ let g:vimfiler_as_default_explorer = 1
let g:user_emmet_install_global = 0 let g:user_emmet_install_global = 0
let g:user_emmet_expandabbr_key = '<C-e>' let g:user_emmet_expandabbr_key = '<C-e>'
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
"
"POLYGLOT
"let g:polyglot_disabled = ['css', 'html', 'javascript']
let g:vue_disable_pre_processors=1
"ARDUINO "ARDUINO
let g:arduino_dir = '/usr/share/arduino' let g:arduino_dir = '/usr/share/arduino'
"STARTIFY "STARTIFY
@@ -225,41 +297,6 @@ function! LightlineMode()
return winwidth(0) > 60 ? lightline#mode() : '' return winwidth(0) > 60 ? lightline#mode() : ''
endfunction endfunction
"MAPPINGS
set pastetoggle=<F2>
let mapleader=" "
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
nnoremap <F5> :Denite buffer<CR>
nnoremap <F6> :Startify<CR>
"noremap j h
"noremap k j
"noremap l k
"noremap č l
"Mappings to reduce keypresses
nnoremap \ <C-w>
imap jk <esc>
imap <tab><tab> <c-x><c-o>
nnoremap <leader>f :<C-u>:VimFilerExplorer<CR>
nnoremap <leader>l :bnext<CR>
nnoremap <leader>h :bprevious<CR>
nnoremap <leader>c :Bdelete<CR>
nnoremap <leader>r :make<CR>
nnoremap <leader>ad :ArduinoUploadAndSerial<CR>
nnoremap <leader>as :ArduinoSerial<CR>
nnoremap <leader>ab :ArduinoChooseBoard<CR>
nnoremap <leader>ap :ArduinoChoosePort<CR>
nnoremap <Left> :bprev<CR>
nnoremap <Right> :bnext<CR>
nnoremap <leader>gp <Plug>GitGutterPreviewHunk
nnoremap <leader>gr <Plug>GitGutterUndoHunk:echomsg ' hr is deprecated. Use hu'<CR>
nnoremap <leader>gu <Plug>GitGutterUndoHunk
nnoremap <leader>gs <Plug>GitGutterStageHunk
"OMNICOMPLETE "OMNICOMPLETE
"FUNCTIONS "FUNCTIONS
function! PythonInit() function! PythonInit()
@@ -278,12 +315,18 @@ augroup END
augroup filetypes augroup filetypes
au! au!
au FileType eruby let b:surround_45 = "<%= \r %>" au FileType eruby let b:surround_45 = "<%= \r %>"
au FileType html,css,eruby EmmetInstall "au FileType html,css,eruby EmmetInstall
augroup END
augroup Vuefix
au!
au BufRead,BufNewFile *.vue setlocal filetype=vue
au Filetype vue syntax sync fromstart
augroup END augroup END
augroup newfiles augroup newfiles
au! au!
au BufWritePre * %s/\s\+$//e au BufWritePre * %s/\s\+$//e
au! BufRead,BufNewFile *.m,*.oct set filetype=octave au BufRead,BufNewFile *.m,*.oct set filetype=octave
au BufNewFile,BufRead *.py call PythonInit() au BufNewFile,BufRead *.py call PythonInit()
augroup END augroup END

View File

@@ -17,15 +17,20 @@ do
makepkg -sri makepkg -sri
cd .. cd ..
rm package-query* yaourt* rm package-query* yaourt*
sudo yaourt -S zsh zsh-syntax-highlighting i3blocks neovim i3-wm i3lock-color-git ctags
symlink_dotfiles() symlink_dotfiles()
sudo yaourt -S zsh zsh-syntax-highlighting i3blocks neovim i3-wm i3lock-color-git ctags elif [[ $var == "-i" ]]; then
sudo yaourt -S megasync zsh zsh-syntax-highlighting i3blocks neovim i3-wm i3lock-color-git ctags
fi
if [[ $var == "-r" ]]; then
fi fi
done done
function symlink_dotfiles { function symlink_dotfiles {
ln -s .i3 $HOME/.i3 ln -s .i3 $HOME/.config/i3
ln -s .vim $HOME/.config/nvim ln -s .vim $HOME/.config/nvim
ln -s .Xresources $HOME/.Xresources ln -s .Xresources $HOME/.Xresources
ln -s .dmrc $HOME/.dmrc ln -s .dmrc $HOME/.dmrc