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
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
call plug#begin()
|
||||
# Plug 'nvim-tree/nvim-tree.lua'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'romgrk/barbar.nvim'
|
||||
Plug 'lukas-reineke/indent-blankline.nvim'
|
||||
Plug 'm4xshen/autoclose.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
|
||||
|
|
@ -17,6 +16,10 @@ if exists(':GuiRenderLigatures')
|
|||
GuiRenderLigatures 1
|
||||
endif
|
||||
|
||||
if exists(':GuiFont')
|
||||
GuiFont FiraCode\ Nerd\ Font
|
||||
endif
|
||||
|
||||
set nowrap
|
||||
|
||||
set clipboard=unnamedplus
|
||||
|
|
@ -30,7 +33,7 @@ set noexpandtab
|
|||
|
||||
nmap <F2> :w<CR>
|
||||
imap <F2> <C-O>:w<CR>
|
||||
nmap <F3> :NERDTreeToggle<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>
|
||||
|
|
@ -46,6 +49,8 @@ nmap <C-Right> :BufferNext<CR>
|
|||
nmap <C-Left> :BufferPrevious<CR>
|
||||
nmap <C-q> :BufferClose<CR>
|
||||
|
||||
autocmd BufRead * DetectIndent
|
||||
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
||||
|
|
@ -65,9 +70,4 @@ let g:smap = get(g:, 'smap', {})
|
|||
let g:smap.l = {'name' : 'language'}
|
||||
call leaderGuide#register_prefix_descriptions("<Space>", "g:smap")
|
||||
|
||||
au BufReadPost *.ets set syntax=typescript
|
||||
|
||||
lua require("feline").setup()
|
||||
lua require("ibl").setup()
|
||||
lua require("autoclose").setup()
|
||||
lua require("nvim-tree").setup()
|
||||
lua require('feline').setup()
|
||||
9
set-symlinks.sh
Executable file
9
set-symlinks.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
stow --target "$HOME" --dir "$SCRIPT_DIR" home
|
||||
Loading…
Add table
Add a link
Reference in a new issue