mirror of
https://github.com/kp2pml30/dotfiles.git
synced 2026-02-16 23:34:42 +04:00
adopt stow
This commit is contained in:
parent
5999ccce8a
commit
67857e5ae8
4 changed files with 65 additions and 17 deletions
|
|
@ -1,11 +1,49 @@
|
|||
function read_confirm
|
||||
while true
|
||||
read -l -P "$argv [y/N] " confirm
|
||||
|
||||
switch $confirm
|
||||
case Y y
|
||||
return 0
|
||||
case '' N n
|
||||
return 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function fish_greeting
|
||||
if status is-interactive && ! test -f /encrypt/.exists
|
||||
if test -f /tmp/.skip-encrypt
|
||||
echo "Encrypted drive not installed"
|
||||
return
|
||||
end
|
||||
touch /tmp/.skip-encrypt
|
||||
if read_confirm "Setup encrypted drive?"
|
||||
set home "$HOME"
|
||||
printf "su "
|
||||
sudo bash -c "losetup /dev/loop0 '$HOME/encrypted.vhdx' && cryptsetup open /dev/loop0 loop0 && mount /dev/mapper/loop0 /encrypt"
|
||||
echo "success: $status"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if status is-interactive
|
||||
if test -f ~/.ghcup/env
|
||||
bass source ~/.ghcup/env
|
||||
end
|
||||
if test -x ~/.rbenv/bin/rbenv
|
||||
~/.rbenv/bin/rbenv init - fish | source
|
||||
end
|
||||
if command -v zoxide > /dev/null
|
||||
zoxide init fish | source
|
||||
end
|
||||
end
|
||||
if command -v poetry > /dev/null
|
||||
poetry completions fish | source
|
||||
end
|
||||
if test -f ~/.ghcup/env
|
||||
bass source ~/.ghcup/env
|
||||
end
|
||||
if test -x ~/.rbenv/bin/rbenv
|
||||
~/.rbenv/bin/rbenv init - fish | source
|
||||
end
|
||||
if test -f ~/.opam/opam-init/init.fish
|
||||
source /home/r3vdy-2-b10vv/.opam/opam-init/init.fish
|
||||
end
|
||||
alias clear="printf '\033[2J\033[3J\033[1;1H'"
|
||||
export PATH="$PATH:$HOME/.bin:$HOME/.local/bin"
|
||||
bass source ~/.bashrc
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
font_family firacode
|
||||
include ~/.cache/wal/colors-kitty.conf
|
||||
font_family FiraCode Nerd Font Mono
|
||||
|
|
|
|||
73
home/.config/nvim/init.vim
Normal file
73
home/.config/nvim/init.vim
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
call plug#begin()
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'romgrk/barbar.nvim'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'spinks/vim-leader-guide'
|
||||
Plug 'feline-nvim/feline.nvim'
|
||||
Plug 'folke/tokyonight.nvim', { 'branch': 'main' }
|
||||
Plug 'timakro/vim-yadi'
|
||||
call plug#end()
|
||||
|
||||
set termguicolors
|
||||
colorscheme tokyonight-night
|
||||
if exists(':GuiRenderLigatures')
|
||||
GuiRenderLigatures 1
|
||||
endif
|
||||
|
||||
if exists(':GuiFont')
|
||||
GuiFont FiraCode\ Nerd\ Font
|
||||
endif
|
||||
|
||||
set nowrap
|
||||
|
||||
set clipboard=unnamedplus
|
||||
|
||||
set nu rnu
|
||||
set list
|
||||
set listchars=tab:┆\ ,space:·,nbsp:␣
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set noexpandtab
|
||||
|
||||
nmap <F2> :w<CR>
|
||||
imap <F2> <C-O>:w<CR>
|
||||
map <F3> :NERDTreeToggle<CR>
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
noremap <expr> <Home> (col('.') == matchend(getline('.'), '^\s*')+1 ? '0' : '^')
|
||||
imap <Home> <C-o><Home>
|
||||
|
||||
let s:i = 1
|
||||
while s:i < 10
|
||||
execute printf('nmap <Leader>%i :BufferGoto %i<CR>', s:i, s:i)
|
||||
execute printf('nmap <Space>%i %i<C-w><C-w>', s:i, s:i)
|
||||
let s:i += 1
|
||||
endwhile
|
||||
|
||||
nmap <C-Right> :BufferNext<CR>
|
||||
nmap <C-Left> :BufferPrevious<CR>
|
||||
nmap <C-q> :BufferClose<CR>
|
||||
|
||||
autocmd BufRead * DetectIndent
|
||||
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ coc#pum#visible() ? coc#pum#confirm() : "\<Tab>"
|
||||
nmap <silent> <Space>ld <Plug>(coc-definition)
|
||||
nmap <silent> <Space>lt <Plug>(coc-type-definition)
|
||||
nmap <silent> <Space>li <Plug>(coc-implementation)
|
||||
nmap <silent> <Space>lr <Plug>(coc-references)
|
||||
|
||||
nnoremap <silent> <leader> :<c-u>LeaderGuide '\'<CR>
|
||||
nnoremap <silent> <Space> :<c-u>LeaderGuide '<Space>'<CR>
|
||||
let g:smap = get(g:, 'smap', {})
|
||||
" let g:smap['<Space>'] = get(g:smap, '<Space>', {})
|
||||
" let g:smap['<Space>'].l = 'language'
|
||||
let g:smap.l = {'name' : 'language'}
|
||||
call leaderGuide#register_prefix_descriptions("<Space>", "g:smap")
|
||||
|
||||
lua require('feline').setup()
|
||||
Loading…
Add table
Add a link
Reference in a new issue