update from tmp base16 fix
This commit is contained in:
32
.bashrc
32
.bashrc
@@ -64,20 +64,38 @@ if [ -d "$HOME/.local/bin" ] ; then
|
||||
fi
|
||||
|
||||
|
||||
#fast fuzzy file searching with fzf and ripgrep if installed
|
||||
#---begin fzf setup---
|
||||
#fast fuzzy file searching with fzf
|
||||
#fzf kbd shortcuts: <alt-c>, <ctrl-t>, <ctrl-p>
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
source /usr/share/fzf/completion.bash
|
||||
#export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
|
||||
export FZF_DEFAULT_COMMAND='rg -i --files --glob "!.git/*"'
|
||||
|
||||
alias fzfcmd='fzf --bind "enter:execute(nvim {})"'
|
||||
#use ripgrep with fzf
|
||||
export FZF_DEFAULT_COMMAND='rg -i --files --glob "!.git/*"'
|
||||
#export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
|
||||
|
||||
#bat instead of cat
|
||||
#fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
|
||||
|
||||
#or use fd with fzf
|
||||
# export FZF_DEFAULT_COMMAND="fd --type file --color=always"
|
||||
# export FZF_DEFAULT_COMMAND='fd --type file --hidden --color=always --follow --exclude .git'
|
||||
# export FZF_DEFAULT_OPTS="--ansi"
|
||||
|
||||
#use ansi color codes and bind ctrl-y to copy selection
|
||||
export FZF_DEFAULT_OPTS=' --ansi --bind "ctrl-y:execute-silent(printf {} | cut -f 2- | wl-copy --trim-newline)"'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
||||
#bind ctrl-p to text editor
|
||||
alias fzfcmd='fzf --bind "enter:execute($EDITOR {})"'
|
||||
bind -x '"\C-p": fzfcmd;'
|
||||
# bind -x '"\C-p": nvim $(fzf);'
|
||||
|
||||
#setup history for fzf
|
||||
# HISTFILESIZE=4096
|
||||
HISTCONTROL=ignoreboth:erasedups
|
||||
export HISTIGNORE="ls:cd:exit:ps:history:pass:gpg:start*"
|
||||
export HISTSIZE=4096
|
||||
export HISTFILESIZE=16384
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
shopt -s histappend
|
||||
# export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S | '
|
||||
|
||||
# if [ -d "$HOME/bin/Fiji.app" ]; then
|
||||
|
||||
@@ -29,7 +29,7 @@ order += "ipv6"
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
#order += "run_watch DHCP"
|
||||
order += "path_exists ovpn"
|
||||
#order += "path_exists ovpn"
|
||||
order += "path_exists wgvpn"
|
||||
order += "path_exists wg0"
|
||||
order += "battery all"
|
||||
@@ -64,10 +64,10 @@ disk "/" {
|
||||
format = "%avail"
|
||||
}
|
||||
|
||||
path_exists ovpn {
|
||||
# path exists when a VPN tunnel launched by nmcli/nm-applet is active
|
||||
path = "/proc/sys/net/ipv4/conf/tun0"
|
||||
}
|
||||
#path_exists ovpn {
|
||||
# # path exists when a VPN tunnel launched by nmcli/nm-applet is active
|
||||
# path = "/proc/sys/net/ipv4/conf/tun0"
|
||||
#}
|
||||
|
||||
path_exists wgvpn {
|
||||
# path exists when a WireGuard VPN tunnel is active
|
||||
@@ -84,6 +84,6 @@ run_watch DHCP {
|
||||
#update the following device path for temp1_input as needed
|
||||
cpu_temperature 0 {
|
||||
format = "%degrees °C"
|
||||
path = "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input"
|
||||
path = "/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input"
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
Default HP402dn
|
||||
Default HP402
|
||||
|
||||
41
.vimrc
41
.vimrc
@@ -34,19 +34,11 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
"tmp fix for chriskempson/base16-vim issue197
|
||||
" https://github.com/chriskempson/base16-vim/issues/197
|
||||
"can switch to danielwe/base16-vim below...
|
||||
function FixupBase16(info)
|
||||
!sed -i '/Base16hi/\! s/a:\(attr\|guisp\)/l:\1/g' ~/.vim/plugged/base16-vim/colors/*.vim
|
||||
endfunction
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug '/usr/bin/fzf'
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'tpope/vim-sensible'
|
||||
|
||||
Plug 'chriskempson/base16-vim', { 'do': function('FixupBase16') }
|
||||
Plug 'chriskempson/base16-vim'
|
||||
|
||||
" Writing mode toggle `:Goyo` and `:Limelight`
|
||||
Plug 'junegunn/goyo.vim'
|
||||
@@ -122,6 +114,7 @@ Plug 'freitass/todo.txt-vim'
|
||||
" Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
|
||||
" jupyter independent ipython repl and other languages too
|
||||
" Plug 'Vigemus/iron.nvim'
|
||||
Plug 'jupyter-vim/jupyter-vim'
|
||||
|
||||
"latex
|
||||
" Plug 'lervag/vimtex'
|
||||
@@ -187,7 +180,7 @@ let g:tagbar_type_bib = {
|
||||
|
||||
"Python repl config
|
||||
" let g:loaded_python_provider = 0
|
||||
" let g:python3_host_prog = '/usr/bin/python3'
|
||||
let g:python3_host_prog = '/usr/bin/python3'
|
||||
" let g:slime_target = 'tmux'
|
||||
" let g:slime_python_ipython = 1
|
||||
"
|
||||
@@ -195,6 +188,14 @@ let g:tagbar_type_bib = {
|
||||
":SlimeConfig
|
||||
" https://github.com/jpalardy/vim-slime
|
||||
|
||||
" jupyter-vim config
|
||||
let g:jupyter_cell_separators = ['##', '#%%', '# %%', '# <codecell>', '```']
|
||||
nnoremap <buffer> <silent> <localleader>r :JupyterSendCell<CR>
|
||||
" execute lines in visual mode: <localleader>e
|
||||
" buffer local var for kernel can be python, ir, javascript, julia, rust
|
||||
" b:jupyter_kernel_type =
|
||||
"JupyterSendRange
|
||||
|
||||
":vertical terminal ipython
|
||||
"set updatetime=100
|
||||
|
||||
@@ -285,6 +286,11 @@ nmap <Space> i
|
||||
vmap <C-c> "+y
|
||||
"use system clipboard: Now yank y, delete d, or paste p work to/from system
|
||||
set clipboard=unnamedplus
|
||||
" link yanking and pasting to system clipboard under Wayland
|
||||
" from https://github.com/vim/vim/issues/5157
|
||||
xnoremap "+y y:call system("wl-copy", @")<cr>
|
||||
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p
|
||||
|
||||
"Auto fix common spelling errors
|
||||
:ab teh the
|
||||
@@ -301,6 +307,17 @@ augroup END
|
||||
|
||||
set title
|
||||
|
||||
" Triger `autoread` when files changes on disk
|
||||
" https://unix.stackexchange.com/questions/149209/refresh-changed-content-of-file-opened-in-vim/383044#383044
|
||||
" https://vi.stackexchange.com/questions/13692/prevent-focusgained-autocmd-running-in-command-line-editing-mode
|
||||
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI *
|
||||
\ if mode() !~ '\v(c|r.?|!|t)' && getcmdwintype() == '' | checktime | endif
|
||||
|
||||
" Notification after file change
|
||||
" https://vi.stackexchange.com/questions/13091/autocmd-event-for-autoread
|
||||
autocmd FileChangedShellPost *
|
||||
\ echohl WarningMsg | echo "File changed on disk. Buffer reloaded." | echohl None
|
||||
"
|
||||
"latex settings
|
||||
" let g:tex_flavor="latex"
|
||||
" let g:Tex_DefaultTargetFormat =" pdf"
|
||||
@@ -361,12 +378,12 @@ if has("gui_running")
|
||||
" Switch on highlighting the last used search pattern.
|
||||
set hlsearch
|
||||
" Set font
|
||||
set gfn=Inconsolata\ 15
|
||||
set gfn=Inconsolata\ 19
|
||||
" Can toggle gui toolbar with `T` and menu with `m` in guioptions:
|
||||
" default is go=aegimrLtT
|
||||
set go=aegLt
|
||||
":set go+=m or go-=m to toggle menu
|
||||
colorscheme base16-ocean
|
||||
colorscheme base16-atelier-dune
|
||||
autocmd VimEnter * Goyo
|
||||
autocmd VimEnter * Limelight0.8
|
||||
"Switch cursor blink rate to 0msec
|
||||
|
||||
Reference in New Issue
Block a user