diff --git a/dot_muttrc b/dot_muttrc new file mode 100644 index 0000000..266be26 --- /dev/null +++ b/dot_muttrc @@ -0,0 +1,206 @@ +source ~/.mutt/gruvbox-dark.muttrc + +# Paths ---------------------------------------------- +set folder = ~/.mail # mailbox location +# source ~/.mutt/mailboxes +set header_cache = ~/.mutt/cache # where to store headers +set header_cache_backend = kyotocabinet +set message_cachedir = $header_cache # where to store bodies +set certificate_file = ~/.mutt/certificates # where to store certs +set mailcap_path = ~/.mutt/mailcap # entries for filetypes +set tmpdir = ~/.mutt/tmp # where to keep temp files + +## Mutt Aliases +source ~/.mutt/aliases.muttrc + +## Abook +set query_command= "abook --mutt-query '%s'" + +# Basic Options -------------------------------------- +set wait_key = no # shut up, mutt +set mbox_type = Maildir # mailbox type +set timeout = 1 # idle time before scanning +set sleep_time = 0 # idle time before scanning +set mail_check = 0 # minimum time between scans +unset move # gmail does that +set delete # don't ask, just do +unset confirmappend # don't ask, just do! +set quit # don't ask, just do!! +unset mark_old # read/new is good enough for me +set beep_new # bell on new mails +set pipe_decode # strip headers and eval mimes when piping +set thorough_search # strip headers and eval mimes before searching +set sidebar_visible = no + +# Status Bar ----------------------------------------- +set status_chars = " *%A" +set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" + +# Header Options ------------------------------------- +ignore * # ignore all headers +unignore from date subject to cc tags +unhdr_order * # some distros order things by default +hdr_order from date subject to cc tags # and in this order + +# Index View Options --------------------------------- +set date_format = "%d/%m/%Y" +set index_format = "[%Z] %D %-20.20F %s" +set sort = threads # like gmail +set sort_aux = reverse-last-date-received # like gmail +set collapse_unread = yes +set uncollapse_jump = yes +folder-hook . "exec collapse-all" +set sort_re # thread based on regex +set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" +save-hook . '=' + +# Pager View Options --------------------------------- +set pager_index_lines = 10 # number of index lines to show +set pager_stop # don't go to next message automatically +set menu_scroll # scroll in menus +set tilde # show tildes like in vim +unset markers # no ugly plus signs +set smart_wrap +set menu_context = 5 +set menu_move_off = no +set pager_context = 5 + +set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+" +alternative_order text/plain text/calendar text/enriched text/html +auto_view text/html +auto_view text/calendar +auto_view application/ics +set show_multipart_alternative = "info" + +# Key Bindings --------------------------------- +bind generic z noop +bind index,pager,attach g noop +bind index,pager d noop +bind index,pager s noop +bind index,pager c noop +bind generic,pager t noop +bind generic z noop +bind index,pager,attach g noop +bind index,pager d noop +bind index,pager s noop +# bind index,pager c noop +bind generic,pager t noop +bind index,pager e noop + +# by default, use mailbox +set realname = "Jan Eitzinger" +set spoolfile = "+moebius/INBOX" +source ~/.mutt/accounts/moebius + +# when changing into other mailboxes, use different adresses etc. +# folder-hook moebius/* source ~/.mutt/accounts/moebius +# folder-hook fau/* source ~/.mutt/accounts/fau +macro index,pager 'source ~/.mutt/accounts/moebius!' "switch to moebius" +macro index,pager 'source ~/.mutt/accounts/fau!' "switch to fau" + + +bind generic,index,pager next-page +bind generic gg first-entry +bind generic,index G last-entry +bind pager gg top +bind pager G bottom +bind pager k previous-line +bind pager j next-line +bind generic zt current-top +bind generic zz current-middle +bind generic zb current-bottom +bind index collapse-thread +# bind index za collapse-thread +bind index zA collapse-all +bind index,pager N search-opposite + +macro index,pager A "abook --add-email-quiet" "Add this sender to Abook" +bind editor complete-query + +# Go to folder... +macro index,pager gf "?" "open mailbox..." +bind index,pager c change-folder + +# Ctrl-R to mark all as read +macro index \Cr "T~UN." "mark all messages as read" +# +# Saner copy/move dialogs +macro index C "?" "copy a message to a mailbox" +macro index M "?" "move a message to a mailbox" + +# View attachments properly. +bind attach view-mailcap + +bind index,pager R group-reply +bind index,pager e resend-message +bind compose p postpone-message +bind index p recall-message +macro index a "all\n" "show all messages (undo limit)" + +# Actions +# ---------------------------------------------------- + +# macro index A ":set confirmappend=no delete=yes\n=archive\n:set confirmappend=yes delete=ask-yes\n" +macro index,pager dd "" "move message to trash" +macro index,pager dt "" "move thread to trash" +macro index,pager ss ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015?" "save message to a mailbox" +macro index st ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015'q.\\015\"\015q.?" "save thread to a mailbox" +macro index \;s ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015?" "save tagged messages to a mailbox" +macro pager st ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015'q.\\015\"\015q.?" "save thread to a mailbox" +# macro index,pager cc ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015?" "copy message to a mailbox" +# macro index ct ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015'q.\\015\"\015q.?" "copy thread to a mailbox" +# macro index \;c ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015?" "copy tagged messages to a mailbox" +# macro pager ct ":macro browser \\015 \"\\:bind browser \\\\015 select-entry\\015:bind browser q exit\\015\"\015:macro browser q \":bind browser \\\\015 select-entry\\015:bind browser q exit\\015'q.\\015\"\015q.?" "copy thread to a mailbox" +bind generic tt tag-entry +bind index tT tag-thread +bind pager tt tag-message +macro pager tT "q'q" "tag-thread" + +macro index,pager gx "urlview" "call urlview to extract URLs out of a message" +macro attach,compose gx "urlview" + +# notmuch integration +macro index \Cf \ +"set my_old_pipe_decode=\$pipe_decode my_old_wait_key=\$wait_key nopipe_decode nowait_key \ +notmuch-mutt -r --prompt search \ +/home/jan/.cache/notmuch/mutt/results \ +set pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key" \ +"notmuch: search mail" + +# Compose View Options ------------------------------- +set use_from = yes +set use_envelope_from = yes # which from? +set sig_dashes # dashes before sig +set edit_headers # show headers when composing +set fast_reply # skip to compose when replying +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 attribution = "On %d, %n wrote:" # format of quoting header +set reply_to # reply to Reply to: field +set reverse_name # reply as whomever it was to +set include=yes # include message in replies +set forward_quote # include message in forwards +set editor = "vim" +set charset = "utf-8" +set send_charset = "utf-8" +set assumed_charset = "utf-8" +set history_remove_dups = yes +# set smtp_url = "smtp://localhost:25" + + +# GPG config +#set crypt_use_gpgme = yes +#set pgp_use_gpg_agent = yes +#set pgp_sign_as = 5A145EA24232980E243A2DAC37CD42644BBC5F03 +#set pgp_self_encrypt_as = 5A145EA24232980E243A2DAC37CD42644BBC5F03 +#set pgp_self_encrypt = yes +#set smime_default_key = 5A145EA24232980E243A2DAC37CD42644BBC5F03 +#set smime_self_encrypt = yes +#set crypt_verify_sig = yes +#set crypt_autosign = yes +#set crypt_opportunistic_encrypt = yes +#set postpone_encrypt +#message-hook '!~g !~G ~b "^-----BEGIN PGP (SIGNED )?MESSAGE"' 'exec check-traditional-pgp' +# diff --git a/dot_vimrc b/dot_vimrc.tmpl similarity index 81% rename from dot_vimrc rename to dot_vimrc.tmpl index 45ca7f4..8dc341b 100644 --- a/dot_vimrc +++ b/dot_vimrc.tmpl @@ -11,21 +11,19 @@ let g:elite_mode=1 source ~/.vim/local.vim -" Plugins {{{ +" Plugins {{ "{{{" }} call plug#begin('~/.vim/plugged') "########### " Utility "########### Plug '~/.fzf' -Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } "{{{ +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } "{{ "{{{" }} let NERDTreeShowHidden=0 let NERDTreeMinimalUI = 1 let NERDTreeDirArrows = 1 -"}}} -Plug 'preservim/tagbar', { 'on': 'TagbarToggle' } "{{{ - -"}}} -Plug 'lifepillar/vim-mucomplete' "{{{ +"{{ "}}}" }} +Plug 'preservim/tagbar', { 'on': 'TagbarToggle' } +Plug 'lifepillar/vim-mucomplete' "{{ "{{{" }} let g:mucomplete#chains = { \ 'default': ['c-p', 'omni'], \ 'markdown': ['keyp', 'thes', 'spel', 'dict'], @@ -38,14 +36,8 @@ inoremap (MUcompleteFwdKey) imap (MUcompleteCycFwd) inoremap (MUcompleteBwdKey) imap (MUcompleteCycBwd) -"}}} -"Plug 'sirver/ultisnips' "{{{ -"let g:UltiSnipsSnippetDirectories =[$HOME.'/.vim/plugged/vim-snippets/UltiSnips'] -"let g:UltiSnipsExpandTrigger = "" " Do not use -"let g:UltiSnipsListSnippets = "" " Do not use -"let g:UltiSnipsJumpForwardTrigger = "" " Do not use -""}}} -Plug 'junegunn/fzf.vim' "{{{ +"{{ "}}}" }} +Plug 'junegunn/fzf.vim' "{{ "{{{" }} let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } let g:fzf_preview_window = '' @@ -61,12 +53,12 @@ nnoremap L :Lines nnoremap t :BTags nnoremap T :Tags nnoremap h :Helptags -"}}} -Plug 'junegunn/vim-easy-align' "{{{ +"{{ "}}}" }} +Plug 'junegunn/vim-easy-align' "{{ "{{{" }} xmap gl (EasyAlign) nmap gl (EasyAlign) -"}}} -Plug 'easymotion/vim-easymotion' "{{{ +"{{ "}}}" }} +Plug 'easymotion/vim-easymotion' "{{ "{{{" }} let g:EasyMotion_do_mapping = 0 let g:EasyMotion_smartcase = 1 " map (easymotion-prefix) @@ -75,8 +67,8 @@ map w (easymotion-bd-w) nmap w (easymotion-overwin-w) map j (easymotion-j) map k (easymotion-k) -"}}} -Plug 'konfekt/fastfold' "{{{ +"{{ "}}}" }} +Plug 'konfekt/fastfold' "{{ "{{{" }} nmap zuz (FastFoldUpdate) let g:fastfold_savehook = 1 let g:tex_fold_enabled = 1 @@ -84,10 +76,9 @@ let g:vimsyn_folding = 'af' let g:javaScript_fold = 1 let g:perl_fold = 0 let g:php_folding = 0 -" }}} -Plug 'tpope/vim-unimpaired' "{{{ -"}}} -Plug 'mhinz/vim-grepper' "{{{ +" {{ "}}}" }} +Plug 'tpope/vim-unimpaired' +Plug 'mhinz/vim-grepper' "{{ "{{{" }} nnoremap g :Grepper -tool rg nnoremap G :Grepper -tool ag @@ -100,23 +91,23 @@ let g:grepper.jump = 1 let g:grepper.next_tool = 'g' let g:grepper.simple_prompt = 1 let g:grepper.quickfix = 0 -"}}} +"{{ "}}}" }} Plug 'tpope/vim-dispatch' Plug 'tpope/vim-repeat' Plug 'tpope/vim-surround' Plug 'tpope/vim-eunuch' -Plug 'vasconcelloslf/vim-interestingwords' "{{{ +Plug 'vasconcelloslf/vim-interestingwords' "{{ "{{{" }} " nnoremap k :call InterestingWords('n') " nnoremap K :call UncolorAllWords() " nnoremap n :call WordNavigation('forward') " nnoremap N :call WordNavigation('backward') -"}}} +"{{ "}}}" }} "############################# " Generic Programming Support "############################# Plug 'honza/vim-snippets' -Plug 'jiangmiao/auto-pairs' "{{{ +Plug 'jiangmiao/auto-pairs' "{{ "{{{" }} let g:AutoPairsShortcutFastWrap='' let g:AutoPairsMapSpace = 0 imap pumvisible() @@ -132,15 +123,14 @@ inoremap UltiExpand \ mucomplete#ultisnips#expand_snippet("\") imap MyCR UltiExpandAutoPairsReturn imap MyCR -"}}} -Plug 'ntpeters/vim-better-whitespace' "{{{ +"{{ "}}}" }} +Plug 'ntpeters/vim-better-whitespace' "{{ "{{{" }} let g:better_whitespace_filetypes_blacklist=['mail', 'diff', 'gitcommit', 'unite', 'qf', 'help'] -"}}} +"{{ "}}}" }} Plug 'tpope/vim-commentary' -Plug 'cespare/vim-toml' Plug 'AndrewRadev/splitjoin.vim' Plug 'tobyS/vmustache' -Plug 'dense-analysis/ale' "{{{ +Plug 'dense-analysis/ale' "{{ "{{{" }} let g:ale_sign_error = '✘' let g:ale_sign_warning = '⚠' highlight ALEErrorSign ctermbg=NONE ctermfg=red @@ -170,12 +160,12 @@ let g:gometalinter_fast = '' \ . ' --enable=misspell' \ . ' --enable=lll --line-length=120' let g:ale_go_gometalinter_options = '--disable-all --tests' . g:gometalinter_fast . ' --enable=golint' -"}}} +"{{ "}}}" }} "##################### " Markdown / Writing "##################### -Plug 'dbmrq/vim-ditto' "{{{ +Plug 'dbmrq/vim-ditto' "{{ "{{{" }} " au FileType markdown,text,tex DittoOn nmap di ToggleDitto " Turn Ditto on and off nmap =d DittoNext " Jump to the next word @@ -184,48 +174,69 @@ nmap +d DittoGood " Ignore the word under the cursor nmap _d DittoBad " Stop ignoring the word under the cursor nmap ]d DittoMore " Show the next matches nmap [d DittoLess " Show the previous matches -"}}} +"{{ "}}}" }} Plug 'kana/vim-textobj-user' Plug 'reedes/vim-textobj-quote' Plug 'reedes/vim-textobj-sentence' -Plug 'reedes/vim-wordy' "{{{ +Plug 'reedes/vim-wordy' "{{ "{{{" }} " let g:wordy_spell_dir = '~/.vim/spell/wordy' -"}}} -Plug 'reedes/vim-lexical' "{{{ +"{{ "}}}" }} +Plug 'reedes/vim-lexical' "{{ "{{{" }} let g:lexical#thesaurus = ['~/.vim/thesaurus/english.txt',] let g:lexical#spellfile = ['~/.vim/spell/en.utf-8.add',] let g:lexical#thesaurus_key = 't' let g:lexical#dictionary_key = 'k' -"}}} +"{{ "}}}" }} Plug 'reedes/vim-litecorrect' -Plug 'reedes/vim-pencil' "{{{ +Plug 'reedes/vim-pencil' "{{ "{{{" }} let g:pencil#map#suspend_af = 'K' -"}}} +"{{ "}}}" }} Plug 'tpope/vim-abolish' -Plug 'tpope/vim-markdown' -Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } "{{{ -let g:mkdp_refresh_slow = 1 -"}}} -Plug 'lervag/vimtex' "{{{ +Plug 'plasticboy/vim-markdown' " {{ "{{{" }} +let g:vim_markdown_folding_disabled = 1 +let g:vim_markdown_new_list_item_indent = 0 +let g:vim_markdown_auto_insert_bullets = 1 +let g:vim_markdown_frontmatter = 1 +let g:vim_markdown_no_extensions_in_markdown = 0 +let g:vim_markdown_follow_anchor = 1 +let g:vim_markdown_strikethrough = 1 +let g:vim_markdown_autowrite = 1 +set conceallevel=0 + +autocmd FileType markdown setlocal spell +autocmd FileType markdown setlocal linebreak " wrap on words, not characters + +augroup my_spelling_colors + " Underline, don't do intrusive red things. + autocmd! + " autocmd ColorScheme * hi clear SpellBad + autocmd ColorScheme * hi SpellBad cterm=underline ctermfg=NONE ctermbg=NONE term=Reverse + autocmd ColorScheme * hi SpellCap cterm=underline ctermfg=NONE ctermbg=NONE term=Reverse + autocmd ColorScheme * hi SpellLocal cterm=underline ctermfg=NONE ctermbg=NONE term=Reverse + autocmd ColorScheme * hi SpellRare cterm=underline ctermfg=NONE ctermbg=NONE term=Reverse +augroup END +set spell spelllang=en_us +" {{ "}}}" }} +Plug 'lervag/vimtex' "{{ "{{{" }} let g:tex_flavor = 'latex' -"}}} +"{{ "}}}" }} "##################### " Productivity "##################### -Plug 'fcpg/vim-waikiki' "{{{ +Plug 'fcpg/vim-waikiki' "{{ "{{{" }} let g:waikiki_roots = ['~/doc/vimwiki/'] let g:waikiki_default_maps = 1 nn ww :e ~/doc/vimwiki/index.md -"}}} -Plug 'alok/notational-fzf-vim' "{{{ +"{{ "}}}" }} +Plug 'alok/notational-fzf-vim' "{{ "{{{" }} let g:nv_search_paths = ['~/doc/zettelkasten', '~/doc/wiki'] -"}}} +"{{ "}}}" }} "##################### " Git Support "##################### -Plug 'tpope/vim-fugitive' "{{{ +Plug 'tpope/vim-fugitive' "{{ "{{{" }} nnoremap gs :Gstatus nnoremap gr :Gremove nnoremap gl :Glog @@ -235,19 +246,19 @@ nnoremap gp :Ggrep nnoremap gR :Gread nnoremap gg :Git nnoremap gd :Gdiff -"}}} +"{{ "}}}" }} Plug 'junegunn/gv.vim' -Plug 'mhinz/vim-signify' "{{{ +Plug 'mhinz/vim-signify' "{{ "{{{" }} let g:signify_vcs_list = [ 'git' ] let g:signify_disable_by_default = 0 let g:signify_realtime = 0 nmap (SignifyToggle) -"}}} +"{{ "}}}" }} "######################### " Web Programming Support "######################### -Plug 'pangloss/vim-javascript' +Plug 'pangloss/vim-javascript', { 'for': 'javascript' } Plug 'mxw/vim-jsx' Plug 'mattn/emmet-vim' Plug 'othree/html5.vim' @@ -259,20 +270,26 @@ Plug 'ap/vim-css-color' "######################### " Language support "######################### -Plug 'vim-perl/vim-perl' -Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } "{{{ +Plug 'vim-perl/vim-perl', { 'for': 'perl' } +Plug 'cespare/vim-toml', { 'for': 'toml' } +Plug 'fatih/vim-go', { 'for': 'go' } " {{ "{{{" }} +let g:go_fmt_command = "goimports" let g:go_addtags_transform = "camelcase" autocmd FileType go nmap MM (go-build) autocmd FileType go nmap LL (go-run) autocmd FileType go nmap TT (go-test) autocmd FileType go nmap i (go-info) -"}}} +"{{ "}}}" }} +Plug 'rust-lang/rust.vim', { 'for': 'rust' } " {{ "{{{" }} +let g:rustfmt_autosave = 0 +let g:rust_recommended_style = 1 +" {{ "}}}" }} "######################### " Theme / Interface "######################### let g:lightline = {'colorscheme': 'powerline'} -Plug 'itchyny/lightline.vim' "{{{ +Plug 'itchyny/lightline.vim' "{{ "{{{" }} let g:lightline = { \ 'active': { \ 'left': [ [ 'mode', 'paste' ], @@ -283,12 +300,12 @@ let g:lightline = { \ 'pencil': 'PencilMode' \ }, \ } -"}}} +"{{ "}}}" }} Plug 'morhetz/gruvbox' call plug#end() -"}}} -" Vim sensible settings {{{ +"{{ "}}}" }} +" Vim sensible settings {{ "{{{" }} set nocompatible set encoding=utf8 set lazyredraw @@ -316,7 +333,7 @@ set ruler " set cursorline set wildmenu wildignorecase wildmode=list:longest,full -set history=1000 +set history={{ .chezmoi.gid }} set completeopt+=menuone set completeopt+=noselect set cpt=.,w,b,t @@ -364,9 +381,6 @@ set switchbuf=useopen set updatetime=500 set synmaxcol=400 -" Enable tab markers -let g:indentLine_char = '⦙' - "Better line wrapping set nowrap set formatoptions+=j @@ -389,10 +403,10 @@ set spelllang=en_us set diffopt+=algorithm:patience set diffopt+=vertical " hi SpellBad gui=underline guifg=red cterm=underline ctermfg=red -"}}} -" Theme and Styling {{{ +"{{ "}}}" }} +" Theme and Styling {{ "{{{" }} if has('gui_running') - set guifont=BrutalistMono:h14 + set guifont={{ .guifont }} " Scrollbar junk set guioptions=aAcei set go-=T @@ -407,8 +421,8 @@ let g:gruvbox_contrast_dark = 'hard' let g:gruvbox_italic=0 colorscheme gruvbox set background=dark -"}}} -" Filetype settings {{{ +"{{ "}}}" }} +" Filetype settings {{ "{{{" }} function! Prose() call pencil#init({'wrap': 'hard', 'autoformat': 1}) @@ -416,8 +430,6 @@ set background=dark call litecorrect#init() call textobj#quote#init() call textobj#sentence#init() - - colorscheme pencil DittoOn " manual reformatting shortcuts @@ -463,8 +475,8 @@ autocmd FileType help wincmd L autocmd FileType fugitive wincmd L autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab " autocmd FileType markdown,mkd call Prose() -"}}} -" Mappings {{{ +"{{ "}}}" }} +" Mappings {{ "{{{" }} "allow deletion of previously entered data in insert mode set backspace=indent,eol,start @@ -543,4 +555,4 @@ nmap R :retab nmap gQ VipJ command! -nargs=0 Prose call Prose() -"}}} +"{{ "}}}" }} diff --git a/dot_zsh-local.sh b/dot_zsh-local.sh deleted file mode 100644 index d7e1332..0000000 --- a/dot_zsh-local.sh +++ /dev/null @@ -1,7 +0,0 @@ -eval $(keychain --eval --agents ssh id_rsa) -[ -f ~/.keychain/$HOSTNAME-sh ] && . ~/.keychain/$HOSTNAME-sh 2>/dev/null - -alias vim=nvim -export PERLBREW_ROOT=$HOME/perl5/perlbrew -export PERLBREW_HOME=$HOME/.perlbrew -export PATH=$HOME/local/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/ruby/bin:$GOPATH/bin:$HOME/.cargo/bin:$HOME/.symfony/bin:/usr/local/opt/mariadb@10.4/bin:$PATH diff --git a/dot_zshrc b/dot_zshrc deleted file mode 100644 index 766ec5d..0000000 --- a/dot_zshrc +++ /dev/null @@ -1,46 +0,0 @@ -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - -ZSH=$HOME/.oh-my-zsh -ZSH_THEME="powerlevel10k/powerlevel10k" - -ZSH_DISABLE_COMPFIX="true" -# CASE_SENSITIVE="true" -DISABLE_AUTO_TITLE="true" -DISABLE_UNTRACKED_FILES_DIRTY="true" -COMPLETION_WAITING_DOTS="false" - -zle -N zle-line-init -zle -N zle-keymap-select -export KEYTIMEOUT=1 - -plugins=( - vi-mode - golang - z - tmux - fzf-z - # fzf-tab - fd - fossil - zsh-aliases-exa - zsh-autosuggestions - zsh-syntax-highlighting -) - -source $ZSH/oh-my-zsh.sh -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh - -export PATH=/usr/local/bin:/usr/local/sbin:$PATH -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 -export EDITOR='vim' -export GOPATH=$HOME/go -export GPG_TTY=$TTY -export FZF_DEFAULT_COMMAND='fd --type file --hidden --no-ignore' - -source $HOME/.zsh-local.sh - -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl new file mode 100644 index 0000000..60caf4f --- /dev/null +++ b/dot_zshrc.tmpl @@ -0,0 +1,78 @@ +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +ZSH=$HOME/.oh-my-zsh +ZSH_THEME="powerlevel10k/powerlevel10k" + +ZSH_DISABLE_COMPFIX="true" +# CASE_SENSITIVE="true" +DISABLE_AUTO_TITLE="true" +DISABLE_UNTRACKED_FILES_DIRTY="true" +COMPLETION_WAITING_DOTS="false" + +export FZF_DEFAULT_COMMAND="fd --type file --color=always" +export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" +export FZF_DEFAULT_OPTS="--ansi" +export BAT_THEME="gruvbox-dark" + +zle -N zle-line-init +zle -N zle-keymap-select +export KEYTIMEOUT=1 + +plugins={{ .plugins }} + +source $ZSH/oh-my-zsh.sh +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +export PATH=/usr/local/bin:/usr/local/sbin:$PATH +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 +export EDITOR='nvim' +export GOPATH=$HOME/go +export GPG_TTY=$TTY + + +{{- if eq .chezmoi.os "openbsd" }} +export PORTSDIR_PATH=/usr/ports/:/usr/ports/openbsd-wip +export PATH="$HOME/local/bin:$HOME/perl5/bin:$HOME/gems/bin:$HOME/.cargo/bin:$HOME/.yarn/bin:$PATH" +export PERL5LIB=$HOME/perl5/lib/perl5 +export PERL_LOCAL_LIB_ROOT=$HOME/perl5 +export PERL_MB_OPT='--install_base "/home/jan/perl5"' +export PERL_MM_OPT='INSTALL_BASE=/home/jan/perl5' +export PMIX_MCA_gds='hash' + +alias top='htop' +alias man='manpager.sh' +alias mutt='neomutt' +alias dvim='doas nvim' +alias ic='doas ifconfig' +alias pq='doas pkg_info -Q' +alias pa='doas pkg_add' +alias pd='doas pkg_delete' +alias lpr='/usr/local/bin/lpr' +alias gpget='gopass -c' +alias ruby='ruby30' +alias gem='gem30' +alias bundle='bundle30' +alias mnt-net='doas mount_nfs -3 -a 4 -T -r 32768 -o noatime,nodev,noexec 192.168.178.10:/volume1/Data /mnt/nfs' +alias umnt-net='doas umount /mnt/nfs' +alias mnt-usb='doas mount /dev/sd1i /mnt/usb' +alias umnt-usb='doas umount /mnt/usb' +alias mnt-secret='doas mount dev/sd1c /mnt/encrypted_usb' +alias umnt-secret='doas unmount /mnt/encrypted_usb' +alias bkp-home='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup --one-file-system /home/jan --exclude /home/jan/data' +alias bkp-etc='doas restic -r /mnt/nfs/BSD/restic-repo --verbose backup /etc' +alias bkp-list='doas restic -r /mnt/nfs/BSD/restic-repo snapshots' +{{- else }} +export PERLBREW_ROOT=$HOME/perl5/perlbrew +export PERLBREW_HOME=$HOME/.perlbrew +export PATH=$HOME/local/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/ruby/bin:$GOPATH/bin:$HOME/.cargo/bin:$HOME/.symfony/bin:/usr/local/opt/mariadb@10.4/bin:$PATH +{{- end }} +alias vim=nvim + +eval $(keychain --eval --agents ssh id_rsa) +[ -f ~/.keychain/$HOSTNAME-sh ] && . ~/.keychain/$HOSTNAME-sh 2>/dev/null + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh