un monton de cambios chicos y no tan chicos, justo antes de flashparty
This commit is contained in:
parent
980b988fb5
commit
fc8154d175
63
.Xresources
63
.Xresources
|
@ -35,37 +35,38 @@
|
|||
*.color7: #9a9a9a
|
||||
*.color15: #e6e6e6
|
||||
|
||||
URxvt.font: xft:sarasatermj:size=10
|
||||
!URxvt.font: -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
|
||||
URxvt.perl-ext-common: default,clipboard,url-select
|
||||
URxvt.urlLauncher: /usr/bin/firefox -new-tab
|
||||
URxvt.url-select.launcher: /usr/bin/firefox -new-tab
|
||||
URxvt.url-select.underline: true
|
||||
URxvt.urlButton: 1
|
||||
URxvt.colorUL: #4682B4
|
||||
URxvt.lineSpace: 0
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
URxvt.secondaryWheel: 1
|
||||
URxvt.print-pipe: "cat > /dev/null"
|
||||
URxvt.keysym.M-c: perl:clipboard:copy
|
||||
URxvt.keysym.M-v: perl:clipboard:paste
|
||||
URxvt.keysym.M-u: perl:url-select:select_next
|
||||
URxvt.intensityStyles: false
|
||||
URxvt*internalBorder: 12
|
||||
URxvt*externalBorder: 0
|
||||
URxvt*scrollBar: false
|
||||
URxvt*scrollBar_right: false
|
||||
URxvt*letterSpace: 0
|
||||
URxvt*depth: 32
|
||||
URxvt*saveline: 0
|
||||
URxvt*scrollTtyOutput: false
|
||||
URxvt*scrollWithBuffer: true
|
||||
URxvt*scrollTtyKeypress: true
|
||||
URxvt*iso14755: false
|
||||
URxvt*iso14755_52: false
|
||||
URxvt*dynamicColors: on
|
||||
URxvt*cutchars: "\"()*,<>[]{}|\'"
|
||||
URxvt.font: xft:sarasatermj:size=10
|
||||
!URxvt.font: -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
|
||||
URxvt.perl-ext-common: default,clipboard,url-select
|
||||
URxvt.urlLauncher: /usr/bin/firefox -new-tab
|
||||
URxvt.url-select.launcher: /usr/bin/firefox -new-tab
|
||||
URxvt.url-select.underline: true
|
||||
URxvt.urlButton: 1
|
||||
URxvt.colorUL: #4682B4
|
||||
URxvt.lineSpace: 0
|
||||
URxvt.secondaryScreen: 1
|
||||
URxvt.secondaryScroll: 0
|
||||
URxvt.secondaryWheel: 1
|
||||
URxvt.print-pipe: "cat > /dev/null"
|
||||
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
|
||||
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
|
||||
URxvt.keysym.M-u: perl:url-select:select_next
|
||||
URxvt.clipboard.autocopy: true
|
||||
URxvt.intensityStyles: false
|
||||
URxvt*internalBorder: 12
|
||||
URxvt*externalBorder: 0
|
||||
URxvt*scrollBar: false
|
||||
URxvt*scrollBar_right: false
|
||||
URxvt*letterSpace: 0
|
||||
URxvt*depth: 32
|
||||
URxvt*saveline: 0
|
||||
URxvt*scrollTtyOutput: false
|
||||
URxvt*scrollWithBuffer: true
|
||||
URxvt*scrollTtyKeypress: true
|
||||
URxvt*iso14755: false
|
||||
URxvt*iso14755_52: false
|
||||
URxvt*dynamicColors: on
|
||||
URxvt*cutchars: "\"()*,<>[]{}|\'"
|
||||
|
||||
! esto afecta a pd-l2ork y otras cosas, guarda
|
||||
Xft.autohint: 0
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
hsetroot -fill /home/deadguy/Pictures/wallpaper/dAMMwdO.png &
|
||||
xsetroot -cursor_name left_ptr &
|
||||
#~/.config/polybar/launch.sh &
|
||||
compton -b &
|
||||
# redshift -c ~/.config/redshift/redshift.conf &
|
||||
dunst -conf ~/.config/dunst/dunstrc &
|
||||
sleep 1s
|
||||
mpd &
|
||||
unclutter &
|
||||
#xss-lock -- exeflock4 &
|
||||
xfce4-power-manager &
|
||||
xss-lock -n dim-screen.sh -- exeflock4 &
|
||||
urxvtd -q -o -f
|
||||
|
|
|
@ -75,6 +75,11 @@ bspc rule -a System-config-printer.py state=floating
|
|||
bspc rule -a Zathura state=tiled
|
||||
bspc rule -a Oblogout state=fullscreen, layer=above
|
||||
|
||||
# Fijos
|
||||
bspc rule -a Termite -o desktop=primary:^1
|
||||
bspc rule -a Firefox -o desktop=primary:^2
|
||||
bspc rule -a URxvt:flota -o desktop=primary:^3
|
||||
|
||||
bspc config external_rules_command "$HOME/.config/bspwm/external_rules.sh"
|
||||
2bspwm &
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
backend = "glx";
|
||||
#backend = "xrender";
|
||||
paint-on-overlay = true;
|
||||
vsync = "none";
|
||||
#vsync = "opengl";
|
||||
#vsync = "none";
|
||||
vsync = "opengl-swc";
|
||||
glx-no-rebind-pixmap = true;
|
||||
refresh-rate = 0;
|
||||
glx-copy-from-front = false;
|
||||
glx-swap-method = "undefined";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -56,21 +56,21 @@ unignore x-mailer:
|
|||
|
||||
# Mail Options -------------------------------------
|
||||
set use_from = yes
|
||||
set envelope_from # which from?
|
||||
set fast_reply # skip to compose when replying
|
||||
set sendmail_wait = 1 # wait for sending to complete
|
||||
set attribution = "%d %n:" # set the attribution
|
||||
set reply_to # reply to Reply to: field
|
||||
set envelope_from # which from?
|
||||
set fast_reply # skip to compose when replying
|
||||
set sendmail_wait = 1 # wait for sending to complete
|
||||
set attribution = "El %d, %n escribio:" # set the attribution
|
||||
set reply_to # reply to Reply to: field
|
||||
set skip_quoted_offset = 3
|
||||
set sig_dashes # dashes before sig
|
||||
set edit_headers # show headers when composing
|
||||
set fcc_attach # save attachments with the body
|
||||
unset mime_forward # forward attachments as part of body
|
||||
set forward_format = "Fwd: %s" # format of subject when forwarding
|
||||
set forward_decode # decode when forwarding
|
||||
set reverse_name # reply as whomever it was to
|
||||
set include # include message in replies
|
||||
set forward_quote # include message in forwards
|
||||
set sig_dashes # dashes before sig
|
||||
set edit_headers # show headers when composing
|
||||
set fcc_attach # save attachments with the body
|
||||
unset mime_forward # forward attachments as part of body
|
||||
set forward_format = "Fwd: %s" # format of subject when forwarding
|
||||
set forward_decode # decode when forwarding
|
||||
set reverse_name # reply as whomever it was to
|
||||
set include # include message in replies
|
||||
set forward_quote # include message in forwards
|
||||
auto_view text/html
|
||||
auto_view application/pdf
|
||||
alternative_order text/plain text/enriched text/html
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
" Set filetype to conf for files with .conf extension.
|
||||
autocmd BufNewFile,BufRead *.conf setfiletype conf
|
|
@ -0,0 +1 @@
|
|||
autocmd BufRead,BufNewFile *.foxdot setfiletype python.foxdot
|
|
@ -1,12 +0,0 @@
|
|||
augroup manlaunchtoc
|
||||
autocmd!
|
||||
if has('nvim')
|
||||
autocmd FileType man
|
||||
\ call man#show_toc() |
|
||||
\ setlocal laststatus=0 nonumber norelativenumber |
|
||||
\ nnoremap <buffer> l <Enter> |
|
||||
\ wincmd H |
|
||||
\ vert resize 35 |
|
||||
\ wincmd p
|
||||
endif
|
||||
augroup end
|
|
@ -0,0 +1,2 @@
|
|||
" Set filetype to muttrc for files with .mutt extension.
|
||||
autocmd BufNewFile,BufRead *.mutt setfiletype muttrc
|
|
@ -0,0 +1,2 @@
|
|||
" Set filetype to ssh for files with .ssh extension.
|
||||
autocmd BufNewFile,BufRead *.ssh setfiletype sshconfig
|
|
@ -0,0 +1,7 @@
|
|||
setlocal tw=0
|
||||
setlocal colorcolumn=0
|
||||
|
||||
let b:ale_enabled = 0
|
||||
let b:ale_sign_column_always = 0
|
||||
let b:ale_linters = []
|
||||
let b:ale_fixers = []
|
|
@ -0,0 +1,97 @@
|
|||
""
|
||||
" Show table of contents window.
|
||||
" Modified version of man#show_toc() and ftplugin/qf.vim's s:setup_toc().
|
||||
"
|
||||
" nnoremap <buffer><silent> gO :call man#showtoc()<Enter>
|
||||
""
|
||||
function! man#showtoc() abort
|
||||
let l:bufname = bufname('%')
|
||||
let l:info = getloclist(0, { 'winid': 1 })
|
||||
|
||||
if !empty(l:info) && getwinvar(l:info.winid, 'qf_toc') ==# l:bufname
|
||||
lopen
|
||||
return v:true
|
||||
endif
|
||||
|
||||
let l:toc = []
|
||||
let l:lnum = 2
|
||||
let l:last_line = line('$') - 1
|
||||
|
||||
while l:lnum && l:lnum < l:last_line
|
||||
let l:text = getline(l:lnum)
|
||||
|
||||
if l:text =~# '^\%( \{3\}\)\=\S.*$'
|
||||
call add(l:toc, { 'bufnr': bufnr('%'), 'lnum': l:lnum, 'text': l:text })
|
||||
endif
|
||||
|
||||
let l:lnum = nextnonblank(l:lnum + 1)
|
||||
endwhile
|
||||
|
||||
call setloclist(0, l:toc, ' ')
|
||||
call setloclist(0, [], 'a', { 'title': 'Man TOC' })
|
||||
|
||||
" Prepare and set options for the window.
|
||||
vertical leftabove lopen
|
||||
vert resize 35
|
||||
setlocal winfixwidth
|
||||
setlocal nonumber norelativenumber
|
||||
|
||||
" Define mappings.
|
||||
nnoremap <buffer><silent> l <Enter>zt
|
||||
nnoremap <buffer><silent> <Enter> <Enter>zt
|
||||
|
||||
" Abort if there is nothing to show.
|
||||
let l:list = getloclist(0)
|
||||
if empty(l:list)
|
||||
return v:false
|
||||
endif
|
||||
|
||||
let l:bufnr = l:list[0].bufnr
|
||||
setlocal modifiable
|
||||
silent 1,$delete _
|
||||
call setline(1, map(l:list, 'v:val.text'))
|
||||
setlocal nomodifiable nomodified
|
||||
let &syntax = getbufvar(l:bufnr, '&syntax')
|
||||
|
||||
let w:qf_toc = l:bufname
|
||||
|
||||
" Move the window to the other side.
|
||||
wincmd x
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Open man page under the cursor.
|
||||
"
|
||||
" nnoremap <buffer><silent> <C-]> :call man#jumptag()<Enter>
|
||||
""
|
||||
function! man#jumptag() abort
|
||||
call man#open_page(v:false, 1, '')
|
||||
endfunction
|
||||
|
||||
""
|
||||
" Jump to the previous entry in tag stack.
|
||||
"
|
||||
" nnoremap <buffer><silent> [g :call man#poptag()<Enter>
|
||||
""
|
||||
function! man#poptag() abort
|
||||
call man#pop_tag()
|
||||
endfunction
|
||||
|
||||
" Disable built-in ftplugin.
|
||||
let b:did_ftplugin = v:true
|
||||
|
||||
" Initialize the manual page.
|
||||
if !exists('b:man_sect')
|
||||
call man#init_pager()
|
||||
endif
|
||||
|
||||
" Set common buffer-only settings.
|
||||
setlocal buftype=nofile bufhidden=hide noswapfile nomodified readonly nomodifiable
|
||||
setlocal noexpandtab tabstop=8 softtabstop=8 shiftwidth=8
|
||||
setlocal nonumber norelativenumber
|
||||
setlocal foldmethod=indent nofoldenable
|
||||
|
||||
" Define mappings.
|
||||
nnoremap <buffer><silent> gO :call man#showtoc()<Enter>
|
||||
nnoremap <buffer><silent> <C-]> :call man#jumptag()<Enter>
|
||||
nnoremap <buffer><silent> [g :call man#poptag()<Enter>
|
|
@ -6,11 +6,10 @@ setl tw=80
|
|||
setlocal colorcolumn=79
|
||||
|
||||
function! Prose()
|
||||
call pencil#init()
|
||||
" manual reformatting shortcuts
|
||||
nnoremap <buffer> <silent> Q gqap
|
||||
xnoremap <buffer> <silent> Q gq
|
||||
nnoremap <buffer> <silent> <leader>Q vapJgqap
|
||||
nnoremap <buffer> <silent> <localleader>Q vapJgqap
|
||||
|
||||
" force top correction on most recent misspelling
|
||||
nnoremap <buffer> <c-s> [s1z=<c-o>
|
||||
|
@ -31,5 +30,5 @@ augroup END
|
|||
|
||||
let b:ale_linters = ['proselint']
|
||||
|
||||
set statusline=%<%f\ %h%m%r%w\ \ %{PencilMode()}\ %=\ col\ %c%V\ \ line\ %l\,%L\ %P
|
||||
set rulerformat=%-12.(%l,%c%V%)%{PencilMode()}\ %P
|
||||
setl statusline=%<%f\ %h%m%r%w\ %=\ col\ %c%V\ \ line\ %l\,%L\ %P
|
||||
setl rulerformat=%-12.(%l,%c%V%)\ %P
|
|
@ -13,7 +13,6 @@ setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class,with
|
|||
|
||||
augroup pystuff
|
||||
autocmd!
|
||||
autocmd BufEnter call ncm2#enable_for_buffer()
|
||||
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
autocmd InsertEnter *.py Semshi pause
|
||||
autocmd InsertLeave *.py Semshi enable
|
||||
|
@ -39,12 +38,7 @@ let g:ale_lint_on_save = 1
|
|||
" Check Python files with flake8 and pylint.
|
||||
let b:ale_linters = ['pyls', 'flake8', 'pylint']
|
||||
" Fix Python files with autopep8 and yapf.
|
||||
let b:ale_fixers = [
|
||||
\ 'autopep8',
|
||||
\ 'remove_trailing_lines',
|
||||
\ 'isort',
|
||||
"\ 'ale#fixers#generic_python#BreakUpLongLines',
|
||||
\ 'yapf',
|
||||
\]
|
||||
let b:ale_fixers = ['autopep8', 'remove_trailing_lines', 'isort', 'yapf']
|
||||
|
||||
" Disable warnings about trailing whitespace for Python files.
|
||||
let b:ale_warn_about_trailing_whitespace = 0
|
|
@ -0,0 +1,59 @@
|
|||
scriptencoding UTF-8
|
||||
|
||||
""
|
||||
" QuickFix custom foldtext expression.
|
||||
"
|
||||
" setlocal foldexpr=kutsan#ftplugin#qf#foldexpr()
|
||||
""
|
||||
function! qf#foldtext() abort
|
||||
let l:lines = v:foldend - v:foldstart + 1
|
||||
let l:file = substitute(getline(v:foldstart), '\v\c\|.+', '', '')
|
||||
|
||||
return printf('%s [%s]', l:file, l:lines)
|
||||
endfunction
|
||||
|
||||
""
|
||||
" QuickFix custom fold expression.
|
||||
"
|
||||
" setlocal foldtext=kutsan#ftplugin#qf#foldtext(v:lnum)
|
||||
"
|
||||
" @param {number} lnum Line number for the 'foldexpr'.
|
||||
""
|
||||
function! qf#foldexpr(lnum) abort
|
||||
if matchstr(getline(a:lnum), '\v\c^[^|]+') ==# matchstr(getline(a:lnum + 1), '\v\c^[^|]+')
|
||||
return 1
|
||||
else
|
||||
return '<1'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Disable built-in ftplugin.
|
||||
let b:did_ftplugin = v:true
|
||||
|
||||
" Disable relative numbers and use just numbers.
|
||||
setlocal norelativenumber
|
||||
setlocal number
|
||||
|
||||
" Use custom fold expression.
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=qf#foldexpr(v:lnum)
|
||||
|
||||
" Use custom foldtext.
|
||||
setlocal foldtext=qf#foldtext()
|
||||
|
||||
" Start with all folds open.
|
||||
setlocal foldlevel=99
|
||||
|
||||
" Make quickfix buffer hidden.
|
||||
setlocal nobuflisted
|
||||
|
||||
" Set statusline.
|
||||
setlocal statusline=%{repeat('\ ',4)} " Generate space characters given number of times.
|
||||
setlocal statusline+= " Show a custom list icon.
|
||||
setlocal statusline+=%{repeat('\ ',1)}
|
||||
setlocal statusline+=%t " File name, either [Quickfix List] or [Location List].
|
||||
setlocal statusline+=%= " Align all items to right from this point on.
|
||||
setlocal statusline+=%{repeat('\ ',1)}
|
||||
setlocal statusline+=%l/%L " Current line number and total item count.
|
||||
setlocal statusline+=%{repeat('\ ',1)}
|
||||
|
|
@ -2,8 +2,8 @@ setlocal wrap
|
|||
setlocal sw=2
|
||||
setlocal tabstop=2
|
||||
setlocal expandtab
|
||||
setlocal textwidth=80
|
||||
setlocal colorcolumn=79
|
||||
setlocal textwidth=120
|
||||
setlocal colorcolumn=121
|
||||
setlocal softtabstop=2
|
||||
setlocal linebreak
|
||||
setlocal autoindent
|
||||
|
|
|
@ -38,6 +38,8 @@ Plug 'sbdchd/neoformat', {'on': 'Neoformat'}
|
|||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
Plug 'Shougo/neco-syntax'
|
||||
Plug 'Shougo/neco-vim'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-repeat'
|
||||
" Navigation
|
||||
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeFind', 'NERDTreeToggle'] }
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
|
@ -45,7 +47,6 @@ Plug '/usr/bin/fzf'
|
|||
Plug 'junegunn/fzf.vim'
|
||||
" Modes
|
||||
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
|
||||
Plug 'reedes/vim-pencil', { 'for': ['tex', 'markdown', 'text'] }
|
||||
Plug 'chrisbra/vim-diff-enhanced'
|
||||
" Python
|
||||
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
|
||||
|
@ -57,12 +58,7 @@ Plug 'autozimu/LanguageClient-neovim', {
|
|||
\ 'do': 'bash install.sh',
|
||||
\ }
|
||||
call plug#end()
|
||||
let g:plug_window = 'rightbelow topleft new'
|
||||
|
||||
nnoremap <leader>pi :PlugInstall<CR>
|
||||
nnoremap <leader>pu :PlugUpdate<CR>
|
||||
nnoremap <leader>pU :PlugUpgrade<CR>
|
||||
nnoremap <leader>pc :PlugClean<CR>
|
||||
"let g:plug_window = 'rightbelow topleft new'
|
||||
" }}}
|
||||
|
||||
" Options {{{
|
||||
|
@ -79,10 +75,9 @@ set number " Line numbers on
|
|||
set showmode " Always show mode
|
||||
set mousemodel=popup
|
||||
set breakindent
|
||||
set textwidth=120 " Text width is 120 characters
|
||||
set cmdheight=1 " Command line height
|
||||
set cmdwinheight=5 " Command-line lines
|
||||
set pumheight=20 " Completion window max size
|
||||
set pumheight=12 " 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
|
||||
|
@ -113,7 +108,8 @@ 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,preview
|
||||
"set completeopt=noinsert,menu,menuone
|
||||
set completeopt-=preview
|
||||
set completefunc=LanguageClient#complete
|
||||
set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
|
||||
set noexpandtab " Do not turn tabs into spaces
|
||||
|
@ -228,8 +224,11 @@ if !exists("autocommands_loaded") && has("autocmd")
|
|||
" Disables automatic commenting on newline
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
" Python file template
|
||||
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
aug skeletons
|
||||
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
autocmd BufRead,BufNewFile *.foxdot 0r ~/.config/nvim/templates/foxdot.skeleton
|
||||
autocmd BufNewFile *.sh 0r ~/.config/nvim/templates/sh.skeleton
|
||||
aug END
|
||||
|
||||
aug terminal_stuff
|
||||
"au BufWinEnter,WinEnter term://* startinsert
|
||||
|
@ -247,9 +246,18 @@ if !exists("autocommands_loaded") && has("autocmd")
|
|||
autocmd FileType fzf set laststatus=0 noshowmode noruler
|
||||
\| autocmd BufLeave <buffer> set laststatus=1 showmode ruler
|
||||
|
||||
function! s:fzf_statusline()
|
||||
" Override statusline as you like
|
||||
highlight fzf1 ctermfg=161 ctermbg=251
|
||||
highlight fzf2 ctermfg=23 ctermbg=251
|
||||
highlight fzf3 ctermfg=237 ctermbg=251
|
||||
setlocal statusline=%#fzf1#\ >\ %#fzf2#fz%#fzf3#f
|
||||
endfunction
|
||||
|
||||
autocmd! User FzfStatusLine call <SID>fzf_statusline()
|
||||
|
||||
" Automatic syntax highlighting for files
|
||||
aug set_file_types
|
||||
au BufRead,BufNewFile *.txt set filetype=markdown
|
||||
au BufRead,BufNewFile *.md set filetype=markdown
|
||||
au BufRead,BufNewFile *.conf set filetype=dosini
|
||||
au BufRead,BufNewFile *.bash* set filetype=sh
|
||||
|
@ -272,6 +280,7 @@ if &readonly
|
|||
set nonumber
|
||||
set noshowmode
|
||||
set colorcolumn=0
|
||||
let g:ale_disabled
|
||||
endif
|
||||
" }}}
|
||||
|
||||
|
@ -287,35 +296,6 @@ let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
|
|||
let g:netrw_winsize=25
|
||||
" }}}
|
||||
|
||||
" Ranger {{{
|
||||
function! <SID>ranger()
|
||||
let l:temp = tempname()
|
||||
|
||||
execute 'silent !st -e ranger --choosefiles='.shellescape(l:temp).' $PWD'
|
||||
|
||||
if !filereadable(temp)
|
||||
redraw!
|
||||
return
|
||||
endif
|
||||
|
||||
let l:names = readfile(l:temp)
|
||||
if empty(l:names)
|
||||
redraw!
|
||||
return
|
||||
endif
|
||||
|
||||
execute 'edit '.fnameescape(l:names[0])
|
||||
|
||||
for l:name in l:names[1:]
|
||||
execute 'argadd '.fnameescape(l:name)
|
||||
endfor
|
||||
|
||||
redraw!
|
||||
endfunction
|
||||
|
||||
nnoremap <leader>R :call <SID>ranger()<CR>
|
||||
" }}}
|
||||
|
||||
" Autopairs {{{
|
||||
let g:AutoPairs = {'(':')', '[':']', '<':'>', '{':'}',"'":"'",'"':'"', '`':'`'}
|
||||
" }}}
|
||||
|
@ -337,11 +317,6 @@ let g:ale_pattern_options = {
|
|||
\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []},
|
||||
\}
|
||||
|
||||
"highlight ALEError cterm=undercurl ctermfg=196
|
||||
"highlight ALEInfo cterm=undercurl ctermfg=14
|
||||
"hi ALEErrorSign ctermfg=red ctermbg=none
|
||||
"hi ALEWarningSign ctermfg=yellow ctermbg=none
|
||||
|
||||
nmap <silent> <F10> <Plug>(ale_previous_wrap)
|
||||
nmap <silent> <F11> <Plug>(ale_next_wrap)
|
||||
" }}}
|
||||
|
@ -403,6 +378,7 @@ let g:fzf_action = {
|
|||
\ 'ctrl-t': 'tab split',
|
||||
\ 'ctrl-s': 'split',
|
||||
\ 'ctrl-v': 'vsplit' }
|
||||
|
||||
let g:fzf_colors =
|
||||
\ { 'fg': ['fg', 'Normal'],
|
||||
\ 'bg': ['bg', 'Clear'],
|
||||
|
@ -417,6 +393,10 @@ let g:fzf_colors =
|
|||
\ 'spinner': ['fg', 'Label'],
|
||||
\ 'header': ['fg', 'Comment'] }
|
||||
|
||||
let g:fzf_buffers_jump = 1
|
||||
let g:fzf_tags_command = 'ctags -R'
|
||||
|
||||
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep(
|
||||
\ 'rg --column --line-number --hidden --ignore-case --no-heading --color=always '.shellescape(<q-args>), 1,
|
||||
|
@ -475,6 +455,12 @@ let g:semshi#error_sign = v:false
|
|||
let g:slime_target = 'tmux'
|
||||
let g:slime_python_ipython = 1
|
||||
let g:slime_paste_file = '~/.slime_paste'
|
||||
let g:slime_default_config = {"socket_name": "default", "target_pane": ":.2"}
|
||||
let g:slime_dont_ask_default = 1
|
||||
let g:slime_no_mappings = 1
|
||||
|
||||
inoremap <c-+> <Plug>SlimeSendCurrentLine
|
||||
nnoremap <c-+> <Plug>SlimeParagraphSend
|
||||
" }}}
|
||||
|
||||
" Iron {{{
|
||||
|
@ -543,18 +529,24 @@ nnoremap <F7> :setlocal spell! spelllang=en<CR>
|
|||
nnoremap <F8> :set nospell<CR>
|
||||
nnoremap <F9> :!w<Enter>:!pdflatex <C-r>%<Enter>
|
||||
|
||||
" Plug
|
||||
nnoremap <leader>pi :PlugInstall<CR>
|
||||
nnoremap <leader>pu :PlugUpdate<CR>
|
||||
nnoremap <leader>pU :PlugUpgrade<CR>
|
||||
nnoremap <leader>pc :PlugClean<CR>
|
||||
|
||||
" Neoformat
|
||||
nnoremap <leader>f :Neoformat<CR>
|
||||
vnoremap <leader>f :Neoformat<CR>
|
||||
|
||||
" Super quick search and replace
|
||||
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>
|
||||
|
||||
" Super quick search and replace
|
||||
nnoremap <Space>' :'{,'}s/\<<C-r>=expand("<cword>")<CR>\>/
|
||||
nnoremap <Space>¿ :%s/\<<C-r>=expand("<cword>")<CR>\>/
|
||||
|
||||
" Learn vim keys the hard way
|
||||
nnoremap <silent> <Left> :vertical resize -2<CR>
|
||||
nnoremap <silent> <Right> :vertical resize +2<CR>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
# You can import any python module as needed.
|
||||
from collections import deque
|
||||
# from collections import deque
|
||||
import os
|
||||
import re
|
||||
|
||||
|
@ -10,28 +10,18 @@ from ranger.api.commands import Command
|
|||
from ranger.core.loader import CommandLoader
|
||||
|
||||
|
||||
class empty(Command):
|
||||
""":empty
|
||||
|
||||
Empties the trash directory ~/.Trash
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
self.fm.run("rm -rf /home/myname/.Trash/{*,.[^.]*}")
|
||||
|
||||
|
||||
# fzf integration
|
||||
class fzf_select(Command):
|
||||
# https://github.com/ranger/ranger/wiki/Integrating-File-Search-with-fzf
|
||||
# add this to your ~/.config/ranger/rc.conf: map <C-f> fzf_select
|
||||
class select(Command):
|
||||
"""
|
||||
:fzf_select
|
||||
|
||||
Find a file using fzf.
|
||||
With a prefix argument select only directories.
|
||||
See: https://github.com/junegunn/fzf
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
import subprocess
|
||||
import os.path
|
||||
if self.quantifier:
|
||||
# match only directories
|
||||
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
|
||||
|
@ -51,16 +41,20 @@ class fzf_select(Command):
|
|||
|
||||
|
||||
# fzf_locate
|
||||
class fzf_locate(Command):
|
||||
class locate(Command):
|
||||
"""
|
||||
:fzf_locate
|
||||
Find a file using fzf.
|
||||
With a prefix argument select only directories.
|
||||
See: https://github.com/junegunn/fzf
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
import subprocess
|
||||
if self.quantifier:
|
||||
command = "locate home | fzf -e -i"
|
||||
command = "locate home media | fzf -e -i"
|
||||
else:
|
||||
command = "locate home | fzf -e -i"
|
||||
command = "locate home media | fzf -e -i"
|
||||
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
|
||||
stdout, stderr = fzf.communicate()
|
||||
if fzf.returncode == 0:
|
||||
|
@ -71,6 +65,78 @@ class fzf_locate(Command):
|
|||
self.fm.select_file(fzf_file)
|
||||
|
||||
|
||||
class bring(Command):
|
||||
"""
|
||||
:fzf_bring
|
||||
Find a file using fzf and bring it to the current directory.
|
||||
See: https://github.com/junegunn/fzf
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
import subprocess
|
||||
if self.quantifier:
|
||||
# match only directories
|
||||
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
|
||||
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
|
||||
else:
|
||||
# match files and directories
|
||||
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
|
||||
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
|
||||
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
|
||||
stdout, stderr = fzf.communicate()
|
||||
if fzf.returncode == 0:
|
||||
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
|
||||
if os.path.isdir(fzf_file):
|
||||
self.fm.cd(fzf_file)
|
||||
else:
|
||||
self.fm.select_file(fzf_file)
|
||||
|
||||
|
||||
# fzf_fasd - Fasd + Fzf + Ranger (Interactive Style)
|
||||
class fazdf(Command):
|
||||
"""
|
||||
:fzf_fasd
|
||||
|
||||
Jump to a file or folder using Fasd and fzf
|
||||
|
||||
URL: https://github.com/clvv/fasd
|
||||
URL: https://github.com/junegunn/fzf
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
import subprocess
|
||||
if self.quantifier:
|
||||
command = "fasd | fzf -e -i --tac --no-sort | awk '{print $2}'"
|
||||
else:
|
||||
command = "fasd | fzf -e -i --tac --no-sort | awk '{print $2}'"
|
||||
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
|
||||
stdout, stderr = fzf.communicate()
|
||||
if fzf.returncode == 0:
|
||||
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
|
||||
if os.path.isdir(fzf_file):
|
||||
self.fm.cd(fzf_file)
|
||||
else:
|
||||
self.fm.select_file(fzf_file)
|
||||
|
||||
|
||||
# Fasd with ranger (Command Line Style)
|
||||
# https://github.com/ranger/ranger/wiki/Commands
|
||||
class fasd(Command):
|
||||
"""
|
||||
:fasd
|
||||
|
||||
Jump to directory using fasd
|
||||
URL: https://github.com/clvv/fasd
|
||||
"""
|
||||
|
||||
def execute(self):
|
||||
import subprocess
|
||||
arg = self.rest(1)
|
||||
if arg:
|
||||
directory = subprocess.check_output(["fasd", "-d"] + arg.split(), universal_newlines=True).strip()
|
||||
self.fm.cd(directory)
|
||||
|
||||
|
||||
# mkcd (mkdir + cd)
|
||||
class mkcd(Command):
|
||||
"""
|
||||
|
@ -104,37 +170,6 @@ class mkcd(Command):
|
|||
self.fm.notify("file/directory exists!", bad=True)
|
||||
|
||||
|
||||
class compress(Command):
|
||||
def execute(self):
|
||||
""" Compress marked files to current directory """
|
||||
cwd = self.fm.thisdir
|
||||
marked_files = cwd.get_selection()
|
||||
|
||||
if not marked_files:
|
||||
return
|
||||
|
||||
def refresh(_):
|
||||
cwd = self.fm.get_directory(original_path)
|
||||
cwd.load_content()
|
||||
|
||||
original_path = cwd.path
|
||||
parts = self.line.split()
|
||||
au_flags = parts[1:]
|
||||
|
||||
descr = "compressing files in: " + os.path.basename(parts[1])
|
||||
obj = CommandLoader(args=['apack'] + au_flags +
|
||||
[os.path.relpath(f.path, cwd.path) for f in marked_files], descr=descr)
|
||||
|
||||
obj.signal_bind('after', refresh)
|
||||
self.fm.loader.add(obj)
|
||||
|
||||
def tab(self):
|
||||
""" Complete with current folder name """
|
||||
|
||||
extension = ['.zip', '.tar.gz', '.rar', '.7z']
|
||||
return ['compress ' + os.path.basename(self.fm.thisdir.path) + ext for ext in extension]
|
||||
|
||||
|
||||
class extracthere(Command):
|
||||
def execute(self):
|
||||
""" Extract copied files to current directory """
|
||||
|
@ -160,8 +195,7 @@ class extracthere(Command):
|
|||
descr = "extracting: " + os.path.basename(one_file.path)
|
||||
else:
|
||||
descr = "extracting files from: " + os.path.basename(one_file.dirname)
|
||||
obj = CommandLoader(args=['aunpack'] + au_flags
|
||||
+ [f.path for f in copied_files], descr=descr)
|
||||
obj = CommandLoader(args=['aunpack'] + au_flags + [f.path for f in copied_files], descr=descr)
|
||||
|
||||
obj.signal_bind('after', refresh)
|
||||
self.fm.loader.add(obj)
|
|
@ -25,7 +25,7 @@ set collapse_preview true
|
|||
set save_console_history false
|
||||
set status_bar_on_top false
|
||||
set draw_progress_bar_in_status_bar true
|
||||
set draw_borders false
|
||||
set draw_borders true
|
||||
set dirname_in_tabs true
|
||||
set mouse_enabled true
|
||||
set display_size_in_main_column true
|
||||
|
@ -86,8 +86,6 @@ alias travel scout -aefiklst
|
|||
# Basic
|
||||
map Q quitall
|
||||
map q quit
|
||||
copymap q ZZ ZQ
|
||||
|
||||
map R reload_cwd
|
||||
map F set freeze_files!
|
||||
map <A-l> redraw_window
|
||||
|
@ -119,7 +117,7 @@ map lms linemode sizemtime
|
|||
map lmt linemode metatitle
|
||||
|
||||
# Tagging / Marking
|
||||
map at tag_toggle
|
||||
map at tag_toggle
|
||||
map ut tag_remove
|
||||
map "<any> tag_toggle tag=%any
|
||||
map <Space> mark_files toggle=True
|
||||
|
@ -131,12 +129,13 @@ map uV toggle_visual_mode reverse=True
|
|||
# For the nostalgics: Midnight Commander bindings
|
||||
map <F1> help
|
||||
map <F2> eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
|
||||
map <F3> display_file
|
||||
map <F4> edit
|
||||
map <F5> copy
|
||||
map <F6> cut
|
||||
map <F3> cut
|
||||
map <F4> copy
|
||||
map <F5> reload_cwd
|
||||
map <F6> edit
|
||||
map <F7> console mkdir%space
|
||||
map <F8> console delete
|
||||
map <F9> display_file
|
||||
map <F10> exit
|
||||
|
||||
# In case you work on a keyboard with dvorak layout
|
||||
|
@ -203,6 +202,7 @@ map t+ tab_move 1
|
|||
map t- tab_move -1
|
||||
map th tab_new ~
|
||||
map tu tab_restore
|
||||
map tc tab_close
|
||||
map <a-1> tab_open 1
|
||||
map <a-2> tab_open 2
|
||||
map <a-3> tab_open 3
|
||||
|
@ -228,16 +228,11 @@ map ev eval import shlex; fm.run("tmux splitw -v rifle " + shlex.quote(fm.thisfi
|
|||
map ew eval import shlex; fm.run("tmux new-window rifle " + shlex.quote(fm.thisfile.basename))
|
||||
|
||||
# Better file renaming
|
||||
map w eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
|
||||
map aa rename_append
|
||||
map rw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
|
||||
map ra rename_append
|
||||
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
|
||||
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
|
||||
|
||||
# These are provided by the pmount plugin. added for reference
|
||||
# Mount = Alt m
|
||||
# Unmount = Alt M
|
||||
# List mounted = Alt N
|
||||
|
||||
# Filesystem Operations
|
||||
map = chmod
|
||||
map pp paste
|
||||
|
@ -318,8 +313,7 @@ map zP set preview_directories!
|
|||
map zs set sort_case_insensitive!
|
||||
map zu set autoupdate_cumulative_size!
|
||||
map zv set use_preview_script!
|
||||
map zf console filter%space
|
||||
copymap zf zz
|
||||
map zf console filter -s%space
|
||||
|
||||
# Bookmarks
|
||||
map `<any> enter_bookmark %any
|
||||
|
@ -458,14 +452,19 @@ map xc shell chmod -x %s
|
|||
map V console shell vim%space
|
||||
map Nf console touch%space
|
||||
map Nd console mkdir%space
|
||||
map Ncd console mkcd%space
|
||||
map Nc console mkcd%space
|
||||
map sl console shell ln -sT%space
|
||||
map X shell extraer %f
|
||||
map Z shell tar -cvzf %f.tar.gz %f
|
||||
map Zt shell tar -cvzf %f.tar.gz %f
|
||||
map Zz shell apack %f.zip %f
|
||||
map Zb shell apack --format=zip %f.cbz %f
|
||||
map bg shell hsetroot -fill %f
|
||||
map C shell killall w3mimgdisplay && convert -rotate 90 %s %s
|
||||
map <C-f> fzf_select
|
||||
map <C-l> fzf_locate
|
||||
map <C-f> select
|
||||
map <C-l> locate
|
||||
map <C-b> bring
|
||||
map zz fazdf
|
||||
map zo console fasd%space
|
||||
|
||||
map Ma shell mpc add "%s"
|
||||
map Ms shell mpc play
|
||||
|
|
|
@ -139,6 +139,9 @@ ext djvu, has atril, X, flag f = atril -- "$@"
|
|||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
ext cbz, has zathura,X, flag f = zathura -- "$@"
|
||||
ext cbr, has zathura,X, flag f = zathura -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Image Viewing:
|
||||
#-------------------------------------------
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<property name="dpms-on-ac-off" type="uint" value="45"/>
|
||||
<property name="dpms-on-ac-sleep" type="uint" value="30"/>
|
||||
<property name="blank-on-ac" type="int" value="20"/>
|
||||
<property name="power-button-action" type="uint" value="3"/>
|
||||
<property name="power-button-action" type="uint" value="0"/>
|
||||
<property name="lid-action-on-battery" type="uint" value="1"/>
|
||||
<property name="inactivity-sleep-mode-on-battery" type="uint" value="2"/>
|
||||
<property name="inactivity-on-battery" type="uint" value="25"/>
|
||||
|
@ -23,6 +23,6 @@
|
|||
<property name="brightness-on-battery" type="uint" value="9"/>
|
||||
<property name="blank-on-battery" type="int" value="10"/>
|
||||
<property name="brightness-level-on-battery" type="uint" value="5"/>
|
||||
<property name="inactivity-sleep-mode-on-ac" type="uint" value="2"/>
|
||||
<property name="inactivity-sleep-mode-on-ac" type="uint" value="1"/>
|
||||
</property>
|
||||
</channel>
|
||||
|
|
|
@ -43,6 +43,7 @@ setopt auto_name_dirs
|
|||
setopt always_to_end
|
||||
setopt complete_in_word
|
||||
setopt list_types
|
||||
setopt GLOB_DOTS
|
||||
|
||||
HELPDIR=/usr/share/zsh/$ZSH_VERSION/help
|
||||
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
|
@ -40,7 +40,7 @@ alias umount='umount -v'
|
|||
# Con opciones por defecto
|
||||
alias cat='bat --style=numbers,changes,header --color=always'
|
||||
alias find='fd -H --color=always'
|
||||
alias du='ncdu --color dark -rr -x --exclude .git'
|
||||
alias ncdu='ncdu --color dark -rr -x --exclude .git'
|
||||
alias rg='rg -p'
|
||||
alias ytdl='youtube-dl -ic'
|
||||
alias ls='ls -F --color=always --group-directories-first'
|
||||
|
@ -54,23 +54,35 @@ alias dir='dir --color=always'
|
|||
alias type='type -a' # See what the command you want to run points to
|
||||
alias df='df -hT --total' # Human readable, print filetype, and total
|
||||
alias free='free -ht' # Human readable and total
|
||||
alias duu='du -d1 -h | sort -rh' # Human readable, max depth
|
||||
alias du='du -d1 -h | sort -rh' # Human readable, max depth
|
||||
alias info='info --vi-keys' # GNU info act like man command
|
||||
alias inxi='inxi -Fz'
|
||||
alias slop='slop --highlight --tolerance=0 --color=0.3,0.4,0.6,0.4 -f '%wx%h+%x+%y''
|
||||
alias ping='ping -c 5 '
|
||||
alias dd="dd status=progress"
|
||||
alias dirs='dirs -v -p'
|
||||
alias dfc='dfc -dmT'
|
||||
|
||||
# Comandos
|
||||
alias _="sudo "
|
||||
alias search="rg \
|
||||
--color='always' \
|
||||
--heading \
|
||||
--line-number \
|
||||
--no-messages \
|
||||
--no-ignore \
|
||||
--hidden \
|
||||
--follow \
|
||||
--smart-case \
|
||||
--glob '!.git/' \
|
||||
--glob '!node_modules/' \
|
||||
--regexp"
|
||||
alias logout="bspc quit 1"
|
||||
alias svi="sudo nvim"
|
||||
alias pacmir='sudo pacman-mirrors -f5'
|
||||
alias upd='yay -Syu'
|
||||
alias ytw='youtube-viewer -C -D -W -f -7 --results=10'
|
||||
alias hoy='calcurse -a --format-apt=" - %m (%S a %E)\n" --format-recur-apt=" - %m (%S a %E)\n"'
|
||||
alias week='calcurse -r7 --format-apt=" - %m (%S a %E)\n" --format-recur-apt=" - %m (%S a %E)\n"'
|
||||
alias todo='calcurse -t --format-todo "(%p) %m\n"'
|
||||
#alias hoy='calcurse -a --format-apt=" - %m (%S a %E)\n" --format-recur-apt=" - %m (%S a %E)\n"'
|
||||
#alias week='calcurse -r7 --format-apt=" - %m (%S a %E)\n" --format-recur-apt=" - %m (%S a %E)\n"'
|
||||
#alias todo='calcurse -t --format-todo "(%p) %m\n"'
|
||||
alias winclass='xprop | grep WM_CLASS' # for bspwm rules
|
||||
alias path='echo -e ${PATH//:/\\n}' # Pretty print of some PATH variables
|
||||
alias compare='grep -nFxvf' # Usage: compare <file1> <file2>
|
||||
|
|
|
@ -37,6 +37,11 @@ show() { trizen -Si "$1" ;} # package details
|
|||
files() { pacman -Ql "$1" ;} # list files owned by package
|
||||
explicit() { sudo pacman -D --asexplicit "$@" ;} # mark package as explicitly installed
|
||||
|
||||
upd() {
|
||||
sudo pacman-mirrors -f5
|
||||
yay -Syu
|
||||
}
|
||||
|
||||
orphans() {
|
||||
pacman -Qdt
|
||||
echo "Press ENTER to remove these orphaned packages or CTRL+C to cancel."
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
export FZF_DEFAULT_OPTS='
|
||||
--extended
|
||||
--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_DEFAULT_COLORS='--color=dark,fg:7,fg+:7,bg:0,bg+:8,hl:4,hl+:4,info:8,border:8,prompt:4,pointer:3,marker:3,spinner:8,header:6'
|
||||
|
||||
export FZF_DEFAULT_OPTS="$FZF_DEFAULT_COLORS \
|
||||
--extended \
|
||||
--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
|
||||
|
@ -32,6 +35,8 @@ export FZF_VIM_LOG=$(git config --get alias.l | awk '{$1=""; print $0;}' | tr -d
|
|||
|
||||
command -v tree > /dev/null && export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -$LINES'"
|
||||
|
||||
fl() { xdg-open "$(locate "*" | fzf -e)" ;}
|
||||
|
||||
# git logs, hash, and diff with fzf {{{
|
||||
fshow() {
|
||||
git log --graph --color=always \
|
||||
|
@ -82,4 +87,76 @@ function fk {
|
|||
echo "$pid" | xargs kill -${1:-9}
|
||||
fi
|
||||
}
|
||||
# }}}
|
||||
# }}}
|
||||
|
||||
# fh - repeat history {{{
|
||||
fh() {
|
||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//')
|
||||
}
|
||||
# }}}
|
||||
|
||||
# fasd with fzf {{{
|
||||
function ff() {
|
||||
local selected_path=$(
|
||||
fasd -l -d \
|
||||
| sed "s#$HOME#~#" \
|
||||
| fzf \
|
||||
--tac \
|
||||
--no-sort \
|
||||
--exact \
|
||||
--prompt='cd ' \
|
||||
--preview-window='right:60%' \
|
||||
--preview='eval ls -l --si --almost-all --classify --color=always --group-directories-first --literal {} 2>/dev/null'
|
||||
)
|
||||
|
||||
eval cd "$selected_path"
|
||||
}
|
||||
# }}}
|
||||
|
||||
# Bookmark manager. @param {string} [$1] Defined bookmark string. {{{
|
||||
function b() {
|
||||
# Bookmarks
|
||||
local -A bookmarks=(
|
||||
'e' '~/Desktop/'
|
||||
'd' '~/Documents/'
|
||||
'w' '~/Downloads/'
|
||||
'i' '~/Pictures/'
|
||||
'p' '~/Projects/'
|
||||
'v' '~/Videos/'
|
||||
)
|
||||
|
||||
local selected_bookmark
|
||||
|
||||
if [[ "$1" != '' ]] {
|
||||
selected_bookmark="${bookmarks[$1]}"
|
||||
} else {
|
||||
local bookmarks_table
|
||||
|
||||
local key
|
||||
foreach key (${(k)bookmarks}) {
|
||||
bookmarks_table+="$key ${bookmarks[$key]}\n"
|
||||
}
|
||||
|
||||
if (! hash fzf &>/dev/null) {
|
||||
return 1
|
||||
} else {
|
||||
selected_bookmark=$(
|
||||
printf "$bookmarks_table" \
|
||||
| fzf \
|
||||
--exact \
|
||||
--height='30%' \
|
||||
--preview='eval ls -l --si --almost-all --classify --color=always --group-directories-first --literal {2} 2>/dev/null' \
|
||||
--preview-window='right:60%' \
|
||||
)
|
||||
|
||||
selected_bookmark="${selected_bookmark[(ws: :)2]}"
|
||||
}
|
||||
}
|
||||
|
||||
if [[ "$selected_bookmark" != '' ]] {
|
||||
eval cd "$selected_bookmark"
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
# }}}
|
||||
|
|
|
@ -19,6 +19,8 @@ bindkey '^P' up-line-or-beginning-search
|
|||
bindkey '^N' down-line-or-beginning-search
|
||||
bindkey '^U' history-incremental-pattern-search-backward
|
||||
bindkey '^F' fzf-history-widget
|
||||
bindkey -M viins '^K' up-history # ^K to previous command.
|
||||
bindkey -M viins '^J' down-history # ^J to next command.
|
||||
|
||||
# Ctrl+Y is a standard in some places, and since Ctrl+R is taken...
|
||||
bindkey -a u undo
|
||||
|
@ -32,8 +34,13 @@ bindkey -M vicmd '?' history-incremental-search-backward
|
|||
bindkey -M vicmd '/' history-incremental-search-forward
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
|
||||
# bindkey '^w' vi-forward-word
|
||||
bindkey -M vicmd '^K' up-history # ^K to previous command.
|
||||
bindkey -M vicmd '^J' down-history # ^J to next command.
|
||||
bindkey -M vicmd 'H' vi-beginning-of-line # Go beginning of line.
|
||||
bindkey -M vicmd 'L' vi-end-of-line # Go end of line.
|
||||
bindkey -M vicmd 'cs' change-surround # Change surround operator.
|
||||
bindkey -M vicmd 'ds' delete-surround # Delete surround operator.
|
||||
bindkey -M vicmd 'ys' add-surround # Add surround operator.
|
||||
|
||||
typeset -g -A key
|
||||
|
||||
|
|
13
.tmux.conf
13
.tmux.conf
|
@ -91,8 +91,8 @@ bind -r L resize-pane -R 2
|
|||
# Dividir
|
||||
bind-key | split-window -h -c "#{pane_current_path}"
|
||||
bind-key - split-window -v -c "#{pane_current_path}"
|
||||
bind-key M-| split-window -fh -c "#{pane_current_path}"
|
||||
bind-key M-- split-window -fv -c "#{pane_current_path}"
|
||||
bind-key / split-window -fh -c "#{pane_current_path}"
|
||||
bind-key _ split-window -fv -c "#{pane_current_path}"
|
||||
bind-key X select-layout even-vertical
|
||||
|
||||
# Zoom
|
||||
|
@ -135,10 +135,13 @@ bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
|
|||
bind -n C-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
|
||||
bind-key C-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
|
||||
|
||||
# Prender y apagar statusbar
|
||||
bind-key / set-option -g status
|
||||
# FZF Locate
|
||||
bind-key -n 'M-/' new-window -n locate \; send-keys "fl && tmux kill-window\n"
|
||||
|
||||
# Better mouse support
|
||||
# Prender y apagar statusbar
|
||||
bind-key & set-option -g status
|
||||
|
||||
# Mejor soporte para mouse
|
||||
set -g @prevent-scroll-for-fullscreen-alternate-buffer 'on'
|
||||
set -g @scroll-speed-num-lines-per-scroll '3'
|
||||
run-shell ~/bin/tmux-better-mouse-mode/scroll_copy_mode.tmux
|
||||
|
|
6
.xinitrc
6
.xinitrc
|
@ -32,13 +32,15 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
|||
unset f
|
||||
fi
|
||||
|
||||
#xset dpms 0 2700 3000 &
|
||||
xset s noexpose &
|
||||
xset dpms 0 2700 3000 &
|
||||
xset s 1800 1800 &
|
||||
setxkbmap -option caps:escape
|
||||
|
||||
dbus-update-activation-environment --systemd DISPLAY
|
||||
eval "$(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)"
|
||||
export SSH_AUTH_SOCK
|
||||
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||
xsetroot -cursor_name left_ptr &
|
||||
compton -b &
|
||||
sxhkd &
|
||||
exec bspwm
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR
|
||||
exec /usr/bin/Xorg -nolisten tcp -nolisten local "$@" vt$XDG_VTNR
|
|
@ -1,3 +1,5 @@
|
|||
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
exec startx
|
||||
fi
|
||||
#if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
||||
# exec startx
|
||||
#fi
|
||||
|
||||
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- -keeptty -nolisten tcp > ~/.xorg.log 2>&1
|
35
.zshenv
35
.zshenv
|
@ -13,6 +13,39 @@ export QUOTING_STYLE=literal
|
|||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export SSH_ASKPASS="/usr/lib/seahorse/ssh-askpass"
|
||||
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
||||
export MANPAGER="nvim +'set filetype=man' -"
|
||||
|
||||
# highlight
|
||||
export HIGHLIGHT_OPTIONS='--out-format="xterm256" --style="pablo"'
|
||||
|
||||
# less
|
||||
export LESS=" \
|
||||
--ignore-case \
|
||||
--tilde \
|
||||
--chop-long-lines \
|
||||
--status-column \
|
||||
--LONG-PROMPT \
|
||||
--jump-target=10 \
|
||||
--RAW-CONTROL-CHARS \
|
||||
--silent \
|
||||
--tabs=4 \
|
||||
--shift=5"
|
||||
export LESSOPEN="| highlight $HIGHLIGHT_OPTIONS -- %s 2>/dev/null" # Use `highlight` program to try to highlight opened file according to its extension.
|
||||
export LESSHISTFILE="$HOME/.config/less/lesshistory" # Command and search history file.
|
||||
export LESSKEYRC="$HOME/.config/less/lesskey" # Path of the uncompiled lesskey file.
|
||||
export LESSKEY="$LESSKEYRC.lwc" # Path of the compiled lesskey file.
|
||||
export LESS_TERMCAP_md=$(tput bold; tput setaf 4) # Turn on bold mode.
|
||||
export LESS_TERMCAP_me=$(tput sgr0) # Turn off all attributes.
|
||||
export LESS_TERMCAP_so=$(tput bold; tput setaf 3) # Begin standout mode.
|
||||
export LESS_TERMCAP_se=$(tput rmso; tput sgr0) # Exit standout mode.
|
||||
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 250) # Begin underline mode.
|
||||
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0) # Exit underline mode.
|
||||
export LESS_TERMCAP_mr=$(tput rev) # Turn on reverse video mode.
|
||||
export LESS_TERMCAP_mh=$(tput dim) # Turn on half-bright mode.
|
||||
export LESS_TERMCAP_ZN=$(tput ssubm) # Enter subscript mode.
|
||||
export LESS_TERMCAP_ZV=$(tput rsubm) # End subscript mode.
|
||||
export LESS_TERMCAP_ZO=$(tput ssupm) # Enter superscript mode.
|
||||
export LESS_TERMCAP_ZW=$(tput rsupm) # End superscript mode.
|
||||
|
||||
typeset -U path
|
||||
path=(~/bin /usr/lib/ccache/bin /usr/lib/surfraw $path[@])
|
||||
path=(~/bin ~/.local/bin /usr/lib/ccache/bin /usr/lib/surfraw $path[@])
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
set -euf -o pipefail
|
||||
|
||||
export DISPLAY=:0.0
|
||||
USERID=$(id -u -n)
|
||||
|
||||
if ping -q -w 1 -c 1 "$(ip r | grep -m 1 default | cut -d ' ' -f 3)" >/dev/null
|
||||
then
|
||||
|
@ -19,7 +18,7 @@ then
|
|||
if [ "$newcount" -gt 0 ]
|
||||
then
|
||||
cuenta=$(echo "$account" | rev | cut -d"/" -f1-1 | rev)
|
||||
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$USERID/bus dunstify -a neomutt "You've Got Mail" "$newcount new message(s) in $cuenta"
|
||||
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus dunstify -a neomutt "You've Got Mail" "$newcount new message(s) in $cuenta"
|
||||
fi
|
||||
done
|
||||
# Create a touch file that indicates the time of the last run of mailsync
|
||||
|
|
64
bin/extraer
64
bin/extraer
|
@ -1,30 +1,38 @@
|
|||
#!/bin/bash
|
||||
# there are two different ways this script can work.
|
||||
# for the first way, uncomment the two lines after the if and place two '.' in front of the /$1
|
||||
# this creates a new directory in the directory where the compressed file is and dumps the content in it
|
||||
# for the second way, comment the two lines under the if and place just one '.' in front of the /$1
|
||||
# this just dumps the content of the compressed file in the same directory of the compressed file
|
||||
if [ -f "$1" ] ; then
|
||||
NAME=${1%.*}
|
||||
mkdir "$NAME" && cd "$NAME"
|
||||
case "$1" in
|
||||
*.tar.bz2) tar xvjf ../"$1" ;;
|
||||
*.tar.gz) tar xvzf ../"$1" ;;
|
||||
*.tar.xz) tar xvJf ../"$1" ;;
|
||||
*.lzma) unlzma ../"$1" ;;
|
||||
*.bz2) bunzip2 ../"$1" ;;
|
||||
*.rar) unrar x -ad ../"$1" ;;
|
||||
*.gz) gunzip ../"$1" ;;
|
||||
*.tar) tar xvf ../"$1" ;;
|
||||
*.tbz2) tar xvjf ../"$1" ;;
|
||||
*.tgz) tar xvzf ../"$1" ;;
|
||||
*.zip) unzip ../"$1" ;;
|
||||
*.Z) uncompress ../"$1" ;;
|
||||
*.7z) 7z x ../"$1" ;;
|
||||
*.xz) unxz ../"$1" ;;
|
||||
*.exe) cabextract ../"$1" ;;
|
||||
*) echo "extract: '$1' - unknown archive method" ;;
|
||||
esac
|
||||
# A general, all-purpose extraction script.
|
||||
#
|
||||
# Default behavior: Extract archive into new directory
|
||||
# Behavior with `-c` option: Extract contents into current directory
|
||||
|
||||
while getopts "hc" o; do case "${o}" in
|
||||
h) echo -e "Options:\\n -c: Extract archive into current directory rather than a new one." && exit ;;
|
||||
c) dirpref="" && archive=${*:2} ;;
|
||||
*) echo "only valid options are -h and -c." ;;
|
||||
esac done
|
||||
|
||||
[ -z ${dirpref+x} ] && dirpref="../" && archive="$*"
|
||||
|
||||
if [ -f "$archive" ] ; then
|
||||
[[ "$dirpref" == "../" ]] && NAME=${archive%.*} && mkdir "$NAME" && cd "$NAME" || exit
|
||||
case "$archive" in
|
||||
*.tar.bz2) tar xvjf "$dirpref""$archive" ;;
|
||||
*.tar.gz) tar xvzf "$dirpref""$archive" ;;
|
||||
*.tar.xz) tar xvJf "$dirpref""$archive" ;;
|
||||
*.lzma) unlzma "$dirpref""$archive" ;;
|
||||
*.bz2) bunzip2 "$dirpref""$archive" ;;
|
||||
*.rar) unrar x -ad "$dirpref""$archive" ;;
|
||||
*.gz) gunzip "$dirpref""$archive" ;;
|
||||
*.tar) tar xvf "$dirpref""$archive" ;;
|
||||
*.tbz2) tar xvjf "$dirpref""$archive" ;;
|
||||
*.tgz) tar xvzf "$dirpref""$archive" ;;
|
||||
*.zip) unzip "$dirpref""$archive" ;;
|
||||
*.Z) uncompress "$dirpref""$archive" ;;
|
||||
*.7z) 7z x "$dirpref""$archive" ;;
|
||||
*.xz) unxz "$dirpref""$archive" ;;
|
||||
*.exe) cabextract "$dirpref""$archive" ;;
|
||||
*) echo "extract: '$archive' - unknown archive method" ;;
|
||||
esac
|
||||
else
|
||||
echo "$1 - file does not exist"
|
||||
fi
|
||||
echo "File \"$archive\" not found."
|
||||
fi
|
||||
|
||||
|
|
Reference in New Issue