dgy
/
hexagons
Archived
1
0
Fork 0

requilombo en neovim, para variar. si igual nunca lo uso. ah, y mejores colores

This commit is contained in:
deadguy 2018-08-28 13:13:36 -03:00
parent 6a04d40b98
commit f6b661a1cc
15 changed files with 281 additions and 116 deletions

View File

@ -4,20 +4,20 @@
*.cursorColor: #d3d7cf
! black
*.color0: #181818
*.color8: #333333
*.color0: #1b1b1b
*.color8: #555555
! red
*.color1: #cc4444
*.color9: #cc4444
*.color1: #cc241d
*.color9: #fb4934
! green
*.color2: #5ab738
*.color10: #5ab738
*.color2: #98971a
*.color10: #b8bb26
! yellow
*.color3: #f69f3e
*.color11: #e0ed21
*.color3: #d79921
*.color11: #fabd2f
! blue
*.color4: #407ee7

View File

@ -44,8 +44,10 @@ get_xrdb() {
xrdb -merge "${HOME}/.Xresources"
# Colores
bspc config normal_border_color "$(get_xrdb color0)"
bspc config focused_border_color "$(get_xrdb color3)"
bspc config normal_border_color "$(get_xrdb color0)"
bspc config focused_border_color "$(get_xrdb color3)"
bspc config active_border_color "$(get_xrdb color8)"
bspc config presel_feedback_color "$(get_xrdb color6)"
bspc config border_width $b_width
# Flotantes
@ -73,7 +75,7 @@ bspc rule -a Zathura state=tiled
bspc rule -a Oblogout layer=above
bspc config external_rules_command "$HOME/.config/bspwm/external_rules.sh"
bbspwm &
rbspwm &
# shellcheck source=/dev/null
. "$HOME/.config/bspwm/autostart"

View File

@ -4,8 +4,8 @@ LocationMode=path-bar
ShowHidden=false
ExpandFolders=false
ShowSizeColumn=true
GeometryX=209
GeometryY=75
GeometryX=207
GeometryY=73
GeometryWidth=948
GeometryHeight=618
SortColumn=modified

View File

@ -17,6 +17,6 @@ COLORS=dark
# get built or that are provided by another package.
#
# For Arch Linux, some examples are given below.
IGNORE=(hp_wmi nouveau nvidia vboxdrv vboxnetflt vboxnetadp vboxpci lirc_dev lirc_i2c
IGNORE=(uvcvideo hp_wmi nouveau nvidia vboxdrv vboxnetflt vboxnetadp vboxpci lirc_dev lirc_i2c
osscore oss_hdaudio oss_usb tp_smapi thinkpad_ec
zavl znvpair zunicode zcommon zpios zfs spl splat firewire-core)

View File

@ -11,15 +11,30 @@ setlocal formatoptions+=croq
setlocal omnifunc=pythoncomplete#Complete
setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class,with
let g:LanguageClient_autoStart = 1
augroup pystuff
autocmd!
autocmd BufEnter call ncm2#enable_for_buffer()
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
augroup END
nnoremap <buffer> <localleader>y :0,$!yapf<Cr>
nnoremap <buffer> <localleader>c I#<esc>
let g:ale_sign_column_always = 1
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
let g:ale_sign_error = '× '
let g:ale_sign_error = '✖︎ '
let g:ale_sign_warning = '> '
highlight ALEErrorSign ctermbg=234 ctermfg=magenta
let g:ale_python_mypy_options = "--ignore-missing-imports"
let g:ale_python_pylint_options = "--disable=C"
let g:ale_python_flake8_options = "--ignore=E221"
let g:move_key_modifier = 'N'
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
" Check Python files with flake8 and pylint.
let b:ale_linters = ['flake8', 'pylint']

View File

@ -30,16 +30,71 @@ let g:vimtex_view_method = 'zathura'
let g:vimtex_quickfix_mode = 0 " do not open the quickfix window automatically
" deoplete completion for LaTeX
if !exists('g:deoplete#omni#input_patterns')
let g:deoplete#omni#input_patterns = {}
endif
let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete
"if !exists('g:deoplete#omni#input_patterns')
" let g:deoplete#omni#input_patterns = {}
"endif
"let g:deoplete#omni#input_patterns.tex = g:vimtex#re#deoplete
augroup texsave
autocmd!
autocmd CursorHold,CursorHoldI * silent! wall
augroup END
au InsertEnter call ncm2#enable_for_buffer()
au Filetype tex call ncm2#register_source({
\ 'name' : 'vimtex-cmds',
\ 'priority': 8,
\ 'complete_length': -1,
\ 'scope': ['tex'],
\ 'matcher': {'name': 'prefix', 'key': 'word'},
\ 'word_pattern': '\w+',
\ 'complete_pattern': g:vimtex#re#ncm2#cmds,
\ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'],
\ })
au Filetype tex call ncm2#register_source({
\ 'name' : 'vimtex-labels',
\ 'priority': 8,
\ 'complete_length': -1,
\ 'scope': ['tex'],
\ 'matcher': {'name': 'combine',
\ 'matchers': [
\ {'name': 'substr', 'key': 'word'},
\ {'name': 'substr', 'key': 'menu'},
\ ]},
\ 'word_pattern': '\w+',
\ 'complete_pattern': g:vimtex#re#ncm2#labels,
\ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'],
\ })
au Filetype tex call ncm2#register_source({
\ 'name' : 'vimtex-files',
\ 'priority': 8,
\ 'complete_length': -1,
\ 'scope': ['tex'],
\ 'matcher': {'name': 'combine',
\ 'matchers': [
\ {'name': 'abbrfuzzy', 'key': 'word'},
\ {'name': 'abbrfuzzy', 'key': 'abbr'},
\ ]},
\ 'word_pattern': '\w+',
\ 'complete_pattern': g:vimtex#re#ncm2#files,
\ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'],
\ })
au Filetype tex call ncm2#register_source({
\ 'name' : 'bibtex',
\ 'priority': 8,
\ 'complete_length': -1,
\ 'scope': ['tex'],
\ 'matcher': {'name': 'combine',
\ 'matchers': [
\ {'name': 'prefix', 'key': 'word'},
\ {'name': 'abbrfuzzy', 'key': 'abbr'},
\ {'name': 'abbrfuzzy', 'key': 'menu'},
\ ]},
\ 'word_pattern': '\w+',
\ 'complete_pattern': g:vimtex#re#ncm2#bibtex,
\ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifunc'],
\ })
"command Compile normal! :52 split <cr><c-w>j:terminal latexmk %<CR>G
iab enum \begin{enumerate}<CR>\item{}<CR>\end{enumerate}<esc>k0f{a

View File

@ -24,23 +24,30 @@ endif
" Plugins {{{
call plug#begin('~/.config/nvim/plugged')
Plug 'junegunn/vim-plug'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'jiangmiao/auto-pairs'
Plug 'zchee/deoplete-jedi'
Plug 'w0rp/ale', { 'for': ['python', 'bash', 'dash', 'zsh'] }
Plug 'w0rp/ale'
Plug 'sbdchd/neoformat'
Plug 'lervag/vimtex', { 'for': 'tex' }
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'supercollider/scvim'
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeFind', 'NERDTreeToggle'] }
Plug 'christoomey/vim-tmux-navigator'
Plug 'lervag/vimtex', { 'for': ['tex'] }
Plug 'plasticboy/vim-markdown', { 'for': ['markdown'] }
Plug 'zefei/vim-wintabs'
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'chrisbra/vim-diff-enhanced'
Plug '/usr/bin/fzf'
Plug 'junegunn/fzf.vim'
Plug 'coddingtonbear/neomake-platformio', { 'do': ':UpdateRemotePlugins' }
Plug 'jalvesaq/vimcmdline'
Plug 'supercollider/scvim'
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'NLKNguyen/papercolor-theme'
Plug 'zefei/vim-wintabs'
Plug 'jiangmiao/auto-pairs'
Plug 'chrisbra/vim-diff-enhanced'
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
Plug 'hkupty/iron.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'roxma/nvim-yarp'
Plug 'ncm2/ncm2'
Plug 'ncm2/ncm2-jedi'
Plug 'ncm2/ncm2-match-highlight'
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
call plug#end()
let g:plug_window = 'rightbelow topleft new'
@ -52,8 +59,6 @@ let g:plug_window = 'rightbelow topleft new'
" - :b lets you autocomplete any open buffer
set path+=**
"set guicursor=n-i-ve:hor,v-r:block,a:blinkon0
set binary
set clipboard^=unnamedplus " system clipboard (requires +clipboard)
set encoding=utf-8 " The encoding displayed.
@ -68,7 +73,7 @@ set breakindent
set textwidth=120 " Text width is 120 characters
set cmdheight=1 " Command line height
set cmdwinheight=5 " Command-line lines
set pumheight=10 " Completion window max size
set pumheight=20 " Completion window max size
set helpheight=12 " Minimum help window height
set previewheight=12 " Completion preview height
set noswapfile " New buffers will be loaded without creating a swapfile
@ -99,6 +104,7 @@ set foldenable " Fold by default
set foldlevelstart=10
set foldnestmax=10 " Deepest fold is 10 levels
set foldmethod=marker " Markers are used to specify folds.
set completeopt=noinsert,menuone,noselect
set completeopt-=preview " Don't show preview scratch buffers
set noexpandtab " Do not turn tabs into spaces
set tabstop=4 " Number of spaces a <Tab> equals
@ -161,13 +167,25 @@ if executable('rg')
set grepformat=%f:%l:%c:%m,%f:%l:%m
endif
colorscheme turtles
highlight MatchParen cterm=bold ctermbg=none ctermfg=9
highlight TermCursor ctermfg=green guifg=green
highlight DiffAdd ctermbg=2
highlight DiffDelete ctermbg=1
highlight DiffChange ctermbg=238
highlight DiffChange ctermbg=242
"highlight MatchParen cterm=bold ctermbg=none ctermfg=9
"highlight TermCursor ctermfg=green guifg=green
"highlight DiffAdd ctermbg=2
"highlight DiffDelete ctermbg=1
"highlight DiffChange ctermbg=238
"highlight DiffChange ctermbg=242
" }}}
" Papercolor {{{
set background=dark
let g:PaperColor_Theme_Options = {
\ 'theme': {
\ 'default.dark': {
\ 'transparent_background': 1,
\ 'allow_italic': 1
\ }
\ }
\ }
colorscheme PaperColor
" }}}
" Statusline {{{
@ -180,7 +198,7 @@ function! StatuslineGit()
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
endfunction
function! PasteForStatusline()
function! HasPaste()
let paste_status = &paste
if paste_status == 1
return " [paste] "
@ -202,20 +220,18 @@ function! LinterStatus() abort
\)
endfunction
set statusline=
set statusline+=%#Keyword#
set statusline+=%{winnr()}
set statusline+=%#SpecialKey#
set statusline+=\ %{StatuslineGit()}
set statusline+=%{StatuslineGit()}
set statusline+=%#CursorLineNr#
set statusline+=\ %{LinterStatus()}
set statusline+=\ %{PasteForStatusline()}
set statusline+=\ %h%r%w%q
set statusline+=\ %{HasPaste()}
set statusline+=\ %F%h%r%w%q
set statusline+=%=
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
set statusline+=\ [%{&fileformat}\]
set statusline+=\ %l:%c\ (%p%%)
set statusline+=
set statusline+=%#Keyword#
set statusline+=\ %{winnr()}
" }}}
" AutoCommands {{{
@ -228,8 +244,18 @@ if !exists("autocommands_loaded") && has("autocmd")
" Disables automatic commenting on newline
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
autocmd BufWinEnter,WinEnter term://* startinsert
autocmd BufLeave term://* stopinsert
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
aug terminal_stuff
au BufWinEnter,WinEnter term://* startinsert
au BufEnter * if &buftype == 'terminal' | setlocal statusline=%{b:term_title}
au BufLeave term://* stopinsert
au TermOpen * setlocal nonumber norelativenumber
au TermOpen * setlocal statusline=%{b:term_title}
aug END
autocmd FileType fzf set noshowmode noruler
\| autocmd BufLeave <buffer> set showmode ruler
" Automatic syntax highlighting for files
aug set_file_types
@ -272,13 +298,9 @@ let g:netrw_winsize=25
" }}}
" {{{ Ale
let g:ale_set_highlights = 0
let g:ale_fixers = { 'python': 'autopep8' }
let g:ale_python_mypy_options = "--ignore-missing-imports"
let g:ale_python_pylint_options = "--disable=C"
let g:ale_python_flake8_options = "--ignore=E221"
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
"let g:ale_set_highlights = 0
"let g:ale_echo_msg_error_str = 'E'
"let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s% (code)% [%severity%]'
let g:ale_statusline_format = ['⨉ %d', '⚠ %d', '⬥ ok']
let g:ale_lint_delay = 500 " relint max once per [amount] milliseconds
@ -288,21 +310,23 @@ hi ALEErrorSign ctermfg=red ctermbg=none
hi ALEWarningSign ctermfg=yellow ctermbg=none
" }}}
" Deoplete {{{
let g:deoplete#enable_at_startup = 1
set completeopt-=preview
call deoplete#custom#option('max_list', 100000)
call deoplete#custom#option('min_pattern_length', 2)
if !exists('g:deoplete#omni#input_patterns')
let g:deoplete#omni#input_patterns = {}
endif
let g:deoplete#sources#jedi#server_timeout = 120
let g:deoplete#sources#jedi#show_docstring = 1
let g:deoplete#enable_ignore_case = 1
let g:deoplete#enable_smart_case = 1
let g:context_filetype#same_filetypes = {}
let g:context_filetype#same_filetypes._ = '_'
"}}}
" Iron {{{
nnoremap <leader>ir :IronRepl<CR>
let g:iron_repl_open_cmd = 'vsplit'
let g:iron_map_defaults = 0
nmap + <S-v><Plug>(iron-send-motion)
vmap + <Plug>(iron-send-motion)
nmap rr <Plug>(iron-repeat-cmd)
" }}}
" LSP {{{
let g:LanguageClient_serverCommands = {
\ 'python': ['/usr/bin/pyls'],
\ }
call ncm2#override_source('LanguageClient_python', {'enable': 0})
" }}}
" Wintabs {{{
let g:wintabs_ui_active_higroup = 'TabLineSel'
@ -404,8 +428,8 @@ autocmd! User GoyoLeave call <SID>goyo_leave()
" }}}
" Fzf {{{
" use bottom positioned 20% height bottom split
let g:fzf_layout = { 'down': '~20%' }
" use bottom positioned 30% height bottom split
let g:fzf_layout = { 'down': '~30%' }
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-s': 'split',
@ -431,6 +455,9 @@ command! -bang -nargs=* Rg
\ : fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'right:50%:hidden', '?'),
\ <bang>0)
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
" only use FZF shortcuts in non diff-mode
if !&diff
nnoremap <C-p> :Files<Cr>
@ -444,10 +471,11 @@ nnoremap <leader>R :call <SID>ranger()<CR>
nnoremap <silent> <F2> :NERDTreeToggle<CR>
nnoremap <silent> <F3> :NERDTreeFind<CR>
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
map <F6> :setlocal spell! spelllang=es<CR>
map <F7> :setlocal spell! spelllang=en<CR>
map <F8> :!w<Enter>:!pdflatex <C-r>%<Enter>
map <F9> :set nospell<CR>
map <F8> :set nospell<CR>
map <F9> :!w<Enter>:!pdflatex <C-r>%<Enter>
nmap <silent> <F10> <Plug>(ale_previous_wrap)
nmap <silent> <F11> <Plug>(ale_next_wrap)
@ -470,6 +498,10 @@ nnoremap <C-b> :Buffers<CR>
nnoremap <Space>' :'{,'}s/\<<C-r>=expand("<cword>")<CR>\>/
nnoremap <Space>¿ :%s/\<<C-r>=expand("<cword>")<CR>\>/
" Visual mode pressing * or # searches for the current selection
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
" Learn vim keys the hard way
nnoremap <silent> <Left> :vertical resize -2<CR>
nnoremap <silent> <Right> :vertical resize +2<CR>
@ -478,9 +510,16 @@ nnoremap <silent> <Down> :resize +1<CR>
inoremap jk <esc>
cnoremap jk <C-c>
" edit and source config file
nnoremap <silent> <leader>ev :vsplit $MYVIMRC<CR>
nnoremap <silent> <leader>sv :source $MYVIMRC<CR>
" fast saves
nnoremap <leader>w :w!<CR>
" exit quickly
nnoremap <leader>q :q!<CR>
nnoremap <leader>T :terminal<CR>
nnoremap <leader>s :split<CR>
nnoremap <leader>v :vsplit<CR>
@ -506,8 +545,15 @@ inoremap <c-d> <esc>ddi
inoremap <m-u> <esc>viwUi
nnoremap <m-u> viwU
" Quotes
nnoremap <leader>" viw<esc>a"<esc>bi"<esc>lel
" Quote words under cursor
nnoremap <leader>" viW<esc>a"<esc>gvo<esc>i"<esc>gvo<esc>3l
nnoremap <leader>' viW<esc>a'<esc>gvo<esc>i'<esc>gvo<esc>3l
" Move a line of text using Shift+[jk]
nnoremap <S-j> mz:m+<cr>`z
nnoremap <S-k> mz:m-2<cr>`z
vnoremap <S-j> :m'>+<cr>`<my`>mzgv`yo`z
vnoremap <S-k> :m'<-2<cr>`>my`<mzgv`yo`z
" Unhighlight search terms
nnoremap <silent> <leader><space> :noh<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
@ -525,8 +571,8 @@ vnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
" Use tab for indenting
vnoremap <Tab> >gv|
vnoremap <S-Tab> <gv
nnoremap <Tab> >gv|
nnoremap <S-Tab> <gv
nnoremap <Tab> v>gv|
nnoremap <S-Tab> v<gv
noremap <silent> <Home> g<Home>
noremap <silent> <End> g<End>
@ -537,6 +583,7 @@ nnoremap L $
vnoremap H 0
vnoremap L $
noremap Y 0y$
noremap <leader>y y$
" Center screen when jumping and moving
nnoremap <silent> n :norm! nzz<CR>
@ -545,10 +592,10 @@ vnoremap <silent> n :norm! nzz<CR>
vnoremap <silent> N :norm! Nzz<CR>
" Tabs
nnoremap <C-Tab> :tabnew<CR>
nnoremap <M-Tab> <Plug>(wintabs_close)<CR>
nnoremap <Tab> <Plug>(wintabs_next)<CR>
nnoremap <S-Tab> <Plug>(wintabs_previous)<CR>
nnoremap <silent> <C-,> :bnew<CR>
nnoremap <silent> <M-,> :WintabsClose<CR>
nnoremap <silent> <C-l> :WintabsNext<CR>
nnoremap <silent> <C-h> :WintabsPrevious<CR>
" Alt to switch windows
nnoremap <M-j> <C-W><C-J>
@ -560,6 +607,18 @@ inoremap <A-j> <Esc><C-w>j
inoremap <A-k> <Esc><C-w>k
inoremap <A-l> <Esc><C-w>l
" CTRL-C doesn't trigger the InsertLeave autocmd . map to <ESC> instead.
inoremap <c-c> <ESC>
" When the <Enter> key is pressed while the popup menu is visible, it only
" hides the menu. Use this mapping to close the menu and also start a new
" line.
inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
" Use <TAB> to select the popup menu:
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Terminal movement
tnoremap <Esc> <C-\><C-n>
tnoremap <M-h> <C-\><C-n><C-w>h
@ -587,6 +646,48 @@ endif
" }}}
" Stuff i'll probably use if i remember to {{{
" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum)
buffer #
else
bnext
endif
if bufnr("%") == l:currentBufNum
new
endif
if buflisted(l:currentBufNum)
execute("bdelete! ".l:currentBufNum)
endif
endfunction
function! CmdLine(str)
call feedkeys(":" . a:str)
endfunction
function! VisualSelection(direction, extra_filter) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", "\\/.*'$^~[]")
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'gv'
call CmdLine("Ack '" . l:pattern . "' " )
elseif a:direction == 'replace'
call CmdLine("%s" . '/'. l:pattern . '/')
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
" global replace
vnoremap <Leader>sw "hy
\ :let b:sub = input('global replacement: ') <Bar>

View File

@ -41,19 +41,19 @@ background = #080808
# black
color0 = #1b1b1b
color8 = #333333
color8 = #555555
# red
color1 = #cc241d
color9 = #cc4444
color9 = #fb4934
# green
color2 = #7b8748
color10 = #23e298
color2 = #98971a
color10 = #b8bb26
# yellow
color3 = #d0a843
color11 = #e0ed21
color3 = #d79921
color11 = #fabd2f
# blue
color4 = #407ee7

View File

@ -45,4 +45,4 @@ setopt complete_in_word
setopt list_types
HELPDIR=/usr/share/zsh/$ZSH_VERSION/help
WORDCHARS=${WORDCHARS//\/[&.;]}
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'

View File

@ -22,6 +22,8 @@ alias sr='sr -browser=$CLIBROWSER' # open in cli browser
alias surfraw='surfraw -browser=$BROWSER' # open in gui browser
alias foxy='FoxDot & disown'
alias bm='bashmount'
alias kat='cat'
alias cat='bat'
# MAXIMUM VERBOSITY YIELDS MAXIMUM RESULTS
alias chmod='chmod -v'
@ -37,6 +39,7 @@ alias mount='mount -v | column -t'
alias umount='umount -v'
# Con opciones por defecto
alias find='fd -H --color=always'
alias ncdu='ncdu --color dark -rr -x --exclude .git'
alias rg='rg -p'
alias ytdl='youtube-dl -ic'

View File

@ -112,19 +112,6 @@ bindkey "^L" tmux-clear-screen
# }}}
# Bunch of one liners {{{
# colorized cat
function cot() {
for file in "$@"
do
pygmentize -O style=monokai -f console256 -g "$file"
done
}
# colorized less
function lass() {
pygmentize -O style=monokai -f console256 -g $1 | less -r
}
# Take a screenshot
shot() { maim -d 5 -q -u ~/Pictures/scrot/$(date +%s).png && notify-send 'Screen captured' ;}

View File

@ -1,15 +1,16 @@
export FZF_DEFAULT_OPTS='
--extended
--height 60%
--reverse
--ansi
--inline-info
--preview-window wrap
--color fg:-1,bg:-1,hl:33,fg+:254,bg+:235,hl+:33
--color info:136,prompt:136,pointer:230,marker:230,spinner:166
'
export FZF_COMPLETION_OPTS='+c -x'
if type rg &>/dev/null; then
export FZF_DEFAULT_COMMAND='rg --follow --hidden --files --ignore-file ~/.agignore 2> /dev/null'
export FZF_DEFAULT_COMMAND='rg --follow --hidden --files --glob "!.git/*" --glob "!node_modules/*" --ignore-file ~/.agignore 2> /dev/null'
elif type ag &>/dev/null; then
export FZF_DEFAULT_COMMAND='ag -f -g "" --hidden --depth 16 --ignore dosdevices 2> /dev/null'
fi
@ -24,9 +25,10 @@ _fzf_compgen_dir() {
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="bfs -type d -nohidden"
export FZF_CTRL_T_OPTS="--select-1 --exit-0 --preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
export FZF_CTRL_T_OPTS="--select-1 --exit-0 --preview '(highlight -O ansi -l {} || bat --color \"always\" {} || tree -C {}) 2> /dev/null | head -200'"
export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'"
export FZF_ALT_C_OPTS="--select-1 --exit-0 --preview 'tree -C {} | head -200'"
export FZF_VIM_LOG=$(git config --get alias.l | awk '{$1=""; print $0;}' | tr -d '\r')
command -v tree > /dev/null && export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -$LINES'"

View File

@ -96,10 +96,10 @@ abstracts = {
prompt = " %y└──┄┄╼%n ";
sb = "%N$*%N ";
sbmode = "%b(%w+%N$*%b)%n";
sbaway = "%b(%Naway%b)%N";
sbservertag = "%b:%N$0%b(%N^X%b)";
sbnickmode = "%w$0%N$1";
sbmode = " ";
sbaway = " ";
sbservertag = " ";
sbnickmode = " ";
sb_act_msg = "%Y$*";
sb_act_hilight = "%M$*";

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
FOLDER="$HOME/bin"
FILE="$FOLDER/$1"
@ -6,7 +6,7 @@ FILE="$FOLDER/$1"
if [[ -f $FILE ]]; then
echo -e "There's a file called that already..."
else
echo -e "#!/bin/bash\\n\\n" > "$FILE"
echo -e "#!/usr/bin/env bash\\n\\n" > "$FILE"
chmod +x "$FILE"
$EDITOR "$FILE"
fi

View File

@ -37,7 +37,7 @@ pulse() {
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
-i :0.0 \
-r 30 \
-c:v libx264 -qp 0 -r 30 -c:a aac -b:a 128k "$filename"
-c:v libx264rgb -crf 0 -preset ultrafast -c:a aac -b:a 128k "$filename"
}
param() {