stow
This commit is contained in:
parent
88a083861c
commit
9f27ccae29
17 changed files with 1685 additions and 0 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
muttrc filter=git-crypt diff=git-crypt
|
||||
global/.ssh/config filter=git-crypt diff=git-crypt
|
1
.github/README.md
vendored
Normal file
1
.github/README.md
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
...
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "linux/.config/mutt/gruvbox"]
|
||||
path = linux/.config/mutt/gruvbox
|
||||
url = https://git.sthu.org/repos/mutt-gruvbox.git
|
17
global/.gitconfig
Normal file
17
global/.gitconfig
Normal file
|
@ -0,0 +1,17 @@
|
|||
[user]
|
||||
name = foozzi
|
||||
email = foozzione@gmail.com
|
||||
[core]
|
||||
excludesfile = "$HOME/.gitignore"
|
||||
pager = delta
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
[delta]
|
||||
navigate = true # use n and N to move between diff sections
|
||||
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
|
||||
[merge]
|
||||
conflictstyle = diff3
|
||||
[diff]
|
||||
colorMoved = default
|
||||
[init]
|
||||
defaultBranch = master
|
28
global/.ideavimrc
Normal file
28
global/.ideavimrc
Normal file
|
@ -0,0 +1,28 @@
|
|||
" load system vim config
|
||||
source ~/.vimrc
|
||||
set ideajoin
|
||||
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
|
||||
" the same commands as the original .vimrc configuration.
|
||||
" You can find a list of commands here: https://jb.gg/h38q75
|
||||
" Find more examples here: https://jb.gg/share-ideavimrc
|
||||
|
||||
|
||||
" Don't use Ex mode, use Q for formatting.
|
||||
map Q gq
|
||||
|
||||
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
|
||||
"" Map \r to the Reformat Code action
|
||||
"" map \r <Action>(ReformatCode)
|
||||
|
||||
"" Map <leader>d to start debug
|
||||
"map <leader>d <Action>(Debug)
|
||||
|
||||
"" Map \b to toggle the breakpoint on the current line
|
||||
"map \b <Action>(ToggleLineBreakpoint)
|
||||
""
|
||||
map <leader>nf <Action>(NewFile)
|
||||
map <leader>nd <Action>(NewDir)
|
||||
map <leader>tt <Action>(ActivateTerminalToolWindow)
|
||||
map <leader>rr <Action>(IdeaVim.ReloadVimRc.reload)
|
||||
map <leader>go <Action>(GotoDeclaration)
|
||||
map <leader>ru <Action>(runShellFileAction)
|
BIN
global/.ssh/config
Normal file
BIN
global/.ssh/config
Normal file
Binary file not shown.
11
global/.tern-project
Normal file
11
global/.tern-project
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ecmaVersion": 6,
|
||||
"libs": [
|
||||
"browser",
|
||||
"react"
|
||||
],
|
||||
"plugins": {
|
||||
"node": {},
|
||||
"jsx": {}
|
||||
}
|
||||
}
|
25
global/scripts/vimwiki_diary_template
Executable file
25
global/scripts/vimwiki_diary_template
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python3
|
||||
import datetime
|
||||
import urllib.request
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
|
||||
weather_url = "https://wttr.in/Ottawa?format="
|
||||
url_part = "Time:+%T;+%l:+%c+%t+(%f);+%m;+Precipitation:+%p+(3hour);+Pressure:+%P;+UV index:+%u;+Sunrise:+%S;+Dawn:+%D;"
|
||||
encode_url_part = quote_plus(url_part)
|
||||
|
||||
template = """
|
||||
Date: {date}
|
||||
Weather: {weather}
|
||||
|
||||
== Notes ==
|
||||
"""
|
||||
|
||||
current_date_time = datetime.datetime.now()
|
||||
formatted_date_time = current_date_time.strftime('%a %b %d %H:%M:%S %Z %Y')
|
||||
|
||||
response = urllib.request.urlopen(weather_url + encode_url_part)
|
||||
weather_data = response.read().decode("utf-8").replace("+", " ")
|
||||
|
||||
|
||||
print(template.format(date=formatted_date_time, weather=weather_data))
|
1016
linux/.config/alacritty/alacritty.yml
Normal file
1016
linux/.config/alacritty/alacritty.yml
Normal file
File diff suppressed because it is too large
Load diff
35
linux/.config/mutt/gruvbox/README.md
Normal file
35
linux/.config/mutt/gruvbox/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# A gruvbox color scheme for mutt and neomutt
|
||||
|
||||
## Description
|
||||
|
||||
[Gruvbox](https://github.com/morhetz/gruvbox) is a well designed, popular
|
||||
colorscheme for vim. This is a port to mutt and neomutt, in which vim can act
|
||||
as mail composer.
|
||||
|
||||
This is a replication of the repository
|
||||
[here](https://git.sthu.org/?p=mutt-gruvbox.git;a=summary). The
|
||||
[website](https://www.sthu.org/code/codesnippets/mutt-gruvbox.html) gives
|
||||
further details and a screenshot, like this:
|
||||
|
||||

|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Download the files or clone the repo, e.g.
|
||||
|
||||
cd ~/.mutt
|
||||
git clone https://git.sthu.org/repos/mutt-gruvbox.git gruvbox
|
||||
|
||||
Then source them in your `~/.mutt/muttrc`, e.g.
|
||||
|
||||
source ~/.mutt/gruvbox/colors-gruvbox-shuber.muttrc
|
||||
# For neomutt also add this line:
|
||||
# source ~/.mutt/gruvbox/colors-gruvbox-shuber-extended.muttrc
|
||||
|
||||
The colorscheme is split into two files, where the latter also defines colors
|
||||
for neomutt.
|
||||
|
||||
## License
|
||||
|
||||
GNU Lesser General Public License v3.
|
|
@ -0,0 +1 @@
|
|||
color sidebar_unread color108 color234
|
121
linux/.config/mutt/gruvbox/colors-gruvbox-shuber.muttrc
Normal file
121
linux/.config/mutt/gruvbox/colors-gruvbox-shuber.muttrc
Normal file
|
@ -0,0 +1,121 @@
|
|||
# gruvbox dark (contrast dark):
|
||||
|
||||
# bg0 = 234
|
||||
# bg1 = 237
|
||||
# bg2 = 239
|
||||
# bg3 = 241
|
||||
# bg4 = 243
|
||||
#
|
||||
# gray = 245
|
||||
#
|
||||
# fg0 = 229
|
||||
# fg1 = 223
|
||||
# fg2 = 250
|
||||
# fg3 = 248
|
||||
# fg4 = 246
|
||||
#
|
||||
# red = 167
|
||||
# green = 142
|
||||
# yellow = 214
|
||||
# blue = 109
|
||||
# purple = 175
|
||||
# aqua = 108
|
||||
# orange = 208
|
||||
|
||||
|
||||
# See http://www.mutt.org/doc/manual/#color
|
||||
|
||||
color attachment color109 color234
|
||||
color bold color229 color234
|
||||
color error color167 color234
|
||||
color hdrdefault color246 color234
|
||||
color indicator color223 color237
|
||||
color markers color243 color234
|
||||
color normal color223 color234
|
||||
color quoted color250 color234
|
||||
color quoted1 color108 color234
|
||||
color quoted2 color250 color234
|
||||
color quoted3 color108 color234
|
||||
color quoted4 color250 color234
|
||||
color quoted5 color108 color234
|
||||
color search color234 color208
|
||||
color signature color108 color234
|
||||
color status color234 color250
|
||||
color tilde color243 color234
|
||||
color tree color142 color234
|
||||
color underline color223 color239
|
||||
|
||||
color sidebar_divider color250 color234
|
||||
color sidebar_new color142 color234
|
||||
|
||||
color index color142 color234 ~N
|
||||
color index color108 color234 ~O
|
||||
color index color109 color234 ~P
|
||||
color index color214 color234 ~F
|
||||
color index color175 color234 ~Q
|
||||
color index color167 color234 ~=
|
||||
color index color234 color223 ~T
|
||||
color index color234 color167 ~D
|
||||
|
||||
color header color214 color234 "^(To:|From:)"
|
||||
color header color142 color234 "^Subject:"
|
||||
color header color108 color234 "^X-Spam-Status:"
|
||||
color header color108 color234 "^Received:"
|
||||
|
||||
# Regex magic for URLs and hostnames
|
||||
#
|
||||
# Attention: BSD's regex has RE_DUP_MAX set to 255.
|
||||
#
|
||||
# Examples:
|
||||
# http://some-service.example.com
|
||||
# example.com
|
||||
# a.example.com
|
||||
# some-service.example.com
|
||||
# example.com/
|
||||
# example.com/datenschutz
|
||||
# file:///tmp/foo
|
||||
#
|
||||
# Non-examples:
|
||||
# 1.1.1900
|
||||
# 14.02.2022/24:00
|
||||
# 23.59
|
||||
# w.l.o.g
|
||||
# team.its
|
||||
color body color142 color234 "[a-z]{3,255}://[[:graph:]]*"
|
||||
color body color142 color234 "([-[:alnum:]]+\\.)+([0-9]{1,3}|[-[:alpha:]]+)/[[:graph:]]*"
|
||||
color body color142 color234 "([-[:alnum:]]+\\.){2,255}[-[:alpha:]]{2,10}"
|
||||
|
||||
# IPv4 and IPv6 stolen from https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses
|
||||
color body color142 color234 "((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
|
||||
color body color142 color234 "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))"
|
||||
|
||||
# Mail addresses and mailto URLs
|
||||
color body color208 color234 "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"
|
||||
color body color208 color234 "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
|
||||
|
||||
# some simleys and stuff
|
||||
color body color234 color214 "[;:]-*[)>(<lt;|]"
|
||||
color body color229 color234 "\\*[- A-Za-z]+\\*"
|
||||
|
||||
color body color214 color234 "^-.*PGP.*-*"
|
||||
color body color142 color234 "^gpg: Good signature from"
|
||||
color body color167 color234 "^gpg: Can't.*$"
|
||||
color body color214 color234 "^gpg: WARNING:.*$"
|
||||
color body color167 color234 "^gpg: BAD signature from"
|
||||
color body color167 color234 "^gpg: Note: This key has expired!"
|
||||
color body color214 color234 "^gpg: There is no indication that the signature belongs to the owner."
|
||||
color body color214 color234 "^gpg: can't handle these multiple signatures"
|
||||
color body color214 color234 "^gpg: signature verification suppressed"
|
||||
color body color214 color234 "^gpg: invalid node with packet of type"
|
||||
|
||||
color body color142 color234 "^Good signature from:"
|
||||
color body color167 color234 "^.?BAD.? signature from:"
|
||||
color body color142 color234 "^Verification successful"
|
||||
color body color167 color234 "^Verification [^s][^[:space:]]*$"
|
||||
|
||||
color compose header color223 color234
|
||||
color compose security_encrypt color175 color234
|
||||
color compose security_sign color109 color234
|
||||
color compose security_both color142 color234
|
||||
color compose security_none color208 color234
|
||||
|
4
linux/.config/mutt/mailcap
Normal file
4
linux/.config/mutt/mailcap
Normal file
|
@ -0,0 +1,4 @@
|
|||
text/html; firefox %s; test=test -n "$display"; needsterminal;
|
||||
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput;
|
||||
text/plain; cat %s; copiousoutput
|
||||
application/pdf; firefox %s; test=test -n "$display"; needsterminal;
|
BIN
linux/.config/mutt/muttrc
Normal file
BIN
linux/.config/mutt/muttrc
Normal file
Binary file not shown.
56
linux/.tmux.conf
Executable file
56
linux/.tmux.conf
Executable file
|
@ -0,0 +1,56 @@
|
|||
# mouse
|
||||
setw -g mouse on
|
||||
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
|
||||
set -g mode-keys vi
|
||||
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"
|
||||
|
||||
set -g default-terminal "xterm-256color"
|
||||
|
||||
# reset gpg-agent password cache after close the pane (vimwiki diary)
|
||||
set-hook -g window-unlinked 'run-shell "gpgconf --reload gpg-agent"'
|
||||
|
||||
# pane navigation
|
||||
# bind -n M-h select-pane -L
|
||||
# bind -n M-j select-pane -D
|
||||
# bind -n M-k select-pane -U
|
||||
# bind -n M-l select-pane -R
|
||||
|
||||
# windows
|
||||
bind -n M-t new-window
|
||||
bind -n M-X kill-window
|
||||
bind -n M-n next-window
|
||||
bind -n M-p last-window
|
||||
bind -n M-e split-window -v -c '#{pane_current_path}'
|
||||
bind -n M-d split-window -h -c '#{pane_current_path}'
|
||||
bind -n M-W kill-pane
|
||||
|
||||
# Automatic restore
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
#set -g @resurrect-processes ''
|
||||
|
||||
set -g @catppuccin_window_status_icon_enable "yes"
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
set -g @catppuccin_status_left_separator "█"
|
||||
set -g @catppuccin_status_fill "all"
|
||||
set -g @catppuccin_status_modules_right "application session battery"
|
||||
set -g @catppuccin_application_icon ""
|
||||
|
||||
# plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @plugin 'tmux-plugins/tmux-battery'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
|
||||
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
261
linux/.vimrc
Normal file
261
linux/.vimrc
Normal file
|
@ -0,0 +1,261 @@
|
|||
" Base settings (add comments)
|
||||
set nocompatible
|
||||
syntax on " syntax highlight
|
||||
|
||||
set clipboard=unnamedplus
|
||||
|
||||
set t_Co=256 " set 256 colors
|
||||
|
||||
set number " show line numbers
|
||||
set ruler
|
||||
set ttyfast " terminal acceleration
|
||||
|
||||
set tabstop=4 " 4 whitespaces for tabs visual presentation
|
||||
set shiftwidth=4 " shift lines by 4 spaces
|
||||
set smarttab " set tabs for a shifttabs logic
|
||||
set expandtab " expand tabs into spaces
|
||||
set autoindent " indent when moving to the next line while writing code
|
||||
|
||||
set cursorline " shows line under the cursor's line
|
||||
set showmatch " shows matching part of bracket pairs (), [], {}
|
||||
|
||||
set enc=utf-8 " utf-8 by default
|
||||
|
||||
set nobackup " no backup files
|
||||
set nowritebackup " only in case you don't want a backup file while editing
|
||||
set noswapfile " no swap files
|
||||
|
||||
set backspace=indent,eol,start " backspace removes all (indents, EOLs, start) What is start?
|
||||
|
||||
set scrolloff=10 " let 10 lines before/after cursor during scroll
|
||||
|
||||
set clipboard=unnamed " use system clipboard
|
||||
|
||||
set exrc " enable usage of additional .vimrc files from working directory
|
||||
set secure " prohibit .vimrc files to execute shell, create files, etc...
|
||||
|
||||
let mapleader = " " " leader key
|
||||
|
||||
" Buffers
|
||||
set switchbuf=useopen " open buffer instead of creating a new one
|
||||
set laststatus=2
|
||||
" close current buffer
|
||||
nmap <leader>bc :bd<CR>
|
||||
|
||||
" Search
|
||||
set incsearch " incremental search
|
||||
set hlsearch " highlight search results
|
||||
|
||||
" highlight 'long' lines (>= 80 symbols) in python files
|
||||
augroup vimrc_autocmds
|
||||
autocmd!
|
||||
autocmd FileType python,rst,c,cpp highlight Excess ctermbg=DarkGrey guibg=Black
|
||||
autocmd FileType python,rst,c,cpp match Excess /\%81v.*/
|
||||
autocmd FileType python,rst,c,cpp set nowrap
|
||||
autocmd FileType python,rst,c,cpp set colorcolumn=80
|
||||
|
||||
autocmd FileType vimwiki set wrap
|
||||
autocmd FileType vimwiki set textwidth=80
|
||||
augroup END
|
||||
|
||||
" terminal
|
||||
cabbrev bterm bo term
|
||||
autocmd TerminalWinOpen *
|
||||
\ if &buftype == 'terminal' |
|
||||
\ resize 10 |
|
||||
"\ setlocal termwinsize=0x140 |
|
||||
\ endif
|
||||
nmap <leader>tt :bterm<CR>
|
||||
|
||||
autocmd FileType html setlocal tabstop=2 shiftwidth=2 softtabstop=2
|
||||
autocmd FileType css setlocal tabstop=2 shiftwidth=2 softtabstop=2
|
||||
autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 softtabstop=2
|
||||
|
||||
" plugings
|
||||
call plug#begin()
|
||||
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
Plug 'tommcdo/vim-exchange'
|
||||
Plug 'michaeljsmith/vim-indent-object'
|
||||
Plug 'vimwiki/vimwiki'
|
||||
Plug 'mattn/calendar-vim'
|
||||
Plug 'jamessan/vim-gnupg'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
" https://github.com/LunarWatcher/auto-pairs/blob/master/doc/AutoPairs.txt
|
||||
Plug 'LunarWatcher/auto-pairs'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'mhinz/vim-startify'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-obsession'
|
||||
Plug 'ycm-core/YouCompleteMe'
|
||||
Plug 'dense-analysis/ale'
|
||||
Plug 'SirVer/ultisnips'
|
||||
Plug 'honza/vim-snippets'
|
||||
Plug 'majutsushi/tagbar'
|
||||
|
||||
call plug#end()
|
||||
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype plugin indent on
|
||||
|
||||
" tagbar
|
||||
let g:tagbar_autofocus=0
|
||||
let g:tagbar_width=42
|
||||
autocmd BufEnter *.py :call tagbar#autoopen(0)
|
||||
|
||||
" ultisnips
|
||||
let g:UltiSnipsExpandTrigger = '<C-j>'
|
||||
let g:UltiSnipsJumpForwardTrigger = '<C-j>'
|
||||
let g:UltiSnipsJumpBackwardTrigger = '<C-k>'
|
||||
|
||||
" easymotion
|
||||
map <leader>F <Plug>(easymotion-s)
|
||||
map <leader>f <Plug>(easymotion-f)
|
||||
" nerdtree
|
||||
map <c-t> :NERDTree<CR>
|
||||
nmap " :NERDTreeToggle<CR>
|
||||
let NERDTreeIgnore=['\.pyc$', '\.pyo$', '__pycache__$'] " Ignore files in NERDTree
|
||||
let NERDTreeWinSize=40
|
||||
" autocmd VimEnter * if !argc() | NERDTree | endif " Load NERDTree only if vim is run without arguments
|
||||
|
||||
" fzf
|
||||
set rtp+=/opt/homebrew/opt/fzf
|
||||
nmap <leader>bb :Buffers<CR>
|
||||
|
||||
" auto-pairs
|
||||
let g:AutoPairsMapBS = 1
|
||||
let g:AutoPairsBSAfter = 0
|
||||
|
||||
" airline
|
||||
let g:airline#extensions#obsession#enable = 1
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#ale#enabled = 1
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline#extensions#whitespace#enabled = 0
|
||||
let g:airline_theme='gruvbox'
|
||||
if !exists('g:airline_symbols')
|
||||
let g:airline_symbols = {}
|
||||
endif
|
||||
let g:airline_symbols.linenr = ' ☰ '
|
||||
let g:airline_symbols.colnr = ' : '
|
||||
let g:airline_symbols.maxlinenr = ''
|
||||
|
||||
" theme
|
||||
autocmd vimenter * ++nested colorscheme gruvbox
|
||||
set background=dark
|
||||
let g:gruvbox_contrast_dark='soft'
|
||||
|
||||
" vim wiki
|
||||
let g:GPGFilePattern = '*.\(gpg\|asc\|pgp\)\(.wiki\|.md\)\='
|
||||
" toogle checklists
|
||||
nnoremap <leader>cl :VimwikiToggleListItem<CR>
|
||||
" reset gpg-agent password cache after close or save the buffer (vimwiki diary)
|
||||
autocmd BufWritePost *.asc.md !gpgconf --reload gpg-agent
|
||||
" https://github.com/WnP/vimwiki_markdown
|
||||
" ~/vimwiki/personal - private content
|
||||
" ~/vimwiki/public_wiki - public wiki content
|
||||
" ~/vimwiki/diary - private diary
|
||||
let default_wiki = '~/vimwiki/personal'
|
||||
let public_wiki = '~/vimwiki/public_wiki'
|
||||
let g:diary = '~/vimwiki/diary'
|
||||
let g:diary_index_name = 'diary'
|
||||
let g:diary_ext = '.asc.md'
|
||||
let g:vimwiki_list = [{
|
||||
\ 'path': default_wiki,
|
||||
\ 'diary_rel_path': '../diary',
|
||||
\ 'auto_diary_index': 1,
|
||||
\ 'auto_export': 0},
|
||||
\ {'path': public_wiki,
|
||||
\ 'auto_export': 0,
|
||||
\ 'diary_rel_path': '../diary',
|
||||
\ 'template_path': public_wiki . '/templates/',
|
||||
\ 'template_default': 'default',
|
||||
\ 'syntax': 'markdown',
|
||||
\ 'ext': '.md',
|
||||
\ 'path_html': public_wiki . '/site_html/',
|
||||
\ 'custom_wiki2html': 'vimwiki_markdown',
|
||||
\ 'template_ext': '.tpl'},
|
||||
\ {'path': diary,
|
||||
\ 'index': diary_index_name,
|
||||
\ 'ext': diary_ext,
|
||||
\ 'diary_rel_path': './',
|
||||
\ 'auto_diary_index': 1,
|
||||
\ 'auto_export': 0}]
|
||||
" fix - https://github.com/vimwiki/vimwiki/issues/1055
|
||||
exe 'autocmd BufEnter ' . diary_index_name . diary_ext . ' :VimwikiDiaryGenerateLinks'
|
||||
" inserting default diary template
|
||||
function! AppendDiaryTemplate()
|
||||
" detecting path of current buffer
|
||||
let current_dir = substitute(expand('%:p:h'), '^' . $HOME, '~', '')
|
||||
if current_dir == g:diary
|
||||
r! ~/scripts/vimwiki_diary_template
|
||||
execute '1,2d'
|
||||
normal G
|
||||
normal o
|
||||
endif
|
||||
endfunction
|
||||
command! InsertDiaryTemplate call AppendDiaryTemplate()
|
||||
nnoremap <leader>idr :InsertDiaryTemplate<CR>
|
||||
" inserting default GPG fingerprint for the diary
|
||||
let g:diaryGPG = 'CE7EB8727486553012A04E284EE708165AA10C48'
|
||||
" inserting default GPG fingerprint for the personal notes
|
||||
let g:personalGPG = '5F2D798AC3A4A1B1A0CAA868EBE731F3329F400C'
|
||||
command! InsertGPGAndExit call AppendGPGAndExit()
|
||||
function! AppendGPGAndExit()
|
||||
" detecting vim-gnupg dialog
|
||||
if match(getline(2), '^GPG:') == 0
|
||||
call append(line('.'), g:diaryGPG)
|
||||
wq
|
||||
endif
|
||||
endfunction
|
||||
nnoremap <leader>igg :InsertGPGAndExit<CR>
|
||||
|
||||
command! InsertDiaryGPGAndExit call AppendDiaryGPGAndExit()
|
||||
function! AppendDiaryGPGAndExit()
|
||||
" detecting vim-gnupg dialog
|
||||
if match(getline(2), '^GPG:') == 0
|
||||
call append(line('.'), g:personalGPG)
|
||||
wq
|
||||
endif
|
||||
endfunction
|
||||
nnoremap <leader>igp :InsertDiaryGPGAndExit<CR>
|
||||
|
||||
" prettier
|
||||
nmap <leader>mm <Plug>(PrettierAsync)
|
||||
|
||||
" ALE
|
||||
let g:ale_linters = {
|
||||
\ 'python': ['ruff', 'mypy', 'pyright'],
|
||||
\}
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'python': ['ruff', 'ruff_format'],
|
||||
\ 'javascript': ['prettier', 'eslint'],
|
||||
\}
|
||||
let g:ale_fix_on_save = 1
|
||||
map <C-e> <Plug>(ale_next_wrap)
|
||||
map <C-r> <Plug>(ale_previous_wrap)
|
||||
nmap <leader>go :ALEGoToDefinition<CR>
|
||||
nmap <leader>qf :ALEFix<CR>
|
||||
nmap <leader>k :ALEHover<CR>
|
||||
let g:ale_python_auto_virtualenv = 1
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
" YCM
|
||||
set completeopt-=preview
|
||||
" autocmd CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
"
|
||||
set langmap=йq,цw,уe,кr,еt,нy,гu,шi,щo,зp,х[,ъ],фa,ыs,вd,аf,пg,рh,оj,лk,дl,ж\\;,э',ё\\,яz,чx,сc,мv,иb,тn,ьm,б\\,,ю.,ЙQ,ЦW,УE,КR,ЕT,НY,ГU,ШI,ЩO,ЗP,Х{,Ъ},ФA,ЫS,ВD,АF,ПG,РH,ОJ,ЛK,ДL,Ж:,Э\\",ЯZ,ЧX,СC,МV,ИB,ТN,ЬM,Б<,Ю>,Ё/|
|
104
linux/.zshrc
Normal file
104
linux/.zshrc
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
ZSH_THEME="robbyrussell"
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git python tmux genpass web-search zsh-syntax-highlighting zsh-autosuggestions)
|
||||
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
# functions
|
||||
### ARCHIVE EXTRACTION
|
||||
# usage: ex <file>
|
||||
ex ()
|
||||
{
|
||||
if [ -f "$1" ] ; then
|
||||
case $1 in
|
||||
*.tar.bz2) tar xjf $1 ;;
|
||||
*.tar.gz) tar xzf $1 ;;
|
||||
*.bz2) bunzip2 $1 ;;
|
||||
*.rar) unrar x $1 ;;
|
||||
*.gz) gunzip $1 ;;
|
||||
*.tar) tar xf $1 ;;
|
||||
*.tbz2) tar xjf $1 ;;
|
||||
*.tgz) tar xzf $1 ;;
|
||||
*.zip) unzip $1 ;;
|
||||
*.Z) uncompress $1;;
|
||||
*.7z) 7z x $1 ;;
|
||||
*.deb) ar x $1 ;;
|
||||
*.tar.xz) tar xf $1 ;;
|
||||
*.tar.zst) unzstd $1 ;;
|
||||
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||
esac
|
||||
else
|
||||
echo "'$1' is not a valid file"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# aliases
|
||||
## tmux
|
||||
alias tsc='tmux switch-client -t'
|
||||
alias tsd='tmux new-session -d -s'
|
||||
alias txrd='tmux source-file ~/.tmux.conf'
|
||||
## default command
|
||||
alias cat='bat --paging=never --theme=Dracula'
|
||||
alias ls="eza"
|
||||
alias la="eza -lagh --git --header"
|
||||
alias lt="eza -T --git-ignore"
|
||||
alias nano='micro'
|
||||
## files/dirs
|
||||
alias zshe='vim ~/.zshrc'
|
||||
alias zshs='. ~/.zshrc'
|
||||
## neomutt
|
||||
alias nm='neomutt'
|
||||
## vim
|
||||
alias diary='vim ~/vimwiki/diary/diary.asc.md'
|
||||
## wttr.in
|
||||
alias wr='curl wttr.in'
|
||||
## python
|
||||
alias python='python3'
|
||||
alias py='python'
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
export EDITOR='vim'
|
||||
|
||||
# bindkeys
|
||||
## autosuggest
|
||||
bindkey "^]" autosuggest-accept
|
||||
|
||||
# envs
|
||||
export DISABLE_AUTO_TITLE='true'
|
||||
## fzf dracula theme
|
||||
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS'
|
||||
--color=dark
|
||||
--color=fg:-1,bg:-1,hl:#5fff87,fg+:-1,bg+:-1,hl+:#ffaf5f
|
||||
--color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7'
|
||||
|
||||
# paths
|
||||
## rust
|
||||
source $HOME/.cargo/env
|
||||
## all from local/bin
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
## pdtm
|
||||
export PATH=$PATH:$HOME/.pdtm/go/bin
|
||||
## doom emacs
|
||||
export PATH=$PATH:$HOME/.config/emacs/bin
|
||||
## golang
|
||||
export GOPATH=$HOME/go # don't forget to change your path correctly!
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
export VOLTA_HOME="$HOME/.volta"
|
||||
export PATH="$VOLTA_HOME/bin:$PATH"
|
||||
|
Loading…
Add table
Reference in a new issue