From 746359e3e2f4ccc7365d0e38e99a9bb0f460a225 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sat, 9 Oct 2021 12:35:57 +0530 Subject: [PATCH 01/38] (docs) add powershell badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0971857..d77a172 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Configuration files for different applications (_in windows_) [![Vim](https://img.shields.io/badge/VIM-%2311AB00.svg?&style=for-the-badge&logo=vim&logoColor=white)](https://www.vim.org/) [![Neovim](https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white)](https://neovim.io/) [![Bash](https://img.shields.io/badge/Shell_Script-121011?style=for-the-badge&logo=gnu-bash&logoColor=white)](https://www.gnu.org/software/bash/) +[![Powershell](https://img.shields.io/badge/PowerShell-5391FE?style=for-the-badge&logo=PowerShell&logoColor=white)](https://docs.microsoft.com/en-us/powershell/) ## Fonts From d3d502c2cb2e1de8a8a2cff3c6d3a22b48c714f4 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Mon, 11 Oct 2021 22:34:07 +0530 Subject: [PATCH 02/38] (feat) add vim settings most for bash --- .vim/general/augroups.vim | 59 ++++++++++++++ .vim/general/colorscheme_settings.vim | 31 +++++++ .vim/general/cursor.vim | 23 ++++++ .vim/general/general.vim | 111 ++++++++++++++++++++++++++ .vim/general/git.vim | 29 +++++++ .vim/general/keybindings.vim | 53 ++++++++++++ .vim/general/leader.vim | 24 ++++++ .vim/vimrc | 9 +++ 8 files changed, 339 insertions(+) create mode 100644 .vim/general/augroups.vim create mode 100644 .vim/general/colorscheme_settings.vim create mode 100644 .vim/general/cursor.vim create mode 100644 .vim/general/general.vim create mode 100644 .vim/general/git.vim create mode 100644 .vim/general/keybindings.vim create mode 100644 .vim/general/leader.vim create mode 100644 .vim/vimrc diff --git a/.vim/general/augroups.vim b/.vim/general/augroups.vim new file mode 100644 index 0000000..0fc756c --- /dev/null +++ b/.vim/general/augroups.vim @@ -0,0 +1,59 @@ +""" +"Auto Commands +""" +" trim trailing whitespace ----- {{{ +"https://vi.stackexchange.com/a/456 +fun! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun + +augroup TRIM_WHITESPACE + autocmd! + autocmd BufWritePre * if !&binary && &ft !=# 'mail' + \| call TrimWhitespace() + \| endif +augroup END +" }}} + +" persistent folding state --- {{{ +augroup REMEMBER_FOLDS + autocmd! + autocmd BufWinLeave *.* mkview + autocmd BufWinEnter *.* silent! loadview +augroup END +" --- }}} + +" Cursor management --- {{{ +"https://github.com/microsoft/terminal/issues/4335 +" +" https//vim.fandom.com/wiki/Configuring_the_cursor +" 1 or 0 -> blinking block +" 2 solid block +" 3 -> blinking underscore +" 4 solid underscore +" Recent versions of xterm (282 or above) also support +" 5 -> blinking vertical bar +" 6 -> solid vertical bar +" +augroup CURSOR_MANAGEMENT + autocmd! + +" powershell requires different format for escape codes +" see : +" (i) https://docs.microsoft.com/en-us/powershell/module/psreadline/set-psreadlineoption?view=powershell-5.1#example-6--use-vimodechangehandler-to-display-vi-mode-changes +" (ii) https://github.com/microsoft/terminal/issues/1604 +if has('win32') + "https://github.com/neovim/neovim/issues/4867#issuecomment-291249173" + autocmd VimEnter * silent !echo -ne "\1\e[6 q\2" + autocmd VimLeave * set guicursor=a:ver25 + +else + autocmd VimEnter * silent !echo -ne "\e[2 q" + autocmd VimLeave * silent !echo -ne "\e[6 q" +" autocmd VimLeave * let &t_me="\]50;CursorShape=1\x7" +" autocmd VimLeave * let &t_SI.="\[6 q" +endif +augroup END +" }} diff --git a/.vim/general/colorscheme_settings.vim b/.vim/general/colorscheme_settings.vim new file mode 100644 index 0000000..7f45291 --- /dev/null +++ b/.vim/general/colorscheme_settings.vim @@ -0,0 +1,31 @@ +let g:colorscheme='default' +" gruvbox ----- {{{ +if (has("termguicolors")) + set termguicolors +endif +set background=dark +set t_Co=256 +" colorscheme gruvbox +" au Colorscheme gruvbox :hi Keyword gui=italic cterm=italic +"https://github.com/sainnhe/gruvbox-material/blob/master/doc/gruvbox-material.txt +"soft,medium,hard +"let g:gruvbox_material_background = 'medium' +let g:gruvbox_material_transparent_background = 1 +let g:gruvbox_material_enable_bold = 1 +let g:gruvbox_material_enable_italic = 1 +"let g:gruvbox_material_statusline_style = 'original' +let g:gruvbox_material_diagnostic_virtual_text = 'colored' +let g:gruvbox_material_better_performance = 1 +"configuration must be dont before applying colorscheme +" +"if &filetype!='gitcommit' +let g:gruvbox_contrast_dark="hard" +let g:gruvbox_bold=1 +let g:gruvbox_italic=1 + +colorscheme gruvbox +"endif + +" }}} +" + diff --git a/.vim/general/cursor.vim b/.vim/general/cursor.vim new file mode 100644 index 0000000..4640c59 --- /dev/null +++ b/.vim/general/cursor.vim @@ -0,0 +1,23 @@ +" also see augroups.vim +" cursor ----- {{{ +" Cursor in terminal +" https//vim.fandom.com/wiki/Configuring_the_cursor +" 1 or 0 -> blinking block +" 2 solid block +" 3 -> blinking underscore +" 4 solid underscore +" Recent versions of xterm (282 or above) also support +" 5 -> blinking vertical bar +" 6 -> solid vertical bar +if &term =~ '^xterm' + " normal mode || + " .= means shorthand for appending : see help .= + let &t_EI .= "\[1 q" + " replace mode _ + let &t_SR .= "\e[4 q" + " insert mode | + let &t_SI .= "\[6 q" +endif +" +" }}} + diff --git a/.vim/general/general.vim b/.vim/general/general.vim new file mode 100644 index 0000000..4f12314 --- /dev/null +++ b/.vim/general/general.vim @@ -0,0 +1,111 @@ +"General Settings +set nocompatible +set belloff=all +"set novisualbell +set mouse=a +" CLIPBOARD ----- {{{ +"vim clipboard and system clipboard same now +set clipboard^=unnamedplus +" }}} + + +" EDITOR ----- {{{ +syntax on +set conceallevel=0 + +"wrap backspace +set backspace=indent,eol,start +"https://stackoverflow.com/a/53872985/12988588 +"dont save character deleted using `x` +"send it to The blackhole-register +nnoremap x "_x +"set autochdir +" filetype on +" filetype plugin on +" filetype indent on +set ignorecase +set smartcase +" use 4 spaces for tabs +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +set number relativenumber +set scrolloff=8 +set showtabline=2 +set lazyredraw +"set colorcolumn=80 +" Show white spaces https://gist.github.com/jdavid82/d40f40e6f124aad6223eba0ff0c7ad65#file-vimrc-L37-L39 +"set listchars=tab:>·,trail:~,extends:>,precedes:<,space:· +"set list +"}}} + +" SEARCHING ----- {{{ +set incsearch "on by default" +set nohlsearch +" clear last used search pattern:http://vimdoc.sourceforge.net/htmldoc/pattern.html#last-pattern +" +let @/="" +" }}} + +" FOLDING ----- {{{ +" use pattern {{{ #code# }}} to detect fold region +" use zm to fold all markers and zr to release all folds with markers +set foldmethod=marker +" }}} + +" BUFFERS ----- {{{ +" remember foldings is nvim/general/augroups.vim +" }}} + +" SPLITS ----- {{{ +set splitbelow +set splitright +nnoremap +nnoremap +nnoremap +nnoremap + +"}}} + + +" Nice menu when typing `:find *.py` +set wildmode=longest,list,full +set wildmenu +" Ignore files +set wildignore+=*.pyc +set wildignore+=*_build/* +set wildignore+=**/coverage/* +set wildignore+=**/node_modules/* +set wildignore+=**/android/* +set wildignore+=**/ios/* +set wildignore+=**/.git/* +" }}} + +" coc needs it----- {{{ +" Set internal encoding of vim, not needed on neovim, since coc.nvim using some +" unicode characters in the file autoload/float.vim +set encoding=utf-8 + +" TextEdit might fail if hidden is not set. +set hidden + +" Some servers have issues with backup files, see #649. +set nobackup +set nowritebackup + +" Give more space for displaying messages. +set cmdheight=2 + +" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable +" delays and poor user experience. +set updatetime=300 +set ttimeoutlen=0 +" Don't pass messages to |ins-completion-menu|. +set shortmess+=c +" }}} +" " show tabline +" set showtabline=2 +" if has('gui_running') + " set guioptions-=e +" endif + diff --git a/.vim/general/git.vim b/.vim/general/git.vim new file mode 100644 index 0000000..21933b4 --- /dev/null +++ b/.vim/general/git.vim @@ -0,0 +1,29 @@ +function Set_git_settings() + "colorscheme gruvbox + "below line is important : gruvbox-material doesn't work + let g:lightline.colorscheme='gruvbox' +endfunction + +if &diff + set nornu + "https://stackoverflow.com/questions/2019281/load-different-colorscheme-when-using-vimdiff + highlight! DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red + highlight! DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red + highlight! DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red + highlight! DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red + " Fix the difficult-to-read default setting for diff text highlighting. The + " bang (!) is required since we are overwriting the DiffText setting. The highlighting + " for \"Todo" also looks nice (yellow) if you don't like the \"MatchParen" colors. + highlight! link DiffText MatchParen + "no transperant bg : set to default colors from gruvbox" + "found out using :hi Normal + highlight! Normal ctermfg=223 ctermbg=235 guifg=#ebdbb2 guibg=#282828 + :call Set_git_settings() +endif + + +augroup GITCOMMIT_SETTINGS + "https://vi.stackexchange.com/questions/4343/can-i-detect-whether-current-vim-instance-is-launched-by-git + autocmd! + autocmd FileType gitcommit,gitrebase silent :call Set_git_settings() +augroup END diff --git a/.vim/general/keybindings.vim b/.vim/general/keybindings.vim new file mode 100644 index 0000000..df0ef29 --- /dev/null +++ b/.vim/general/keybindings.vim @@ -0,0 +1,53 @@ +" MODES ----- {{{ +"use jk in insert mode to switch to normal mode +inoremap jk +" }}} + +" yanking ----- {{{ +"to match the behaviour of 'C' and 'D' +nnoremap Y y$ +"replace with yanked word +"https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text +nnoremap S "_diwP +vnoremap S "_d"0P +"highlight the yanked area for an extened period +augroup highlight_yank + autocmd! + au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=300} +augroup END +" }}} + +" searching : the primeagen : top 5 keybindings ----- {{{ +"put the cursor at screen center while going to next search result +nnoremap n nzz +nnoremap N Nzz + +" }}} +" +" breakpoints ----- {{{ +"puts the next line at the end of current line : mz = create a mark called z , do J, `z = goto mark z +nnoremap J mzJ`z +"undo breakpoints +inoremap . .u +inoremap , ,u +inoremap ! !u +inoremap ? ?u +" }}} +" +" moving lines with ALT key ----- {{{ +"https://vim.fandom.com/wiki/Moving_lines_up_or_down +nnoremap :m .+1== +nnoremap :m .-2== +inoremap :m .+1==gi +inoremap :m .-2==gi +vnoremap :m '>+1gv=gv +vnoremap :m '<-2gv=gv +" }}} + +"htmlhttps://stackoverflow.com/questions/130734/how-can-one-close-html-tags-in-vim-quickly +"inoremap > >Fo">O + +" better indentation ----- {{{ +vnoremap > >gv +vnoremap < sv :source $MYVIMRC +nmap so :e $MYVIMRC +" nmap so :vsplit :e $LOCALAPPDATA/nvim/init.vim +nnoremap n :bnext +nnoremap p :bprev +nnoremap b :buffers + +" splits ----- {{{ +"nnoremap w w "removed to support vimwiki +nnoremap h h +nnoremap l l +nnoremap j j +nnoremap k k +" +nnoremap r= = +nnoremap = :exe "resize " . (winheight(0) * 3/2) +nnoremap - :exe "resize " . (winheight(0) * 2/3) +nnoremap 0 :exe "vertical resize " . (winwidth(0) * 3/2) +nnoremap 9 :exe "vertical resize " . (winwidth(0) * 2/3) +" }}} + +"nmap ws : diff --git a/.vim/vimrc b/.vim/vimrc new file mode 100644 index 0000000..72a26c4 --- /dev/null +++ b/.vim/vimrc @@ -0,0 +1,9 @@ +let mapleader="\" +source $HOME/.vim/general/augroups.vim +source $HOME/.vim/general/general.vim +source $HOME/.vim/general/cursor.vim +source $HOME/.vim/general/keybindings.vim +source $HOME/.vim/general/leader.vim + +hi CursorLine ctermbg=237 guibg=grey cterm=NONE +hi CursorLineNr ctermbg=237 guibg=grey cterm=NONE From 7f50b1d50190bb16bf77fd0b87d3959ca420c3e2 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Tue, 12 Oct 2021 23:36:56 +0530 Subject: [PATCH 03/38] (chore) set scrolloff better scrolling experience as cursor stays at the center --- .vim/general/general.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/.vim/general/general.vim b/.vim/general/general.vim index 4f12314..36ea632 100644 --- a/.vim/general/general.vim +++ b/.vim/general/general.vim @@ -33,6 +33,7 @@ set number relativenumber set scrolloff=8 set showtabline=2 set lazyredraw +set scrolloff=999 "set colorcolumn=80 " Show white spaces https://gist.github.com/jdavid82/d40f40e6f124aad6223eba0ff0c7ad65#file-vimrc-L37-L39 "set listchars=tab:>·,trail:~,extends:>,precedes:<,space:· From f3e1c48b657031f7e9bef23daeca2c86c7a1b368 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Tue, 12 Oct 2021 23:37:39 +0530 Subject: [PATCH 04/38] (chore) change shortcuts related to load/open vimrc --- .vim/general/leader.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vim/general/leader.vim b/.vim/general/leader.vim index 3962a35..c2510dc 100644 --- a/.vim/general/leader.vim +++ b/.vim/general/leader.vim @@ -1,7 +1,7 @@ " Mappings with leader key " source vim file -nmap sv :source $MYVIMRC -nmap so :e $MYVIMRC +nmap vs :source $MYVIMRC +nmap vo :e $MYVIMRC " nmap so :vsplit :e $LOCALAPPDATA/nvim/init.vim nnoremap n :bnext nnoremap p :bprev From a130856183c36b444df80e1a0a56d8444225ead6 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Tue, 12 Oct 2021 23:38:05 +0530 Subject: [PATCH 05/38] (feat) add tmux configuration --- .tmux.conf | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .tmux.conf diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..afbf76b --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,103 @@ +set -s default-terminal 'xterm-256color' +# credits : https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ +###################### +# Prefix +###################### +unbind C-b +set-option -g prefix C-a + +###################### +# Splits +###################### +unbind '"' +unbind '%' + +bind | split-window -h +bind - split-window -v + +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + +###################### +# Source config +###################### + +bind R source-file ~/.tmux.conf \; display-message "Reloaded tmux config" + +###################### +# Mouse control +###################### +# > tmux 2.1 +set -g mouse on +#set -g mouse-select-window on +#set -g mouse-select-pane on +#set -g mouse-resize-pane on + +###################### +# Windows +###################### +set-option -g allow-rename off +set-window-option -g mode-keys vi +###################### +# Copy-Paste Mode +###################### +# use v to trigger selection +bind-key -T copy-mode-vi v send-keys -X begin-selection + +# use y to yank current selection +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'tee /dev/clipboard' + +bind-key -T copy-mode-vi r send-keys -X rectangle-toggle +###################### +# Synchronize Panes +###################### +bind-key S set-window-option synchronize-panes \; display-message "Synchronize-panes #{?pane_synchronized,on,off}" + +###################### +# Visual aspects +###################### + +# loud or quiet? +set -g visual-activity off +set -g visual-bell off +set -g visual-silence off +setw -g monitor-activity off +set -g bell-action none + +# modes +setw -g clock-mode-colour colour5 +setw -g mode-style 'fg=colour1 bg=colour18 bold' + +# panes +set -g pane-border-style 'fg=colour19 bg=colour0' +set -g pane-active-border-style 'bg=colour0 fg=colour9' + +###################### +# statusbar +# status-left window-list status-right +###################### + +set -g status-position bottom +set -g status-justify left +set -g status-style 'bg=colour235 fg=colour223 dim' +set -g status-left '' +#set -g status-right '#[fg=colour253,bg=colour233] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' +set -g status-right '#{?pane_synchronized, * ,}' +set -g status-right-length 50 +set -g status-left-length 20 + +setw -g window-status-current-style 'fg=colour235 bg=colour172' +#setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' +setw -g window-status-current-format ' #I:#[bold]#W#[default]#F ' + +setw -g window-status-style 'fg=colour223 bg=colour237' +#setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' +setw -g window-status-format ' #I:#W#F ' + + +#setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' + +# messages +set -g message-style 'fg=colour254 bg=colour16 bold' From c26d4b24fd4a4fa5faaea68dd4f1c02aa447ab7a Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Tue, 12 Oct 2021 23:46:18 +0530 Subject: [PATCH 06/38] (docs) add tmux badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d77a172..beaa251 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Configuration files for different applications (_in windows_) [![Neovim](https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white)](https://neovim.io/) [![Bash](https://img.shields.io/badge/Shell_Script-121011?style=for-the-badge&logo=gnu-bash&logoColor=white)](https://www.gnu.org/software/bash/) [![Powershell](https://img.shields.io/badge/PowerShell-5391FE?style=for-the-badge&logo=PowerShell&logoColor=white)](https://docs.microsoft.com/en-us/powershell/) +[![Tmux](https://img.shields.io/badge/tmux-1BB91F?style=for-the-badge&logo=tmux&logoColor=white)](https://github.com/tmux/tmux) ## Fonts From ec80204f639b60c55881e65516ddc6653a00ff18 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sat, 23 Oct 2021 22:28:57 +0530 Subject: [PATCH 07/38] (feat) modify tmux statusbar and add pane keybindings Changes: + Status bar : * add Show session icon * add indicator to show if pane is zoomed using +z + Vim like Keybinding for pane swithing --- .tmux.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index afbf76b..903a94b 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -20,11 +20,16 @@ bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D +bind h select-pane -L +bind l select-pane -R +bind k select-pane -U +bind j select-pane -D + ###################### # Source config ###################### -bind R source-file ~/.tmux.conf \; display-message "Reloaded tmux config" +bind R source-file ~/.tmux.conf \; display-message "Reloading tmux config" ###################### # Mouse control @@ -82,7 +87,7 @@ set -g pane-active-border-style 'bg=colour0 fg=colour9' set -g status-position bottom set -g status-justify left set -g status-style 'bg=colour235 fg=colour223 dim' -set -g status-left '' +set -g status-left '#{?client_prefix,#[bg=colour100],}#{?client_prefix,#[fg=colour0],} ❐ #S #{?window_zoomed_flag,🔍,} ' #set -g status-right '#[fg=colour253,bg=colour233] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' set -g status-right '#{?pane_synchronized, * ,}' set -g status-right-length 50 From f3984825bfa05bf820f8fcfa9e38d1a51cbfd558 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sun, 24 Oct 2021 15:17:45 +0530 Subject: [PATCH 08/38] chore(bash): change default editor/visual to vim --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 74c90b8..f4ee444 100644 --- a/.bashrc +++ b/.bashrc @@ -1,7 +1,7 @@ # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) #export TERM=xterm-256color -VISUAL=nvim -EDITOR=nvim +VISUAL=vim +EDITOR=vim HISTSIZE=1000 HISTFILESIZE=2000 parse_git_branch() { From 9a8f895334e42408398e42105a1a9ad41840cfe5 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sun, 24 Oct 2021 15:18:55 +0530 Subject: [PATCH 09/38] feat(bash,tmux): open tmux session on bash startup ref: + bash standard directions : https://unix.stackexchange.com/questions/497207/difference-between-dev-null-21-and-dev-null-dev-null + start tmux on bash startup https://unix.stackexchange.com/questions/43601/how-can-i-set-my-default-shell-to-start-up-tmux + tmux create or attach https://man7.org/linux/man-pages/man1/tmux.1.html#:~:text=new-session%20%5B-AdDEPX%5D --- .bashrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.bashrc b/.bashrc index f4ee444..b88b91b 100644 --- a/.bashrc +++ b/.bashrc @@ -18,3 +18,17 @@ alias configfiles='git --git-dir="D:\dotfiles\dotfiles" --work-tree="$HOME"' ############################################################################# #https://gist.github.com/justintv/168835#gistcomment-2711710 +################ +# ZSH +# https://gist.github.com/fworks/af4c896c9de47d827d4caa6fd7154b6b +################ +# Launch Zsh +#if [ -t 1 ]; then +#exec zsh-5.8 +#fi +if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then + #tmux a -t default || exec tmux new -s default && exit; + #-A : attach to 'default' session if already exists + #-s : session name + exec tmux new-session -A -s default ; +fi From 30a44feaa4cab7d92cc12c53724d28e7eaa99384 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sun, 24 Oct 2021 15:26:15 +0530 Subject: [PATCH 10/38] chore(vim): expand tabs with spaces also helps while pressing backspace --- .vim/general/general.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vim/general/general.vim b/.vim/general/general.vim index 36ea632..7437307 100644 --- a/.vim/general/general.vim +++ b/.vim/general/general.vim @@ -29,6 +29,8 @@ set smartcase set tabstop=4 set softtabstop=4 set shiftwidth=4 +set expandtab +set smartindent set number relativenumber set scrolloff=8 set showtabline=2 From 87bcac5d746e03754d62778865685fad4bbc5eed Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sun, 24 Oct 2021 23:35:21 +0530 Subject: [PATCH 11/38] feat(tmux): add popup session for vimwiki changes: + moved tmux config to .config/tmux + add bash script (wiki.sh) to open a tmux session in popup. --- .config/tmux/scripts/wiki.sh | 47 ++++++++++++++++++++++++++++ .tmux.conf => .config/tmux/tmux.conf | 12 ++++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .config/tmux/scripts/wiki.sh rename .tmux.conf => .config/tmux/tmux.conf (91%) diff --git a/.config/tmux/scripts/wiki.sh b/.config/tmux/scripts/wiki.sh new file mode 100644 index 0000000..9e0bcc4 --- /dev/null +++ b/.config/tmux/scripts/wiki.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# Script to open Vimwiki dir in tmux popup + +# exit if tmux not running +# -z checks if len of string is zero +# $TMX variable is automatically set if tmux server is running +[ -z "$TMUX" ] && exit 1 + +SESSION="wiki" + +if [ "$(tmux display-message -p -F "#{session_name}")" = "${SESSION}" ];then + echo "Detaching from ${SESSION}" + tmux detach-client # detach if already in the popup + tmux display-message "detached from session:${SESSION}" + exit 1 +fi + +WINDOW="vimwiki" +SESSION_EXISTS=0 + +WIKI_INDEX_FILE="/d/dotfiles/wiki/vimwiki/index.md" + +open_wiki(){ + echo "Creating wiki session..." +# create a session if doesn't exist in a detached state + tmux new-session -d -s "${SESSION}" \;\ + rename-window -t "${SESSION}:0" "${WINDOW}" \;\ + split-window -t "${SESSION}:${WINDOW}.0" -h \;\ + send-keys -t ${SESSION}:${WINDOW}.0 "vi ${WIKI_INDEX_FILE}" ENTER \;\ + send-keys -t ${SESSION}:${WINDOW}.1 "cd \$(dirname ${WIKI_INDEX_FILE});clear" ENTER \;\ + select-pane -t "${SESSION}:${WINDOW}.0" \; +} + +tmux has-session -t "${SESSION}" &> /dev/null +[ $? == 0 ] && SESSION_EXISTS=1 +[ ${SESSION_EXISTS} == 0 ] && open_wiki +echo "Attaching to session 'wiki'" +tmux display-message "Attaching to session:${SESSION}" +tmux display-popup -E -h "80%" -w "80%" "tmux attach -t ${SESSION}" + +#tmux display-popup -E -h "80%" -w "80%" "tmux new-session -A -s ${SESSION} \;\ + #rename-window -t 0 \"${WINDOW}\" \;\ + #split-window -h \;\ + #select-pane -t 0 \;\ + #send-keys -t ${SESSION}.0 \"${VI_CMD}\" ENTER" + diff --git a/.tmux.conf b/.config/tmux/tmux.conf similarity index 91% rename from .tmux.conf rename to .config/tmux/tmux.conf index 903a94b..2cce7bb 100644 --- a/.tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,4 +1,10 @@ set -s default-terminal 'xterm-256color' + +###################### +# Custom scripts +###################### +bind-key N run-shell -b "bash ~/.config/tmux/scripts/wiki.sh" + # credits : https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ ###################### # Prefix @@ -20,16 +26,19 @@ bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D +unbind-key l +# by default used for last used window bind h select-pane -L bind l select-pane -R bind k select-pane -U bind j select-pane -D + ###################### # Source config ###################### -bind R source-file ~/.tmux.conf \; display-message "Reloading tmux config" +bind R source-file ~/.config/tmux/tmux.conf \; display-message "Reloading tmux config" ###################### # Mouse control @@ -45,6 +54,7 @@ set -g mouse on ###################### set-option -g allow-rename off set-window-option -g mode-keys vi +bind L last-window ###################### # Copy-Paste Mode ###################### From dda63f73fa9c942653617531305a6f4dba218697 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Fri, 29 Oct 2021 20:26:12 +0530 Subject: [PATCH 12/38] feat(tmux): improve shortcuts for editing config files using tmux popups --- .config/tmux/tmux.conf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 2cce7bb..155b55f 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -3,7 +3,9 @@ set -s default-terminal 'xterm-256color' ###################### # Custom scripts ###################### -bind-key N run-shell -b "bash ~/.config/tmux/scripts/wiki.sh" +bind-key O run-shell -b "bash ~/.config/tmux/scripts/wiki.sh" +bind-key I display-popup -h 80% -w 80% -E "vi ~/.config" +bind-key N display-popup -h 80% -w 80% -E "vi ~/.config/tmux/tmux.conf" # credits : https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ ###################### @@ -33,7 +35,14 @@ bind l select-pane -R bind k select-pane -U bind j select-pane -D - +###################### +# Splits border +###################### +set -g pane-border-style fg=magenta +set -g pane-active-border-style "bg=color fg=color0" +#set -g pane-border-fg magenta +#set -g pane-active-border-fg green +#set -g pane-active-border-bg default ###################### # Source config ###################### From a6598d8a4688fe3df6519d766d8389a8d440c6dd Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Fri, 29 Oct 2021 20:28:00 +0530 Subject: [PATCH 13/38] chore(docs): edit warning info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index beaa251..fee348e 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,4 @@ My favourites ## Warnings ⚠ -- Powershell profile has hardcoded paths.Please verify once before using it. +- Many files have hardcoded paths.Please verify once before using it. From 9d7e455a1c5c7d0dc06183fcd3db440478b16935 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Fri, 29 Oct 2021 20:33:23 +0530 Subject: [PATCH 14/38] feat(tmux): customize split border colors use some eye friendly gruvbox like colors --- .config/tmux/tmux.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 155b55f..abac088 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -38,8 +38,8 @@ bind j select-pane -D ###################### # Splits border ###################### -set -g pane-border-style fg=magenta -set -g pane-active-border-style "bg=color fg=color0" +#set -g pane-border-style fg=magenta +#set -g pane-active-border-style "bg=color fg=color0" #set -g pane-border-fg magenta #set -g pane-active-border-fg green #set -g pane-active-border-bg default @@ -95,8 +95,8 @@ setw -g clock-mode-colour colour5 setw -g mode-style 'fg=colour1 bg=colour18 bold' # panes -set -g pane-border-style 'fg=colour19 bg=colour0' -set -g pane-active-border-style 'bg=colour0 fg=colour9' +set -g pane-border-style 'fg=colour235 bg=colour235' +set -g pane-active-border-style 'fg=colour236 bg=colour236' ###################### # statusbar From 8594efda2f787302aae04833a86036bc1180708e Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sat, 30 Oct 2021 19:17:22 +0530 Subject: [PATCH 15/38] refactor(bash): cleanup bashrc changes: + better comments : using https://asciiflow.com/#/ + seperate files for aliases,functions + seperate files for prompt customization and tmux startup session creation --- .bashrc | 55 ++++++++++++++++++++++-------------- .config/bash/.bash_aliases | 3 ++ .config/bash/.bash_functions | 3 ++ 3 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 .config/bash/.bash_aliases create mode 100644 .config/bash/.bash_functions diff --git a/.bashrc b/.bashrc index b88b91b..d59855a 100644 --- a/.bashrc +++ b/.bashrc @@ -1,34 +1,47 @@ +############################################################################# +# ┌────────────────────┐ +# │ BASHRC │ +# └────────────────────┘ # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) #export TERM=xterm-256color VISUAL=vim EDITOR=vim HISTSIZE=1000 HISTFILESIZE=2000 -parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' -} -# export PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ " -#export PS1="\[\033[35m\]\u@\[\033[32m\]\h \[\033[33m\]\w \[\033[91m\]\$(parse_git_branch)\[\033[00m\]$ " -# PROMPT_COMMAND='echo -e "\e[?16;0;200c"' -alias configfiles='git --git-dir="D:\dotfiles\dotfiles" --work-tree="$HOME"' -################################################################################################################ -# export PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \w\[\033[0;32m\]$(if git rev-parse --git-dir > /dev/null 2>&1; then echo " - ["; fi)$(git branch 2>/dev/null | grep "^*" )\[\033[0;32m\]$(if git rev-parse --git-dir > /dev/null 2>&1; then echo "]"; fi)\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] ' -# export PS1="\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]\u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)\n\[\033[0;32m\]└─\[\033[0m\]\[\033[0;32m\] \$\[\033[0m\]\[\033[0;32m\] ▶\[\033[0m\] " -############################################################################# -#https://gist.github.com/justintv/168835#gistcomment-2711710 +############################################################################# +# ┌─────────────────────────────┐ +# │ ALIASES & FUNCTIONS │ +# └─────────────────────────────┘ +# must be sourced first +############################################################################# +source "$HOME/.config/bash/.bash_aliases" +source "$HOME/.config/bash/.bash_functions" -################ -# ZSH +############################################################################# +# ┌────────────────────┐ +# │ ZSH │ +# └────────────────────┘ # https://gist.github.com/fworks/af4c896c9de47d827d4caa6fd7154b6b -################ +############################################################################# # Launch Zsh #if [ -t 1 ]; then #exec zsh-5.8 #fi -if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then - #tmux a -t default || exec tmux new -s default && exit; - #-A : attach to 'default' session if already exists - #-s : session name - exec tmux new-session -A -s default ; -fi + +############################################################################# +# ┌────────────────────┐ +# │ PROMPT │ +# └────────────────────┘ +# ref : https://gist.github.com/justintv/168835#gistcomment-2711710 +############################################################################# +source_if_exists "$HOME/.config/git/git-prompt.sh" + +############################################################################# +# ┌────────────────────┐ +# │ TMUX │ +# └────────────────────┘ +############################################################################# +# Not so sure : putting it in seperate script makes detaching from tmux +# session, results normal bash prompt +source_if_exists "$HOME/.config/tmux/startup.sh" diff --git a/.config/bash/.bash_aliases b/.config/bash/.bash_aliases new file mode 100644 index 0000000..14713ce --- /dev/null +++ b/.config/bash/.bash_aliases @@ -0,0 +1,3 @@ +alias configfiles='git --git-dir="D:\dotfiles\dotfiles" --work-tree="$HOME"' +alias wikifiles='git --git-dir="D:\dotfiles\wiki\vimwiki\.git"\ + --work-tree="D:\dotfiles\wiki\vimwiki"' diff --git a/.config/bash/.bash_functions b/.config/bash/.bash_functions new file mode 100644 index 0000000..b1279f4 --- /dev/null +++ b/.config/bash/.bash_functions @@ -0,0 +1,3 @@ +source_if_exists(){ + [ -f "$1" ] && source "$1" && echo "Sourcing \"$1\"" +} From fe4c97a6cfdba13c4c06610849059c47bb1d2dba Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Sun, 31 Oct 2021 17:59:44 +0530 Subject: [PATCH 16/38] feat(bash): add custom git prompt --- .config/git/git-prompt.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .config/git/git-prompt.sh diff --git a/.config/git/git-prompt.sh b/.config/git/git-prompt.sh new file mode 100644 index 0000000..4d79576 --- /dev/null +++ b/.config/git/git-prompt.sh @@ -0,0 +1,9 @@ +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' +} + +#export PS1='\n\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]\u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)'$'\n\[\033[0;32m\]└─\[\033[0m\]\[\033[0;32m\] \$\[\033[0m\]\[\033[0;32m\] ▶\[\033[0m\] ' +#┌─╭─ +export PS1='\n\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]╭─ \u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)'$'\n\[\033[0;32m\]╰─▶\[\033[0m\]\[\033[0;32m\] » $ \[\033[0m\]\[\033[0;32m\] \[\033[0m\] \[$(tput setaf 118)\]' + + From 3caf4b42977f019ea6c912b9741fcfa05017f736 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Mon, 1 Nov 2021 11:06:44 +0530 Subject: [PATCH 17/38] chore(git): add gitignore file --- .gitignore | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5163288 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# ┌─────────────────────────────┐ +# │ │ +# │ Dotfiles GitIgnore │ +# │ │ +# └─────────────────────────────┘ +# ref : https://github.com/bitprophet/dotfiles/blob/main/.gitignore + + +# Ignore everything by default. +* + +!.config +!.config/** + +# Bash stuff (profile just sources bashrc, since it's the only thing sourced +# when a shell is a login shell). +!.bash* +.*.swp +.bash_history +.bash_local +.bash_logout +!.profile + + +# Git aliases, identification info +#!.gitconfig +# The gitignore of this repository itself (!) +!.gitignore +# My global Git excludes file (acts as a global .gitignore) +#!.gitexcludes + + +# vim +.netrw* +view/ From c602c8654c2248153e5ef27a57e942bae9455152 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Mon, 1 Nov 2021 11:10:17 +0530 Subject: [PATCH 18/38] refactor(vim): change config dir for vim changes: + vim config files are moved from `~/.vim` to `~/.config/vim` ref: + https://wiki.archlinux.org/title/XDG_Base_Directory + https://vi.stackexchange.com/questions/11879/how-can-put-vimrc-and-viminfo-into-vim-directory tags: vim,vim-config,XDG_SPECIFICATIONS,config-dir --- .config/vim/ftplugin/bash.vim | 5 +++ .config/vim/ftplugin/tmux.vim | 5 +++ {.vim => .config/vim}/general/augroups.vim | 0 .../vim}/general/colorscheme_settings.vim | 0 {.vim => .config/vim}/general/cursor.vim | 0 {.vim => .config/vim}/general/general.vim | 4 +-- {.vim => .config/vim}/general/git.vim | 0 {.vim => .config/vim}/general/keybindings.vim | 0 {.vim => .config/vim}/general/leader.vim | 0 .config/vim/vimrc | 33 +++++++++++++++++++ .vim/vimrc => .config/vim/vimrc_bk | 2 ++ 11 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .config/vim/ftplugin/bash.vim create mode 100644 .config/vim/ftplugin/tmux.vim rename {.vim => .config/vim}/general/augroups.vim (100%) rename {.vim => .config/vim}/general/colorscheme_settings.vim (100%) rename {.vim => .config/vim}/general/cursor.vim (100%) rename {.vim => .config/vim}/general/general.vim (98%) rename {.vim => .config/vim}/general/git.vim (100%) rename {.vim => .config/vim}/general/keybindings.vim (100%) rename {.vim => .config/vim}/general/leader.vim (100%) create mode 100644 .config/vim/vimrc rename .vim/vimrc => .config/vim/vimrc_bk (90%) diff --git a/.config/vim/ftplugin/bash.vim b/.config/vim/ftplugin/bash.vim new file mode 100644 index 0000000..a2dde0e --- /dev/null +++ b/.config/vim/ftplugin/bash.vim @@ -0,0 +1,5 @@ +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 +au BufRead,BufNewFile *.bash_* set filetype=bash diff --git a/.config/vim/ftplugin/tmux.vim b/.config/vim/ftplugin/tmux.vim new file mode 100644 index 0000000..1b803ee --- /dev/null +++ b/.config/vim/ftplugin/tmux.vim @@ -0,0 +1,5 @@ +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 +au BufRead,BufNewFile *.tmux.conf set filetype=tmux diff --git a/.vim/general/augroups.vim b/.config/vim/general/augroups.vim similarity index 100% rename from .vim/general/augroups.vim rename to .config/vim/general/augroups.vim diff --git a/.vim/general/colorscheme_settings.vim b/.config/vim/general/colorscheme_settings.vim similarity index 100% rename from .vim/general/colorscheme_settings.vim rename to .config/vim/general/colorscheme_settings.vim diff --git a/.vim/general/cursor.vim b/.config/vim/general/cursor.vim similarity index 100% rename from .vim/general/cursor.vim rename to .config/vim/general/cursor.vim diff --git a/.vim/general/general.vim b/.config/vim/general/general.vim similarity index 98% rename from .vim/general/general.vim rename to .config/vim/general/general.vim index 7437307..e83a43b 100644 --- a/.vim/general/general.vim +++ b/.config/vim/general/general.vim @@ -31,12 +31,12 @@ set softtabstop=4 set shiftwidth=4 set expandtab set smartindent -set number relativenumber +set number set scrolloff=8 set showtabline=2 set lazyredraw set scrolloff=999 -"set colorcolumn=80 +set colorcolumn=80 " Show white spaces https://gist.github.com/jdavid82/d40f40e6f124aad6223eba0ff0c7ad65#file-vimrc-L37-L39 "set listchars=tab:>·,trail:~,extends:>,precedes:<,space:· "set list diff --git a/.vim/general/git.vim b/.config/vim/general/git.vim similarity index 100% rename from .vim/general/git.vim rename to .config/vim/general/git.vim diff --git a/.vim/general/keybindings.vim b/.config/vim/general/keybindings.vim similarity index 100% rename from .vim/general/keybindings.vim rename to .config/vim/general/keybindings.vim diff --git a/.vim/general/leader.vim b/.config/vim/general/leader.vim similarity index 100% rename from .vim/general/leader.vim rename to .config/vim/general/leader.vim diff --git a/.config/vim/vimrc b/.config/vim/vimrc new file mode 100644 index 0000000..c9ef1ae --- /dev/null +++ b/.config/vim/vimrc @@ -0,0 +1,33 @@ +" ┌───────────────────────────┐ +" │ VIMRC │ +" └───────────────────────────┘ +" +" Resources +" changing vimrc folder : +" [stackexchange]: https://vi.stackexchange.com/questions/11879/how-can-put-vimrc-and-viminfo-into-vim-directory +" +" +let g:BASE_DIR="$HOME/.config/vim" +let rtp=&runtimepath +set runtimepath=g:BASE_DIR +let &runtimepath.="," + \.rtp."," + \.g:BASE_DIR."/after" + +set viminfo+=n.g:BASE_DIR.'/viminfo' + +exec "set directory=" + \.g:BASE_DIR."/swap//" + \.".," + \."$HOME/tmp," + \."/var/tmp," + \."/tmp" +exec "set backupdir=" + \.g:BASE_DIR."/backup//" + \.".," + \."$HOME/tmp," + \."$HOME/" +exec "set undodir=" + \.g:BASE_DIR."/undo//" + \."." +let g:netrw_home=g:BASE_DIR diff --git a/.vim/vimrc b/.config/vim/vimrc_bk similarity index 90% rename from .vim/vimrc rename to .config/vim/vimrc_bk index 72a26c4..3998007 100644 --- a/.vim/vimrc +++ b/.config/vim/vimrc_bk @@ -7,3 +7,5 @@ source $HOME/.vim/general/leader.vim hi CursorLine ctermbg=237 guibg=grey cterm=NONE hi CursorLineNr ctermbg=237 guibg=grey cterm=NONE +hi! NonText guifg=bg ctermfg=NONE + From 7540b0a1823d4ab2e8909671a0ad0ac4ddb6de48 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Mon, 1 Nov 2021 19:52:16 +0530 Subject: [PATCH 19/38] feat(bash): add different prompts --- .config/git/custom.sh | 24 ++ .config/git/custom2.sh | 154 ++++++++++ .config/git/git-prompt.sh | 9 - .config/git/git-prompt1.sh | 29 ++ .config/git/gitstatus.plugin.sh | 470 +++++++++++++++++++++++++++++ .config/git/minimal.sh | 53 ++++ .config/git/minimal_fast_prompt.sh | 75 +++++ .config/git/powerlevel10k.sh | 104 +++++++ 8 files changed, 909 insertions(+), 9 deletions(-) create mode 100644 .config/git/custom.sh create mode 100644 .config/git/custom2.sh delete mode 100644 .config/git/git-prompt.sh create mode 100644 .config/git/git-prompt1.sh create mode 100644 .config/git/gitstatus.plugin.sh create mode 100644 .config/git/minimal.sh create mode 100644 .config/git/minimal_fast_prompt.sh create mode 100644 .config/git/powerlevel10k.sh diff --git a/.config/git/custom.sh b/.config/git/custom.sh new file mode 100644 index 0000000..2a8628c --- /dev/null +++ b/.config/git/custom.sh @@ -0,0 +1,24 @@ +git_stats() { + local STATUS=$(git status -s 2> /dev/null) + local ADDED=$(echo "$STATUS" | grep '??' | wc -l) + local DELETED=$(echo "$STATUS" | grep ' D' | wc -l) + local MODIFIED=$(echo "$STATUS" | grep ' M' | wc -l) + local STATS='' + if [ $ADDED != 0 ]; then + STATS="\e[42m $ADDED " + fi + if [ $DELETED != 0 ]; then + STATS="$STATS\e[101m $DELETED " + fi + if [ $MODIFIED != 0 ]; then + STATS="$STATS\e[30;103m $MODIFIED " + fi + echo -e "\e[0m $STATS\e[0m" +} +__PS1_BEFORE='\n\n' +__PS1_USER='\[\e[97;104m\] \u ' +__PS1_LOCATION='\[\e[30;43m\] \w ' +__PS1_GIT_BRANCH='\[\e[97;45m\] `__git_ps1` ' __PS1_GIT_STATS='`git_stats` ' +__PS1_AFTER='\[\e[0m\]\n\n' + +export PS1="${__PS1_BEFORE}${__PS1_USER}${__PS1_LOCATION}${__PS1_GIT_BRANCH}${__PS1_GIT_STATS}${__PS1_AFTER}" diff --git a/.config/git/custom2.sh b/.config/git/custom2.sh new file mode 100644 index 0000000..3f9fb5e --- /dev/null +++ b/.config/git/custom2.sh @@ -0,0 +1,154 @@ +# ANSI color escape sequences. Useful else, not just the prompt. +C_Red='\e[2;31m'; C_BRed='\e[1;31m'; C_Green='\e[2;32m'; +C_BGreen='\e[1;32m'; C_Yellow='\e[2;33m'; C_BYellow='\e[1;33m'; +C_Grey='\e[2;37m'; C_Reset='\e[0m'; C_BPink='\e[1;35m'; +C_Italic='\e[3m'; C_Blue='\e[2;34m'; C_BBlue='\e[1;34m'; +C_Pink='\e[2;35m'; C_Cyan='\e[2;36m'; C_BCyan='\e[1;36m' + +# Values '1' or '2' are valid, for new and old versions, respectively. +PROMPT_STYLE=2 + +PROMPT_PARSER(){ + if [ $PROMPT_STYLE -eq 1 ]; then + if git rev-parse --is-inside-work-tree &> /dev/null; then + local Status=`git status -s` + if [ -n "$Status" ]; then + local StatusColor=$C_BRed + else + local StatusColor=$C_BGreen + fi + + local Top=`git rev-parse --show-toplevel` + read Line < "$Top"/.git/HEAD + local Branch="$C_Italic$StatusColor${Line##*/}$C_Reset " + fi + + if [ $1 -gt 0 ]; then + local Exit="$C_BRed🗴$C_Reset" + else + local Exit="$C_BGreen🗸$C_Reset" + fi + + local Basename=${PWD##*/} + local Dirname=${PWD%/*} + + if [ "$Dirname/$Basename" == '/' ]; then + CWD="$C_Italic$C_BGreen/$C_Reset" + else + CWD="$C_Grey$Dirname/$C_Italic$Basename$C_Reset" + + # If the CWD is too long, just show basename with '.../' prepended, if + # it's valid to do so. I think ANSI escape sequences are being counted + # in its length, causing it not work as it should, but I like the + # result, none-the-less. + local Slashes=${CWD//[!\/]/} + TempColumns=$((COLUMNS + 20)) # <-- Seems to work around sequences. + if ((${#CWD} > (TempColumns - ${#Branch}) - 2)); then + if [ ${#Slashes} -ge 2 ]; then + CWD="$C_Grey.../$C_Reset$C_BGreen$Basename$C_Reset" + else + CWD=$C_BGreen$Basename$C_Reset + fi + fi + fi + + PS1="$Exit $Branch$CWD\n: " + + unset Line + elif [ $PROMPT_STYLE -eq 2 ]; then + X=$1 + (( $X == 0 )) && X= + + if git rev-parse --is-inside-work-tree &> /dev/null; then + GI=( + '≎' # Clean + '≍' # Uncommitted changes + '≭' # Unstaged changes + '≺' # New file(s) + '⊀' # Removed file(s) + '≔' # Initial commit + '∾' # Branch is ahead + '⮂' # Fix conflicts + '!' # Unknown (ERROR) + '-' # Removed file(s) + ) + + Status=`git status 2> /dev/null` + Top=`git rev-parse --show-toplevel` + + local GitDir=`git rev-parse --git-dir` + if [ "$GitDir" == '.' ] || [ "$GitDir" == "${PWD%%/.git/*}/.git" ]; then + Desc="${C_BRed}∷ ${C_Grey}Looking under the hood..." + else + if [ -n "$Top" ]; then + # Get the current branch name. + IFS='/' read -a A < "$Top/.git/HEAD" + local GB=${A[${#A[@]}-1]} + fi + + # The following is in a very specific order of priority. + if [ -z "$(git rev-parse --branches)" ]; then + Desc="${C_BCyan}${GI[5]} ${C_Grey}Branch '${GB:-?}' awaits its initial commit." + else + while read -ra Line; do + if [ "${Line[0]}${Line[1]}${Line[2]}" == '(fixconflictsand' ]; then + Desc="${C_BCyan}${GI[7]} ${C_Grey}Branch '${GB:-?}' has conflict(s)." + break + elif [ "${Line[0]}${Line[1]}" == 'Untrackedfiles:' ]; then + NFTTL=0 + while read -a Line; do + [ "${Line[0]}" == '??' ] && let NFTTL++ + done <<< "$(git status --short)" + printf -v NFTTL "%'d" $NFTTL + + Desc="${C_BCyan}${GI[3]} ${C_Grey}Branch '${GB:-?}' has $NFTTL new file(s)." + break + elif [ "${Line[0]}" == 'deleted:' ]; then + Desc="${C_BCyan}${GI[9]} ${C_Grey}Branch '${GB:-?}' detects removed file(s)." + break + elif [ "${Line[0]}" == 'modified:' ]; then + readarray Buffer <<< "$(git --no-pager diff --name-only)" + printf -v ModifiedFiles "%'d" ${#Buffer[@]} + Desc="${C_BCyan}${GI[2]} ${C_Grey}Branch '${GB:-?}' has $ModifiedFiles modified file(s)." + break + elif [ "${Line[0]}${Line[1]}${Line[2]}${Line[3]}" == 'Changestobecommitted:' ]; then + Desc="${C_BCyan}${GI[1]} ${C_Grey}Branch '${GB:-?}' has changes to commit." + break + elif [ "${Line[0]}${Line[1]}${Line[3]}" == 'Yourbranchahead' ]; then + printf -v TTLCommits "%'d" "${Line[7]}" + Desc="${C_BCyan}${GI[6]} ${C_Grey}Branch '${GB:-?}' leads by $TTLCommits commit(s)." + break + elif [ "${Line[0]}${Line[1]}${Line[2]}" == 'nothingtocommit,' ]; then + printf -v TTLCommits "%'d" "$(git rev-list --count HEAD)" + + Desc="${C_BCyan}${GI[0]} ${C_Grey}Branch '${GB:-?}' is $TTLCommits commit(s) clean." + break + fi + done <<< "$Status" + fi + fi + fi + + #PS1="\[${C_Reset}\]╭──╼${X}╾──☉ ${Desc}\[${C_Reset}\]\n╰─☉ " + + # 2021-06-13: Temporary block — just experimenting. + if [ -n "$Desc" ]; then + if [ -n "$X" ]; then + PS1="\[${C_Reset}\]${Desc}\[${C_Reset}\]\n\[\e[91m\]${X} \[\e[0m\]\[\e[3;2;37m\]➙ \[\e[0m\] " + else + PS1="\[${C_Reset}\]${Desc}\[${C_Reset}\]\n\[\e[3;2;37m\]➙ \[\e[0m\] " + fi + else + if [ -n "$X" ]; then + PS1="\[${C_Reset}\]\[\e[91m\]${X} \[\e[0m\]\[\e[3;2;37m\]➙ \[\e[0m\] " + else + PS1="\[${C_Reset}\]\[\e[2;37m\]➙ \[\e[0m\] " + fi + fi + + unset Z Line Desc GI Status Top X GB CWD\ + Buffer ModifiedFiles TTLCommits NFTTL + fi +} + +PROMPT_COMMAND='PROMPT_PARSER $?' diff --git a/.config/git/git-prompt.sh b/.config/git/git-prompt.sh deleted file mode 100644 index 4d79576..0000000 --- a/.config/git/git-prompt.sh +++ /dev/null @@ -1,9 +0,0 @@ -parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' -} - -#export PS1='\n\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]\u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)'$'\n\[\033[0;32m\]└─\[\033[0m\]\[\033[0;32m\] \$\[\033[0m\]\[\033[0;32m\] ▶\[\033[0m\] ' -#┌─╭─ -export PS1='\n\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]╭─ \u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)'$'\n\[\033[0;32m\]╰─▶\[\033[0m\]\[\033[0;32m\] » $ \[\033[0m\]\[\033[0;32m\] \[\033[0m\] \[$(tput setaf 118)\]' - - diff --git a/.config/git/git-prompt1.sh b/.config/git/git-prompt1.sh new file mode 100644 index 0000000..2df4ed1 --- /dev/null +++ b/.config/git/git-prompt1.sh @@ -0,0 +1,29 @@ +#! /bin/sh +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' +} + +#export PS1='\n\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]\u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)'$'\n\[\033[0;32m\]└─\[\033[0m\]\[\033[0;32m\] \$\[\033[0m\]\[\033[0;32m\] ▶\[\033[0m\] ' +#┌─╭─ + +#export PS1='\n\[\e[0;32m\]\[\e[0m\]\[\e[0;32m\]╭─ \u\[\e[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\] $(parse_git_branch)'$'\n\[\033[0;32m\]╰─▶\[\033[0m\]\[\033[0;32m\] » $ \[\033[0m\]\[\033[0;32m\] \[\033[0m\] \[$(tput setaf 118)\]' +# +function __git_ps1_fast() { +# ref : https://gist.github.com/urbanautomaton/5206496 + local dir="$PWD" + local git_dir + + until [[ -z "$dir" ]]; do + git_dir="$dir/.git" + if [[ -d "$git_dir" ]]; then + echo " (`git rev-parse --abbrev-ref HEAD`)" + return + fi + + dir="${dir%/*}" + done +} +export GIT_PS1_SHOWDIRTYSTATE= +export GIT_PS1_SHOWUNTRACKEDFILES= +export PS1='\n\[\e[0;36m\]╭─ \u @\h ::\w `__git_ps1_fast`'$'\n''\[\e[0;36m\]╰─▶$ \[\033[0m\]\[\e[0;32m\]' +#export PS1='\u @\h\n╰─▶ » $ \[$(tput setaf 118)\]' diff --git a/.config/git/gitstatus.plugin.sh b/.config/git/gitstatus.plugin.sh new file mode 100644 index 0000000..9a75cb5 --- /dev/null +++ b/.config/git/gitstatus.plugin.sh @@ -0,0 +1,470 @@ +# Bash bindings for gitstatus. + +[[ $- == *i* ]] || return # non-interactive shell + +# Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd +# is already running. +# +# Usage: gitstatus_start [OPTION]... +# +# -t FLOAT Fail the self-check on initialization if not getting a response from +# gitstatusd for this this many seconds. Defaults to 5. +# +# -s INT Report at most this many staged changes; negative value means infinity. +# Defaults to 1. +# +# -u INT Report at most this many unstaged changes; negative value means infinity. +# Defaults to 1. +# +# -c INT Report at most this many conflicted changes; negative value means infinity. +# Defaults to 1. +# +# -d INT Report at most this many untracked files; negative value means infinity. +# Defaults to 1. +# +# -m INT Report -1 unstaged, untracked and conflicted if there are more than this many +# files in the index. Negative value means infinity. Defaults to -1. +# +# -e Count files within untracked directories like `git status --untracked-files`. +# +# -U Unless this option is specified, report zero untracked files for repositories +# with status.showUntrackedFiles = false. +# +# -W Unless this option is specified, report zero untracked files for repositories +# with bash.showUntrackedFiles = false. +# +# -D Unless this option is specified, report zero staged, unstaged and conflicted +# changes for repositories with bash.showDirtyState = false. +# +# -r INT Close git repositories that haven't been used for this many seconds. This is +# meant to release resources such as memory and file descriptors. The next request +# for a repo that's been closed is much slower than for a repo that hasn't been. +# Negative value means infinity. The default is 3600 (one hour). +function gitstatus_start() { + if [[ "$BASH_VERSION" < 4 ]]; then + >&2 printf 'gitstatus_start: need bash version >= 4.0, found %s\n' "$BASH_VERSION" + >&2 printf '\n' + >&2 printf 'To see the version of the current shell, type:\n' + >&2 printf '\n' + >&2 printf ' \033[32mecho\033[0m \033[33m"$BASH_VERSION"\033[0m\n' + >&2 printf '\n' + >&2 printf 'The output of `\033[32mbash\033[0m --version` may be different and is not relevant.\n' + return 1 + fi + + unset OPTIND + local opt timeout=5 max_dirty=-1 ttl=3600 extra_flags + local max_num_staged=1 max_num_unstaged=1 max_num_conflicted=1 max_num_untracked=1 + local ignore_status_show_untracked_files + while getopts "t:s:u:c:d:m:r:eUWD" opt; do + case "$opt" in + t) timeout=$OPTARG;; + s) max_num_staged=$OPTARG;; + u) max_num_unstaged=$OPTARG;; + c) max_num_conflicted=$OPTARG;; + d) max_num_untracked=$OPTARG;; + m) max_dirty=$OPTARG;; + r) ttl=$OPTARG;; + e) extra_flags+='--recurse-untracked-dirs ';; + U) extra_flags+='--ignore-status-show-untracked-files ';; + W) extra_flags+='--ignore-bash-show-untracked-files ';; + D) extra_flags+='--ignore-bash-show-dirty-state ';; + *) return 1;; + esac + done + + (( OPTIND == $# + 1 )) || { echo "usage: gitstatus_start [OPTION]..." >&2; return 1; } + + [[ -z "${GITSTATUS_DAEMON_PID:-}" ]] || return 0 # already started + + if [[ "${BASH_SOURCE[0]}" == */* ]]; then + local gitstatus_plugin_dir="${BASH_SOURCE[0]%/*}" + if [[ "$gitstatus_plugin_dir" != /* ]]; then + gitstatus_plugin_dir="$PWD"/"$gitstatus_plugin_dir" + fi + else + local gitstatus_plugin_dir="$PWD" + fi + + local tmpdir req_fifo resp_fifo culprit + + function gitstatus_start_impl() { + local log_level="${GITSTATUS_LOG_LEVEL:-}" + [[ -n "$log_level" || "${GITSTATUS_ENABLE_LOGGING:-0}" != 1 ]] || log_level=INFO + + local uname_sm + uname_sm="$(command uname -sm)" || return + uname_sm="${uname_sm,,}" + local uname_s="${uname_sm% *}" + local uname_m="${uname_sm#* }" + + if [[ "${GITSTATUS_NUM_THREADS:-0}" -gt 0 ]]; then + local threads="$GITSTATUS_NUM_THREADS" + else + local cpus + if ! command -v sysctl &>/dev/null || [[ "$uname_s" == linux ]] || + ! cpus="$(command sysctl -n hw.ncpu)"; then + if ! command -v getconf &>/dev/null || ! cpus="$(command getconf _NPROCESSORS_ONLN)"; then + cpus=8 + fi + fi + local threads=$((cpus > 16 ? 32 : cpus > 0 ? 2 * cpus : 16)) + fi + + local daemon_args=( + --parent-pid="$$" + --num-threads="$threads" + --max-num-staged="$max_num_staged" + --max-num-unstaged="$max_num_unstaged" + --max-num-conflicted="$max_num_conflicted" + --max-num-untracked="$max_num_untracked" + --dirty-max-index-size="$max_dirty" + --repo-ttl-seconds="$ttl" + $extra_flags) + + tmpdir="$(command mktemp -d "${TMPDIR:-/tmp}"/gitstatus.bash.$$.XXXXXXXXXX)" || return + + if [[ -n "$log_level" ]]; then + GITSTATUS_DAEMON_LOG="$tmpdir"/daemon.log + [[ "$log_level" == INFO ]] || daemon_args+=(--log-level="$log_level") + else + GITSTATUS_DAEMON_LOG=/dev/null + fi + + req_fifo="$tmpdir"/req.fifo + resp_fifo="$tmpdir"/resp.fifo + command mkfifo -- "$req_fifo" "$resp_fifo" || return + + { + ( + trap '' INT QUIT TSTP + [[ "$GITSTATUS_DAEMON_LOG" == /dev/null ]] || set -x + builtin cd / + + ( + local fd_in fd_out + exec {fd_in}<"$req_fifo" {fd_out}>>"$resp_fifo" || exit + echo "$BASHPID" >&"$fd_out" + + local _gitstatus_bash_daemon _gitstatus_bash_version _gitstatus_bash_downloaded + + function _gitstatus_set_daemon() { + _gitstatus_bash_daemon="$1" + _gitstatus_bash_version="$2" + _gitstatus_bash_downloaded="$3" + } + + set -- -d "$gitstatus_plugin_dir" -s "$uname_s" -m "$uname_m" \ + -p "printf '.\036' >&$fd_out" -e "$fd_out" -- _gitstatus_set_daemon + [[ "${GITSTATUS_AUTO_INSTALL:-1}" -ne 0 ]] || set -- -n "$@" + source "$gitstatus_plugin_dir"/install || return + [[ -n "$_gitstatus_bash_daemon" ]] || return + [[ -n "$_gitstatus_bash_version" ]] || return + [[ "$_gitstatus_bash_downloaded" == [01] ]] || return + + local sig=(TERM ILL PIPE) + + if (( UID == EUID )); then + local home=~ + else + local user + user="$(command id -un)" || return + [[ "$user" =~ ^[a-zA-Z0-9_,.-]+$ ]] || return + eval "local home=~$user" + [[ -n "$home" ]] || return + fi + + if [[ -x "$_gitstatus_bash_daemon" ]]; then + HOME="$home" "$_gitstatus_bash_daemon" \ + -G "$_gitstatus_bash_version" "${daemon_args[@]}" <&"$fd_in" >&"$fd_out" & + local pid=$! + trap "trap - ${sig[*]}; kill $pid &>/dev/null" ${sig[@]} + wait "$pid" + local ret=$? + trap - ${sig[@]} + case "$ret" in + 0|129|130|131|137|141|143|159) + echo -nE $'}bye\x1f0\x1e' >&"$fd_out" + exit "$ret" + ;; + esac + fi + + (( ! _gitstatus_bash_downloaded )) || return + [[ "${GITSTATUS_AUTO_INSTALL:-1}" -ne 0 ]] || return + [[ "$_gitstatus_bash_daemon" == \ + "${GITSTATUS_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/gitstatus}"/* ]] || return + + set -- -f "$@" + _gitstatus_bash_daemon= + _gitstatus_bash_version= + _gitstatus_bash_downloaded= + source "$gitstatus_plugin_dir"/install || return + [[ -n "$_gitstatus_bash_daemon" ]] || return + [[ -n "$_gitstatus_bash_version" ]] || return + [[ "$_gitstatus_bash_downloaded" == 1 ]] || return + + HOME="$home" "$_gitstatus_bash_daemon" \ + -G "$_gitstatus_bash_version" "${daemon_args[@]}" <&"$fd_in" >&"$fd_out" & + local pid=$! + trap "trap - ${sig[*]}; kill $pid &>/dev/null" ${sig[@]} + wait "$pid" + trap - ${sig[@]} + echo -nE $'}bye\x1f0\x1e' >&"$fd_out" + ) & disown + ) & disown + } 0"$GITSTATUS_DAEMON_LOG" + + exec {_GITSTATUS_REQ_FD}>>"$req_fifo" {_GITSTATUS_RESP_FD}<"$resp_fifo" || return + command rm -f -- "$req_fifo" "$resp_fifo" || return + [[ "$GITSTATUS_DAEMON_LOG" != /dev/null ]] || command rmdir -- "$tmpdir" 2>/dev/null + + IFS='' read -r -u $_GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID || return + [[ "$GITSTATUS_DAEMON_PID" == [1-9]* ]] || return + + local reply + echo -nE $'}hello\x1f\x1e' >&$_GITSTATUS_REQ_FD || return + local dl= + while true; do + reply= + if ! IFS='' read -rd $'\x1e' -u $_GITSTATUS_RESP_FD -t "$timeout" reply; then + culprit="$reply" + return 1 + fi + [[ "$reply" == $'}hello\x1f0' ]] && break + if [[ -z "$dl" ]]; then + dl=1 + if [[ -t 2 ]]; then + local spinner=('\b\033[33m-\033[0m' '\b\033[33m\\\033[0m' '\b\033[33m|\033[0m' '\b\033[33m/\033[0m') + >&2 printf '[\033[33mgitstatus\033[0m] fetching \033[32mgitstatusd\033[0m .. ' + else + local spinner=('.') + >&2 printf '[gitstatus] fetching gitstatusd ..' + fi + fi + >&2 printf "${spinner[0]}" + spinner=("${spinner[@]:1}" "${spinner[0]}") + done + + if [[ -n "$dl" ]]; then + if [[ -t 2 ]]; then + >&2 printf '\b[\033[32mok\033[0m]\n' + else + >&2 echo ' [ok]' + fi + fi + + _GITSTATUS_DIRTY_MAX_INDEX_SIZE=$max_dirty + _GITSTATUS_CLIENT_PID="$BASHPID" + } + + if ! gitstatus_start_impl; then + >&2 printf '\n' + >&2 printf '[\033[31mERROR\033[0m]: gitstatus failed to initialize.\n' + if [[ -n "${culprit-}" ]]; then + >&2 printf '\n%s\n' "$culprit" + fi + [[ -z "${req_fifo:-}" ]] || command rm -f "$req_fifo" + [[ -z "${resp_fifo:-}" ]] || command rm -f "$resp_fifo" + unset -f gitstatus_start_impl + gitstatus_stop + return 1 + fi + + export _GITSTATUS_CLIENT_PID _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID + unset -f gitstatus_start_impl +} + +# Stops gitstatusd if it's running. +function gitstatus_stop() { + if [[ "${_GITSTATUS_CLIENT_PID:-$BASHPID}" == "$BASHPID" ]]; then + [[ -z "${_GITSTATUS_REQ_FD:-}" ]] || exec {_GITSTATUS_REQ_FD}>&- || true + [[ -z "${_GITSTATUS_RESP_FD:-}" ]] || exec {_GITSTATUS_RESP_FD}>&- || true + [[ -z "${GITSTATUS_DAEMON_PID:-}" ]] || kill "$GITSTATUS_DAEMON_PID" &>/dev/null || true + fi + unset _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID + unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE _GITSTATUS_CLIENT_PID +} + +# Retrives status of a git repository from a directory under its working tree. +# +# Usage: gitstatus_query [OPTION]... +# +# -d STR Directory to query. Defaults to $PWD. Has no effect if GIT_DIR is set. +# -t FLOAT Timeout in seconds. Will block for at most this long. If no results +# are available by then, will return error. +# -p Don't compute anything that requires reading Git index. If this option is used, +# the following parameters will be 0: VCS_STATUS_INDEX_SIZE, +# VCS_STATUS_{NUM,HAS}_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED}. +# +# On success sets VCS_STATUS_RESULT to one of the following values: +# +# norepo-sync The directory doesn't belong to a git repository. +# ok-sync The directory belongs to a git repository. +# +# If VCS_STATUS_RESULT is ok-sync, additional variables are set: +# +# VCS_STATUS_WORKDIR Git repo working directory. Not empty. +# VCS_STATUS_COMMIT Commit hash that HEAD is pointing to. Either 40 hex digits or +# empty if there is no HEAD (empty repo). +# VCS_STATUS_COMMIT_ENCODING Encoding of the HEAD's commit message. Empty value means UTF-8. +# VCS_STATUS_COMMIT_SUMMARY The first paragraph of the HEAD's commit message as one line. +# VCS_STATUS_LOCAL_BRANCH Local branch name or empty if not on a branch. +# VCS_STATUS_REMOTE_NAME The remote name, e.g. "upstream" or "origin". +# VCS_STATUS_REMOTE_BRANCH Upstream branch name. Can be empty. +# VCS_STATUS_REMOTE_URL Remote URL. Can be empty. +# VCS_STATUS_ACTION Repository state, A.K.A. action. Can be empty. +# VCS_STATUS_INDEX_SIZE The number of files in the index. +# VCS_STATUS_NUM_STAGED The number of staged changes. +# VCS_STATUS_NUM_CONFLICTED The number of conflicted changes. +# VCS_STATUS_NUM_UNSTAGED The number of unstaged changes. +# VCS_STATUS_NUM_UNTRACKED The number of untracked files. +# VCS_STATUS_HAS_STAGED 1 if there are staged changes, 0 otherwise. +# VCS_STATUS_HAS_CONFLICTED 1 if there are conflicted changes, 0 otherwise. +# VCS_STATUS_HAS_UNSTAGED 1 if there are unstaged changes, 0 if there aren't, -1 if +# unknown. +# VCS_STATUS_NUM_STAGED_NEW The number of staged new files. Note that renamed files +# are reported as deleted plus new. +# VCS_STATUS_NUM_STAGED_DELETED The number of staged deleted files. Note that renamed files +# are reported as deleted plus new. +# VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files +# are reported as deleted plus new. +# VCS_STATUS_HAS_UNTRACKED 1 if there are untracked files, 0 if there aren't, -1 if +# unknown. +# VCS_STATUS_COMMITS_AHEAD Number of commits the current branch is ahead of upstream. +# Non-negative integer. +# VCS_STATUS_COMMITS_BEHIND Number of commits the current branch is behind upstream. +# Non-negative integer. +# VCS_STATUS_STASHES Number of stashes. Non-negative integer. +# VCS_STATUS_TAG The last tag (in lexicographical order) that points to the same +# commit as HEAD. +# VCS_STATUS_PUSH_REMOTE_NAME The push remote name, e.g. "upstream" or "origin". +# VCS_STATUS_PUSH_REMOTE_URL Push remote URL. Can be empty. +# VCS_STATUS_PUSH_COMMITS_AHEAD Number of commits the current branch is ahead of push remote. +# Non-negative integer. +# VCS_STATUS_PUSH_COMMITS_BEHIND Number of commits the current branch is behind push remote. +# Non-negative integer. +# VCS_STATUS_NUM_SKIP_WORKTREE The number of files in the index with skip-worktree bit set. +# Non-negative integer. +# VCS_STATUS_NUM_ASSUME_UNCHANGED The number of files in the index with assume-unchanged bit set. +# Non-negative integer. +# +# The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in +# large repos. See -m flag of gitstatus_start. +# +# gitstatus_query returns an error if gitstatus_start hasn't been called in the same +# shell or the call had failed. +function gitstatus_query() { + unset OPTIND + local opt dir timeout=() no_diff=0 + while getopts "d:c:t:p" opt "$@"; do + case "$opt" in + d) dir=$OPTARG;; + t) timeout=(-t "$OPTARG");; + p) no_diff=1;; + *) return 1;; + esac + done + (( OPTIND == $# + 1 )) || { echo "usage: gitstatus_query [OPTION]..." >&2; return 1; } + + [[ -n "$GITSTATUS_DAEMON_PID" ]] || return # not started + + local req_id="$RANDOM.$RANDOM.$RANDOM.$RANDOM" + if [[ -z "${GIT_DIR:-}" ]]; then + [[ "$dir" == /* ]] || dir="$(pwd -P)/$dir" || return + elif [[ "$GIT_DIR" == /* ]]; then + dir=:"$GIT_DIR" + else + dir=:"$(pwd -P)/$GIT_DIR" || return + fi + echo -nE "$req_id"$'\x1f'"$dir"$'\x1f'"$no_diff"$'\x1e' >&$_GITSTATUS_REQ_FD || return + + local -a resp + while true; do + IFS=$'\x1f' read -rd $'\x1e' -a resp -u $_GITSTATUS_RESP_FD "${timeout[@]}" || return + [[ "${resp[0]}" == "$req_id" ]] && break + done + + if [[ "${resp[1]}" == 1 ]]; then + VCS_STATUS_RESULT=ok-sync + VCS_STATUS_WORKDIR="${resp[2]}" + VCS_STATUS_COMMIT="${resp[3]}" + VCS_STATUS_LOCAL_BRANCH="${resp[4]}" + VCS_STATUS_REMOTE_BRANCH="${resp[5]}" + VCS_STATUS_REMOTE_NAME="${resp[6]}" + VCS_STATUS_REMOTE_URL="${resp[7]}" + VCS_STATUS_ACTION="${resp[8]}" + VCS_STATUS_INDEX_SIZE="${resp[9]}" + VCS_STATUS_NUM_STAGED="${resp[10]}" + VCS_STATUS_NUM_UNSTAGED="${resp[11]}" + VCS_STATUS_NUM_CONFLICTED="${resp[12]}" + VCS_STATUS_NUM_UNTRACKED="${resp[13]}" + VCS_STATUS_COMMITS_AHEAD="${resp[14]}" + VCS_STATUS_COMMITS_BEHIND="${resp[15]}" + VCS_STATUS_STASHES="${resp[16]}" + VCS_STATUS_TAG="${resp[17]}" + VCS_STATUS_NUM_UNSTAGED_DELETED="${resp[18]}" + VCS_STATUS_NUM_STAGED_NEW="${resp[19]:-0}" + VCS_STATUS_NUM_STAGED_DELETED="${resp[20]:-0}" + VCS_STATUS_PUSH_REMOTE_NAME="${resp[21]:-}" + VCS_STATUS_PUSH_REMOTE_URL="${resp[22]:-}" + VCS_STATUS_PUSH_COMMITS_AHEAD="${resp[23]:-0}" + VCS_STATUS_PUSH_COMMITS_BEHIND="${resp[24]:-0}" + VCS_STATUS_NUM_SKIP_WORKTREE="${resp[25]:-0}" + VCS_STATUS_NUM_ASSUME_UNCHANGED="${resp[26]:-0}" + VCS_STATUS_COMMIT_ENCODING="${resp[27]-}" + VCS_STATUS_COMMIT_SUMMARY="${resp[28]-}" + VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0)) + if (( _GITSTATUS_DIRTY_MAX_INDEX_SIZE >= 0 && + VCS_STATUS_INDEX_SIZE > _GITSTATUS_DIRTY_MAX_INDEX_SIZE_ )); then + VCS_STATUS_HAS_UNSTAGED=-1 + VCS_STATUS_HAS_CONFLICTED=-1 + VCS_STATUS_HAS_UNTRACKED=-1 + else + VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0)) + VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0)) + VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0)) + fi + else + VCS_STATUS_RESULT=norepo-sync + unset VCS_STATUS_WORKDIR + unset VCS_STATUS_COMMIT + unset VCS_STATUS_LOCAL_BRANCH + unset VCS_STATUS_REMOTE_BRANCH + unset VCS_STATUS_REMOTE_NAME + unset VCS_STATUS_REMOTE_URL + unset VCS_STATUS_ACTION + unset VCS_STATUS_INDEX_SIZE + unset VCS_STATUS_NUM_STAGED + unset VCS_STATUS_NUM_UNSTAGED + unset VCS_STATUS_NUM_CONFLICTED + unset VCS_STATUS_NUM_UNTRACKED + unset VCS_STATUS_HAS_STAGED + unset VCS_STATUS_HAS_UNSTAGED + unset VCS_STATUS_HAS_CONFLICTED + unset VCS_STATUS_HAS_UNTRACKED + unset VCS_STATUS_COMMITS_AHEAD + unset VCS_STATUS_COMMITS_BEHIND + unset VCS_STATUS_STASHES + unset VCS_STATUS_TAG + unset VCS_STATUS_NUM_UNSTAGED_DELETED + unset VCS_STATUS_NUM_STAGED_NEW + unset VCS_STATUS_NUM_STAGED_DELETED + unset VCS_STATUS_PUSH_REMOTE_NAME + unset VCS_STATUS_PUSH_REMOTE_URL + unset VCS_STATUS_PUSH_COMMITS_AHEAD + unset VCS_STATUS_PUSH_COMMITS_BEHIND + unset VCS_STATUS_NUM_SKIP_WORKTREE + unset VCS_STATUS_NUM_ASSUME_UNCHANGED + unset VCS_STATUS_COMMIT_ENCODING + unset VCS_STATUS_COMMIT_SUMMARY + fi +} + +# Usage: gitstatus_check. +# +# Returns 0 if and only if gitstatus_start has succeeded previously. +# If it returns non-zero, gitstatus_query is guaranteed to return non-zero. +function gitstatus_check() { + [[ -n "$GITSTATUS_DAEMON_PID" ]] +} diff --git a/.config/git/minimal.sh b/.config/git/minimal.sh new file mode 100644 index 0000000..fe91c4b --- /dev/null +++ b/.config/git/minimal.sh @@ -0,0 +1,53 @@ +#! /bin/bash +colorize(){ + local temp=$1 + echo "\001${!temp}\002" +} +gitbranch_helper() { + echo -n '(' && git branch 2>/dev/null | grep '^*' | colrm 1 2 | tr -d '\n' && echo -n ')' +} +git_branch() { + gitbranch_helper | sed 's/()//' +} +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' +} +BOLD=$(tput bold) +RESET=$(tput sgr0) +if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then + BLACK0=$(tput setaf 0) + BLACK0_BG=$(tput setab 0) + RED=$(tput setaf 9) + RED_BG=$(tput setab 9) + GRAY=$(tput setaf 8) + GRAY_BG=$(tput setab 8) + GREEN=$(tput setaf 113) + GREEN_BG=$(tput setab 113) + WHITE=$(tput setaf 15) + WHITE_BG=$(tput setab 15) + ORANGE=$(tput setaf 208) + ORANGE_BG=$(tput setab 208) + GOLD=$(tput setaf 178) + GOLD_BG=$(tput setab 178) + GOLD3=$(tput setaf 142) + GOLD3_BG=$(tput setab 142) + YELLOW=$(tput setaf 178 ) + YELLOW_BG=$(tput setab 178 ) + Chartreuse3=$(tput setaf 76) + Chartreuse3_BG=$(tput setab 76) +fi + +export GIT_PS1_SHOWDIRTYSTATE=1 +export GIT_PS1_SHOWCOLORHINTS=1 +export GIT_PS1_SHOWUNTRACKEDFILES= +PS1="\n$(colorize GOLD)\u$(colorize RESET)$(colorize GREEN) @ $(colorize GOLD3)\h :: \w$(colorize GOLD) \$(parse_git_branch) $(colorize RESET)" + +# if [[ ${#VIRTUAL_ENV} -gt 0 ]] +# then + # PS1+=$' \uE235 ' + # PS1+="$(basename ${VIRTUAL_ENV}) " +# fi + +#PS1+="\n$(colorize GREEN)└─\$ ▶ $(colorize RESET) " +PS1="$PS1"$'\n'"$(colorize GREEN)└─\$ ▶ $(colorize RESET) " +export PS1 diff --git a/.config/git/minimal_fast_prompt.sh b/.config/git/minimal_fast_prompt.sh new file mode 100644 index 0000000..09cec6c --- /dev/null +++ b/.config/git/minimal_fast_prompt.sh @@ -0,0 +1,75 @@ +#! /bin/bash +############################################################################### +# Prompt references +# + https://wiki.archlinux.org/title/Bash/Prompt_customization#PROMPT_COMMAND +# + https://web.archive.org/web/20161214154424/https://stackoverflow.com/questions/103857/what-is-your-favorite-bash-prompt + +#rightprompt() +#{ + #printf "%*s" $COLUMNS "right prompt" +#} +# +#export PS1='\[$(tput sc; rightprompt; tput rc)\]left prompt > ' +############################################################################### +colorize(){ + local temp=$1 + echo "\001${!temp}\002" +} +gitbranch_helper() { + echo -n '(' && git branch 2>/dev/null | grep '^*' | colrm 1 2 | tr -d '\n' && echo -n ')' +} +git_branch() { + gitbranch_helper | sed 's/()//' +} +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' +} + +set_colors(){ +BOLD=$(tput bold) +RESET=$(tput sgr0) +if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then + BLACK0=$(tput setaf 0) + BLACK0_BG=$(tput setab 0) + RED=$(tput setaf 9) + RED_BG=$(tput setab 9) + GRAY=$(tput setaf 8) + GRAY_BG=$(tput setab 8) + GREEN=$(tput setaf 113) + GREEN_BG=$(tput setab 113) + WHITE=$(tput setaf 15) + WHITE_BG=$(tput setab 15) + ORANGE=$(tput setaf 208) + ORANGE_BG=$(tput setab 208) + GOLD=$(tput setaf 178) + GOLD_BG=$(tput setab 178) + GOLD3=$(tput setaf 142) + GOLD3_BG=$(tput setab 142) + YELLOW=$(tput setaf 178 ) + YELLOW_BG=$(tput setab 178 ) + Chartreuse3=$(tput setaf 76) + Chartreuse3_BG=$(tput setab 76) +fi + +} +export GIT_PS1_SHOWDIRTYSTATE=1 +export GIT_PS1_SHOWCOLORHINTS=1 +export GIT_PS1_SHOWUNTRACKEDFILES= + +__prompt_command(){ + +PS1="\n$(colorize GOLD)\u$(colorize RESET)$(colorize GREEN) @ $(colorize GOLD3)\h :: \w$(colorize GOLD) \$(parse_git_branch) $(colorize RESET)" + +# if [[ ${#VIRTUAL_ENV} -gt 0 ]] +# then + # PS1+=$' \uE235 ' + # PS1+="$(basename ${VIRTUAL_ENV}) " +# fi + +#PS1+="\n$(colorize GREEN)└─\$ ▶ $(colorize RESET) " +PS1="$PS1"$'\n'"$(colorize GREEN)└─\$ ▶ $(colorize RESET) " +} +PROMPT_COMMAND=__prompt_command + +set_colors +unset set_colors diff --git a/.config/git/powerlevel10k.sh b/.config/git/powerlevel10k.sh new file mode 100644 index 0000000..67990ee --- /dev/null +++ b/.config/git/powerlevel10k.sh @@ -0,0 +1,104 @@ +# Simple Bash prompt with Git status. + +# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory +# in which the current script resides if the variable isn't set. +if [[ -n "${GITSTATUS_DIR:-}" ]]; then + source "$GITSTATUS_DIR" || return +elif [[ "${BASH_SOURCE[0]}" == */* ]]; then + source "${BASH_SOURCE[0]%/*}/gitstatus.plugin.sh" || return +else + source gitstatus.plugin.sh || return +fi +exit +# Sets GITSTATUS_PROMPT to reflect the state of the current git repository. +# The value is empty if not in a git repository. Forwards all arguments to +# gitstatus_query. +# +# Example value of GITSTATUS_PROMPT: master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42 +# +# master current branch +# ⇣42 local branch is 42 commits behind the remote +# ⇡42 local branch is 42 commits ahead of the remote +# ⇠42 local branch is 42 commits behind the push remote +# ⇢42 local branch is 42 commits ahead of the push remote +# *42 42 stashes +# merge merge in progress +# ~42 42 merge conflicts +# +42 42 staged changes +# !42 42 unstaged changes +# ?42 42 untracked files +function gitstatus_prompt_update() { + GITSTATUS_PROMPT="" + + gitstatus_query "$@" || return 1 # error + [[ "$VCS_STATUS_RESULT" == ok-sync ]] || return 0 # not a git repo + + local reset=$'\001\e[0m\002' # no color + local clean=$'\001\e[38;5;076m\002' # green foreground + local untracked=$'\001\e[38;5;014m\002' # teal foreground + local modified=$'\001\e[38;5;011m\002' # yellow foreground + local conflicted=$'\001\e[38;5;196m\002' # red foreground + + local p + + local where # branch name, tag or commit + if [[ -n "$VCS_STATUS_LOCAL_BRANCH" ]]; then + where="$VCS_STATUS_LOCAL_BRANCH" + elif [[ -n "$VCS_STATUS_TAG" ]]; then + p+="${reset}#" + where="$VCS_STATUS_TAG" + else + p+="${reset}@" + where="${VCS_STATUS_COMMIT:0:8}" + fi + + (( ${#where} > 32 )) && where="${where:0:12}…${where: -12}" # truncate long branch names and tags + p+="${clean}${where}" + + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && p+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && p+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && p+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && p+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n "$VCS_STATUS_ACTION" ]] && p+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && p+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && p+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && p+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + (( VCS_STATUS_NUM_UNTRACKED )) && p+=" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}" + + GITSTATUS_PROMPT="${p}${reset}" +} + +# Start gitstatusd in the background. +gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1 + +# On every prompt, fetch git status and set GITSTATUS_PROMPT. +PROMPT_COMMAND=gitstatus_prompt_update +PROMPT_DIRTRIM=3 + +# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded. +shopt -s promptvars + +# Customize prompt. Put $GITSTATUS_PROMPT in it reflect git status. +# +# Example: +# +# user@host ~/projects/skynet master ⇡42 +# $ █ +PS1='\[\033[01;32m\]\u@\h\[\033[00m\] ' # green user@host +PS1+='\[\033[01;34m\]\w\[\033[00m\]' # blue current working directory +PS1+='${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}' # git status (requires promptvars option) +PS1+='\n\[\033[01;$((31+!$?))m\]\$\[\033[00m\] ' # green/red (success/error) $/# (normal/root) +PS1+='\[\e]0;\u@\h: \w\a\]' # terminal title: user@host: dir From 348d3a0ed29dc399c6d8fb5f5a91e68fd2846db4 Mon Sep 17 00:00:00 2001 From: Prashantha T P Date: Thu, 4 Nov 2021 16:52:54 +0530 Subject: [PATCH 20/38] feat(pandoc): add utils/script for markdown to pdf conversion includes templates --- .config/utils/pandoc/md2pdf.sh | 43 + .config/utils/pandoc/templates/Document1.pdf | Bin 0 -> 1188 bytes .config/utils/pandoc/templates/README.md | 9 + .config/utils/pandoc/templates/background.pdf | Bin 0 -> 1073 bytes .../utils/pandoc/templates/background1.PNG | Bin 0 -> 8219 bytes .../utils/pandoc/templates/background1.pdf | Bin 0 -> 1061 bytes .../pandoc/templates/background1_edited.png | Bin 0 -> 33219 bytes .config/utils/pandoc/templates/eisvogel.tex | 1064 +++++++++++++++++ .config/utils/pandoc/templates/head.tex | 40 + .config/utils/pandoc/templates/metadata.yml | 15 + .config/utils/pandoc/templates/template.tex | 556 +++++++++ 11 files changed, 1727 insertions(+) create mode 100644 .config/utils/pandoc/md2pdf.sh create mode 100644 .config/utils/pandoc/templates/Document1.pdf create mode 100644 .config/utils/pandoc/templates/README.md create mode 100644 .config/utils/pandoc/templates/background.pdf create mode 100644 .config/utils/pandoc/templates/background1.PNG create mode 100644 .config/utils/pandoc/templates/background1.pdf create mode 100644 .config/utils/pandoc/templates/background1_edited.png create mode 100644 .config/utils/pandoc/templates/eisvogel.tex create mode 100644 .config/utils/pandoc/templates/head.tex create mode 100644 .config/utils/pandoc/templates/metadata.yml create mode 100644 .config/utils/pandoc/templates/template.tex diff --git a/.config/utils/pandoc/md2pdf.sh b/.config/utils/pandoc/md2pdf.sh new file mode 100644 index 0000000..5db5a3f --- /dev/null +++ b/.config/utils/pandoc/md2pdf.sh @@ -0,0 +1,43 @@ +#! /bin/sh +if [ "$1" == "-h" ] ; then + echo "Usage: `basename $0` [input_file] [out_dir] [-h]" +fi + +if [ -z "$1" ] + then + echo "No input file specified." + exit 0 +fi + +if [ -z "$2" ];then + out_dir=pdf +else + out_dir=$2 +fi +echo "Creating output dir if not exists : $out_dir" +mkdir -p "$out_dir" +echo "======== Markdown to PDF ================" +filename_full=$(basename -- "$1") +extension="${filename_full##*.}" +filename="${filename_full%.*}" +out_file=$out_dir/${filename}".pdf" +data_dir="$HOME/.config/utils/pandoc" +header_file="$data_dir/templates/head.tex" +user_metadata_file="$(dirname \"$1\")/metadata.yml" +metadata_file="~/.config/utils/templates/metadata.yml" +[ -f "$user_metadata_file" ] && metadata_file="$user_metadata_file" +echo "Source file": $filename_full +echo "Target file": $out_file +echo "Metadata file": $metadata_file + +pandoc -N -s \ + --data-dir="$data_dir"\ + --template=eisvogel.tex \ + -H "$header_file" \ + --listings $1 \ + --toc --toc-depth=4 \ + --metadata-file "$metadata_file" \ + -o $out_file + + +echo "=========================================" diff --git a/.config/utils/pandoc/templates/Document1.pdf b/.config/utils/pandoc/templates/Document1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bab1da4e3c7ad672c2a7a0ac88fe638e471b2e0d GIT binary patch literal 1188 zcmah}O-vI(6h7$1;(F1OL^GEP#=!n`x4UbaMxYc36q=TVL≈nWam%J9T#&3ek|D zUJM}~JgRWuq(`DA9Q8ngC*y@9BzhuVyy-!G(-u}C(K$3T@9q2Ed*An7AYH-i>!DR>wlJj^D9$Nb`y;!G6 z9>N@ZY%ZOas80l3B7z-g@G1*XZ$7|b75lu3rcwSn#IRb8`jDu%{itJqv3(CH<}ULy zm{Zi7xv43ds@Pgm(+pL&Z>VOEruK*!@tr`P$rsT~;Bp#(b(}6Puz<8-bBz2CB_A-- zs8E1`;38`T6$(+V<5Kdkq7(YTD%bm!%aR?uWSUACl-Qi1LxMGJ{aL3N>fyBMK%RDsCW8JDc<0prlB2bE@M zg%PNCg8Flyu&S646AL*=RFh)OXSv;h*n?Z=A01r$e1Y{%tX@ly$^C8q@yzJq%ax_& zdLgr0I{WipxAf%ArJdUTua%zIzu%iG_oZ&#mpox7q+F_^$k-p(wFN$u1;#2P>Z5Iyd~gp>rI1t2Ku zG>lpm^Z(aolx8ERScSGTvNZ$hNHGQ3@N;}n(l8PR5{}MMA*(pZKem|$;GM9k3hdAc zo27!dCv6G)lug%9;~C~@Tf&4UkMMYaU5^GZ2Ss;@A{)sC#spcdr62PhhQwCGAHY}! zl~Q)nEGxt|4NGx!TdkBWOUEYG9Lq8ktZV5MAx4srG9jjpb+}^{s8IBZVVF)r(@0wI T8FC!(7IT(iOY!*dR95;8Qpr_z literal 0 HcmV?d00001 diff --git a/.config/utils/pandoc/templates/README.md b/.config/utils/pandoc/templates/README.md new file mode 100644 index 0000000..8d2d69e --- /dev/null +++ b/.config/utils/pandoc/templates/README.md @@ -0,0 +1,9 @@ +# Dev Utils + +## Markdown to Pdf + +Templates/utils for converting markdown file to pdf format using [Pandoc](https://pandoc.org/MANUAL.html) + +## LICENSE : +* [https://github.com/Wandmalfarbe/pandoc-latex-template : LICENSE](https://github.com/Wandmalfarbe/pandoc-latex-template/blob/6baf692c89a5be30a44e4dd0137d8a07bd0a114c/LICENSE) +* Jdhao's [blog](https://jdhao.github.io/2019/05/30/markdown2pdf_pandoc/) : [Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/) diff --git a/.config/utils/pandoc/templates/background.pdf b/.config/utils/pandoc/templates/background.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6c8ed29f0aaecf1af006c0fa4ae9c3d765108c4b GIT binary patch literal 1073 zcmZWoT}TvB7==)i(H;tVh<^BjmR6#jJF`2xGqM@E>zZ1*t%Zg7FwWjxC$^b&=B};2 zM3O}GAP6O8`d~klkYJfT6p0AcOWH#QK@e0(M4>@XMbN#o?z-4zn3;R-d_U)$Z(PxE zWWV5%IM?GJ6Mr}#ATT@5aKRw(N3fA3ogh&t#sL5y(NhFl^qEo#4r9%XW3Hx#vx$Y( zvt0Hj9(cWJ4wXliNBc?}XUnt~U&~J}?z!~kP51fxcMl#Pdo|c!`SJ7h3%`}FnHy+& zDN*^vbzsZx$<~Ku7nO1M?eye^h0XJ=eLt`E?zmj?cI%_}105^R=2rBC5F5C+kso_{ zI(h2d(D%}j(xsW^<#}{R>nNW|jkWJ=N<5gnHPKr#zO8*~flJ0c+dqvyANkvOW$@*> z;R?HAS6gVBTdW-JpS{-gfrT9&`c-!9Ta(CPBfi={ePhfSUG}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mN&CXJvtJ^U98cE(AGYVN=xi z5Ww-#LvCM4?hKpgDC}v^5 z^K{CHp%Au2U*Xm(YhM%QkI}9$il<%;S{zyhnp9JT@QyBHd9pk6)uQ=`s-P&Z`b2|j zLzWISID6JtnRIPg^VxHcE#CQlrN`**4t z_}*g;-D$XLyo^`3R@$J8>pZ3pdQXOG67KP}nK78ZjtE$`lF_zBf|Y0(1BPtoE*jez zmp>BGJ!e$*doT$I;VA*W49u)h^5V$vsrcP#@JEmyBcu|@>O!RrU*S%-0}YtxTZtK` z%*}`a2I3Tz{pMYBGH`z#3s_7y8vCbKPO;q%c#>nH*oKcuW+cRA87lE6zCmVXw6jZU zzGl)jk)^7{&Jg|qp&>A`mDEFcIq9|o?>=^ApM$zWn8-$W3IVJmBMr@A+_Xlakljd8fc&aMCI!zTpJDDwvkj1SLE-OB>9f z_+*$rN0122K=#poYpPIX=9w){TpJ31Br odW&)Yx`@`Hg_qhh=Bs1sHaAF^EV={!p|3?PcVCvj#Q)I$0j>@ZtN;K2 literal 0 HcmV?d00001 diff --git a/.config/utils/pandoc/templates/background1.pdf b/.config/utils/pandoc/templates/background1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c0850b1de75b66ec36e9e23809ffbbb83ee41f86 GIT binary patch literal 1061 zcma)5OK1~87zPWa4B{iV77ss`KR8}3#XH86#N{DBLI-2c8X!j_ms(SJGMvyqt;gBFpAA_ zl*{AWZTnVE)kHQOB*C7lsza;wFP1kRNRKyr^J|3#`@`J(-`{^6*=s$oU7DErHB=L- zt*;xXyLDpl>dflT>k9|Ybbqd%{Wd&5eRJ$i3tV}4(4z(?BCG1l*XZe`^8;_2)t1AB z3mg3_i_zMu9`M{-TrV7ZGr0fJwXbVi)AJwiPv7u#f2y84x%}=`;dFj|YBqoLF74_1 z(%<@IJmf(*o!BPJzl2PoP3&Bq8t{pGaq^Xm;L48VSVte@k|7ur0AI4H@B_%v9sZ z!rZDIU$!kA?+6K#qAEF#9g?LMc0kl7UZGJaC=J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>EJ@whN_f+1zg2Sua=FQ-s_uk?asohKKsgiBV=`W8y&%^C{6<~iquox=W zFv^F7G>;_S>3JLjCmCvA;d2Au_Q?!p@$UMZvIfg3_d*<@o8P56pD|D%TN@Y7Po!G* znf>vwU&8T;YF&Z!w>(U#P}7kx>L82 z{OW^-A(j0m@57;_EZfHD^{Q$!l}97VHoSf>UaZJ+vP#OZN7zGkTdz$zs!}SWWXF1% zm~_L#tE6K_X=Ig1yWevp6l}Y>|+H>FE3V%?$ zw7%?edFSI(&lsblCW21{<`1hWK<+VSD_jfNllzUEzvEl~0gi#zx{JQCe~x;Mmj+>t#uXNQ3H zc79ISRmLmr*sR|?fpEQRJ9jFFh!^d#Fp+d$^IkreC-YFA9N2gV+iPK@Ce32rsrKjn zyn590=Dn|-=hzcNm{Ml\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +% Set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother +$endif$ +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% Avoid problems with \sout in headers with hyperref +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(numbersections)$ +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} +$else$ +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering +$endif$ +$if(beamer)$ +$else$ +$if(block-headings)$ +% Make \paragraph and \subparagraph free-standing +\ifx\paragraph\undefined\else + \let\oldparagraph\paragraph + \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else + \let\oldsubparagraph\subparagraph + \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ +$endif$ +$if(pagestyle)$ +\pagestyle{$pagestyle$} +$endif$ + +% Make use of float-package and set default placement for figures to H. +% The option H means 'PUT IT HERE' (as opposed to the standard h option which means 'You may put it here if you like'). +\usepackage{float} +\floatplacement{figure}{$if(float-placement-figure)$$float-placement-figure$$else$H$endif$} + +$for(header-includes)$ +$header-includes$ +$endfor$ +$if(lang)$ +\ifxetex + $if(mainfont)$ + $else$ + % See issue https://github.com/reutenauer/polyglossia/issues/127 + \renewcommand*\familydefault{\sfdefault} + $endif$ + % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) + \usepackage{polyglossia} + \setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$} +$for(polyglossia-otherlangs)$ + \setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$} +$endfor$ +\else + \usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} +% get rid of language-specific shorthands (see #6817): +\let\LanguageShortHands\languageshorthands +\def\languageshorthands#1{} +$if(babel-newcommands)$ + $babel-newcommands$ +$endif$ +\fi +$endif$ +\ifluatex + \usepackage{selnolig} % disable illegal ligatures +\fi +$if(dir)$ +\ifxetex + % Load bidi as late as possible as it modifies e.g. graphicx + \usepackage{bidi} +\fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ +$if(natbib)$ +\usepackage[$natbiboptions$]{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi + % set entry spacing + \ifnum #2 > 0 + \setlength{\parskip}{#2\baselineskip} + \fi + }% + {} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +$if(csquotes)$ +\usepackage{csquotes} +$endif$ + +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +$if(beamer)$ +$else$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +$endif$ +\subtitle{$subtitle$} +$endif$ +\author{$for(author)$$author$$sep$ \and $endfor$} +\date{$date$} +$if(beamer)$ +$if(institute)$ +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics{$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ + + + +%% +%% added +%% + +% +% language specification +% +% If no language is specified, use English as the default main document language. +% +$if(lang)$$else$ +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=english]{babel} +$if(babel-newcommands)$ + $babel-newcommands$ +$endif$ +\else + $if(mainfont)$ + $else$ + % Workaround for bug in Polyglossia that breaks `\familydefault` when `\setmainlanguage` is used. + % See https://github.com/Wandmalfarbe/pandoc-latex-template/issues/8 + % See https://github.com/reutenauer/polyglossia/issues/186 + % See https://github.com/reutenauer/polyglossia/issues/127 + \renewcommand*\familydefault{\sfdefault} + $endif$ + % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) + \usepackage{polyglossia} + \setmainlanguage[]{english} +$for(polyglossia-otherlangs)$ + \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} +$endfor$ +\fi +$endif$ + +$if(page-background)$ +\usepackage[pages=all]{background} +$endif$ + +% +% for the background color of the title page +% +$if(titlepage)$ +\usepackage{pagecolor} +\usepackage{afterpage} +$if(titlepage-background)$ +\usepackage{tikz} +$endif$ +$if(geometry)$ +$else$ +\usepackage[margin=2.5cm,includehead=true,includefoot=true,centering]{geometry} +$endif$ +$endif$ + +% +% break urls +% +\PassOptionsToPackage{hyphens}{url} + +% +% When using babel or polyglossia with biblatex, loading csquotes is recommended +% to ensure that quoted texts are typeset according to the rules of your main language. +% +\usepackage{csquotes} + +% +% captions +% +\definecolor{caption-color}{HTML}{777777} +$if(beamer)$ +$else$ +\usepackage[font={stretch=1.2}, textfont={color=caption-color}, position=top, skip=4mm, labelfont=bf, singlelinecheck=false, justification=$if(caption-justification)$$caption-justification$$else$raggedright$endif$]{caption} +\setcapindent{0em} +$endif$ + +% +% blockquote +% +\definecolor{blockquote-border}{RGB}{221,221,221} +\definecolor{blockquote-text}{RGB}{119,119,119} +\usepackage{mdframed} +\newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote} +\renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}% +\item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}} + +% +% Source Sans Pro as the de­fault font fam­ily +% Source Code Pro for monospace text +% +% 'default' option sets the default +% font family to Source Sans Pro, not \sfdefault. +% +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + $if(fontfamily)$ + $else$ + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + $endif$ +\else % if not pdftex + $if(mainfont)$ + $else$ + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + + % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887 + % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the + % fix is still unreleased. + % TODO: Remove this workaround when the new version of sourcecodepro is released on CTAN. + \ifxetex + \makeatletter + \defaultfontfeatures[\ttfamily] + { Numbers = \sourcecodepro@figurestyle, + Scale = \SourceCodePro@scale, + Extension = .otf } + \setmonofont + [ UprightFont = *-\sourcecodepro@regstyle, + ItalicFont = *-\sourcecodepro@regstyle It, + BoldFont = *-\sourcecodepro@boldstyle, + BoldItalicFont = *-\sourcecodepro@boldstyle It ] + {SourceCodePro} + \makeatother + \fi + $endif$ +\fi + +% +% heading color +% +\definecolor{heading-color}{RGB}{40,40,40} +$if(beamer)$ +$else$ +\addtokomafont{section}{\color{heading-color}} +$endif$ +% When using the classes report, scrreprt, book, +% scrbook or memoir, uncomment the following line. +%\addtokomafont{chapter}{\color{heading-color}} + +% +% variables for title, author and date +% +$if(beamer)$ +$else$ +\usepackage{titling} +\title{$title$} +\author{$for(author)$$author$$sep$, $endfor$} +\date{$date$} +$endif$ + +% +% tables +% +$if(tables)$ + +\definecolor{table-row-color}{HTML}{F5F5F5} +\definecolor{table-rule-color}{HTML}{999999} + +%\arrayrulecolor{black!40} +\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule +\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule +\renewcommand{\arraystretch}{1.3} % spacing (padding) + +$if(table-use-row-colors)$ +% TODO: This doesn't work anymore. I don't know why. +% Reset rownum counter so that each table +% starts with the same row colors. +% https://tex.stackexchange.com/questions/170637/restarting-rowcolors +% +% Unfortunately the colored cells extend beyond the edge of the +% table because pandoc uses @-expressions (@{}) like so: +% +% \begin{longtable}[]{@{}ll@{}} +% \end{longtable} +% +% https://en.wikibooks.org/wiki/LaTeX/Tables#.40-expressions +\let\oldlongtable\longtable +\let\endoldlongtable\endlongtable +\renewenvironment{longtable}{ +\rowcolors{3}{}{table-row-color!100} % row color +\oldlongtable} { +\endoldlongtable +\global\rownum=0\relax} +$endif$ +$endif$ + +% +% remove paragraph indention +% +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +\setlength{\emergencystretch}{3em} % prevent overfull lines + +% +% +% Listings +% +% + +$if(listings)$ + +% +% general listing colors +% +\definecolor{listing-background}{HTML}{F7F7F7} +\definecolor{listing-rule}{HTML}{B3B2B3} +\definecolor{listing-numbers}{HTML}{B3B2B3} +\definecolor{listing-text-color}{HTML}{000000} +\definecolor{listing-keyword}{HTML}{435489} +\definecolor{listing-keyword-2}{HTML}{1284CA} % additional keywords +\definecolor{listing-keyword-3}{HTML}{9137CB} % additional keywords +\definecolor{listing-identifier}{HTML}{435489} +\definecolor{listing-string}{HTML}{00999A} +\definecolor{listing-comment}{HTML}{8E8E8E} + +\lstdefinestyle{eisvogel_listing_style}{ + language = java, +$if(listings-disable-line-numbers)$ + xleftmargin = 0.6em, + framexleftmargin = 0.4em, +$else$ + numbers = left, + xleftmargin = 2.7em, + framexleftmargin = 2.5em, +$endif$ + backgroundcolor = \color{listing-background}, + basicstyle = \color{listing-text-color}\linespread{1.0}$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$\ttfamily{}, + breaklines = true, + frame = single, + framesep = 0.19em, + rulecolor = \color{listing-rule}, + frameround = ffff, + tabsize = 4, + numberstyle = \color{listing-numbers}, + aboveskip = 1.0em, + belowskip = 0.1em, + abovecaptionskip = 0em, + belowcaptionskip = 1.0em, + keywordstyle = {\color{listing-keyword}\bfseries}, + keywordstyle = {[2]\color{listing-keyword-2}\bfseries}, + keywordstyle = {[3]\color{listing-keyword-3}\bfseries\itshape}, + sensitive = true, + identifierstyle = \color{listing-identifier}, + commentstyle = \color{listing-comment}, + stringstyle = \color{listing-string}, + showstringspaces = false, + escapeinside = {/*@}{@*/}, % Allow LaTeX inside these special comments + literate = + {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 + {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1 + {à}{{\`a}}1 {è}{{\'e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1 + {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1 + {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 + {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 + {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1 + {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1 + {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 + {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1 + {€}{{\EUR}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1 + {»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 + {…}{{\ldots}}1 {≥}{{>=}}1 {≤}{{<=}}1 {„}{{\glqq}}1 {“}{{\grqq}}1 + {”}{{''}}1 +} +\lstset{style=eisvogel_listing_style} + +% +% Java (Java SE 12, 2019-06-22) +% +\lstdefinelanguage{Java}{ + morekeywords={ + % normal keywords (without data types) + abstract,assert,break,case,catch,class,continue,default, + do,else,enum,exports,extends,final,finally,for,if,implements, + import,instanceof,interface,module,native,new,package,private, + protected,public,requires,return,static,strictfp,super,switch, + synchronized,this,throw,throws,transient,try,volatile,while, + % var is an identifier + var + }, + morekeywords={[2] % data types + % primitive data types + boolean,byte,char,double,float,int,long,short, + % String + String, + % primitive wrapper types + Boolean,Byte,Character,Double,Float,Integer,Long,Short + % number types + Number,AtomicInteger,AtomicLong,BigDecimal,BigInteger,DoubleAccumulator,DoubleAdder,LongAccumulator,LongAdder,Short, + % other + Object,Void,void + }, + morekeywords={[3] % literals + % reserved words for literal values + null,true,false, + }, + sensitive, + morecomment = [l]//, + morecomment = [s]{/*}{*/}, + morecomment = [s]{/**}{*/}, + morestring = [b]", + morestring = [b]', +} + +\lstdefinelanguage{XML}{ + morestring = [b]", + moredelim = [s][\bfseries\color{listing-keyword}]{<}{\ }, + moredelim = [s][\bfseries\color{listing-keyword}]{}, + moredelim = [l][\bfseries\color{listing-keyword}]{/>}, + moredelim = [l][\bfseries\color{listing-keyword}]{>}, + morecomment = [s]{}, + morecomment = [s]{}, + commentstyle = \color{listing-comment}, + stringstyle = \color{listing-string}, + identifierstyle = \color{listing-identifier} +} +$endif$ + +% +% header and footer +% +$if(beamer)$ +$else$ +$if(disable-header-and-footer)$ +$else$ +\usepackage[headsepline,footsepline]{scrlayer-scrpage} + +\newpairofpagestyles{eisvogel-header-footer}{ + \clearpairofpagestyles + \ihead[$if(header-right)$$header-right$$else$$date$$endif$]{$if(header-left)$$header-left$$else$$title$$endif$} + \chead[$if(header-center)$$header-center$$else$$endif$]{$if(header-center)$$header-center$$else$$endif$} + \ohead[$if(header-left)$$header-left$$else$$title$$endif$]{$if(header-right)$$header-right$$else$$date$$endif$} + \ifoot[$if(footer-right)$$footer-right$$else$\thepage$endif$]{$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$} + \cfoot[$if(footer-center)$$footer-center$$else$$endif$]{$if(footer-center)$$footer-center$$else$$endif$} + \ofoot[$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$]{$if(footer-right)$$footer-right$$else$\thepage$endif$} + \addtokomafont{pageheadfoot}{\upshape} +} +\pagestyle{eisvogel-header-footer} +$if(page-background)$ +\backgroundsetup{ +scale=1, +color=black, +opacity=$if(page-background-opacity)$$page-background-opacity$$else$0.2$endif$, +angle=0, +contents={% + \includegraphics[width=\paperwidth,height=\paperheight]{$page-background$} + }% +} +$endif$ +$endif$ +$endif$ + +%% +%% end added +%% + +\begin{document} + +%% +%% begin titlepage +%% +$if(beamer)$ +$else$ +$if(titlepage)$ +\begin{titlepage} +$if(titlepage-background)$ +\newgeometry{top=2cm, right=4cm, bottom=3cm, left=4cm} +$else$ +\newgeometry{left=6cm} +$endif$ +$if(titlepage-color)$ +\definecolor{titlepage-color}{HTML}{$titlepage-color$} +\newpagecolor{titlepage-color}\afterpage{\restorepagecolor} +$endif$ +$if(titlepage-background)$ +\tikz[remember picture,overlay] \node[inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{$titlepage-background$}}; +$endif$ +\newcommand{\colorRule}[3][black]{\textcolor[HTML]{#1}{\rule{#2}{#3}}} +\begin{flushleft} +\noindent +\\[-1em] +\color[HTML]{$if(titlepage-text-color)$$titlepage-text-color$$else$5F5F5F$endif$} +\makebox[0pt][l]{\colorRule[$if(titlepage-rule-color)$$titlepage-rule-color$$else$435488$endif$]{1.3\textwidth}{$if(titlepage-rule-height)$$titlepage-rule-height$$else$4$endif$pt}} +\par +\noindent + +$if(titlepage-background)$ +% The titlepage with a background image has other text spacing and text size +{ + \setstretch{2} + \vfill + \vskip -8em + \noindent {\huge \textbf{\textsf{$title$}}} + $if(subtitle)$ + \vskip 1em + {\Large \textsf{$subtitle$}} + $endif$ + \vskip 2em + \noindent {\Large \textsf{$for(author)$$author$$sep$, $endfor$} \vskip 0.6em \textsf{$date$}} + \vfill +} +$else$ +{ + \setstretch{1.4} + \vfill + \noindent {\huge \textbf{\textsf{$title$}}} + $if(subtitle)$ + \vskip 1em + {\Large \textsf{$subtitle$}} + $endif$ + \vskip 2em + \noindent {\Large \textsf{$for(author)$$author$$sep$, $endfor$}} + \vfill +} +$endif$ + +$if(logo)$ +\noindent +\includegraphics[width=$if(logo-width)$$logo-width$$else$35mm$endif$, left]{$logo$} +$endif$ + +$if(titlepage-background)$ +$else$ +\textsf{$date$} +$endif$ +\end{flushleft} +\end{titlepage} +\restoregeometry +$endif$ +$endif$ + +%% +%% end titlepage +%% + +$if(has-frontmatter)$ +\frontmatter +$endif$ +$if(title)$ +$if(beamer)$ +\frame{\titlepage} +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ +$endif$ + +$if(first-chapter)$ +\setcounter{chapter}{$first-chapter$} +\addtocounter{chapter}{-1} +$endif$ + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$if(toc-title)$ +\renewcommand*\contentsname{$toc-title$} +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks] +$if(toc-title)$ + \frametitle{$toc-title$} +$endif$ + \tableofcontents[hideallsubsections] +\end{frame} +$if(toc-own-page)$ +\newpage +$endif$ +$else$ +{ +$if(colorlinks)$ +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} +$endif$ +\setcounter{tocdepth}{$toc-depth$} +\tableofcontents +$if(toc-own-page)$ +\newpage +$endif$ +} +$endif$ +$endif$ +$if(lot)$ +\listoftables +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$if(linestretch)$ +\setstretch{$linestretch$} +$endif$ +$if(has-frontmatter)$ +\mainmatter +$endif$ +$body$ + +$if(has-frontmatter)$ +\backmatter +$endif$ +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(has-chapters)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue +$endif$ + \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$if(beamer)$ +\end{frame} +$endif$ + +$endif$ +$endif$ +$if(biblatex)$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue + \printbibliography[heading=none] +\end{frame} +$else$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} diff --git a/.config/utils/pandoc/templates/head.tex b/.config/utils/pandoc/templates/head.tex new file mode 100644 index 0000000..bd6626d --- /dev/null +++ b/.config/utils/pandoc/templates/head.tex @@ -0,0 +1,40 @@ +\usepackage{longtable} +\usepackage[T1]{fontenc} +\usepackage{lmodern} +% \usepackage[scaled]{helvet} + +\usepackage{glossaries} + +\makeglossaries +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Block Quotes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{framed} +\usepackage{quoting} + +\definecolor{bgcolor}{HTML}{DADADA} +\colorlet{shadecolor}{bgcolor} +% define a new environment shadedquotation. You can change leftmargin and +% rightmargin as you wish. +\newenvironment{shadedquotation} + {\begin{shaded*} + \quoting[leftmargin=1em, rightmargin=0pt, vskip=0pt, font=itshape] + } + {\endquoting + \end{shaded*} + } + +% +\def\quote{\shadedquotation} +\def\endquote{\endshadedquotation} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Inline Quotes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{fvextra} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}} + +\definecolor{bgcolor}{HTML}{E0E0E0} +\let\oldtexttt\texttt +\newcommand{\code}[1]{\begingroup\setlength{\fboxsep}{1pt}\colorbox{bgcolor}{\oldtexttt{\hspace*{2pt}\vphantom{A}#1\hspace*{2pt}}}\endgroup} +\renewcommand{\texttt}[1]{\code{\oldtexttt{#1}}} diff --git a/.config/utils/pandoc/templates/metadata.yml b/.config/utils/pandoc/templates/metadata.yml new file mode 100644 index 0000000..d7e98c5 --- /dev/null +++ b/.config/utils/pandoc/templates/metadata.yml @@ -0,0 +1,15 @@ +title: +date: <date> +keywords: [<tag1>,<tag2>], +lang: "en" +subtitle: "<subtitle>" +fontfamily: "Source Code Pro" +fontsize: 14pt +monofont: "Source Code Pro" +titlepage: true, +titlepage-text-color: "FFFFFF" +titlepage-rule-color: "360049" +titlepage-rule-height: 0 +titlepage-background: "<absolute or relative path>/templates/background.pdf" +page-background-none: "<absolute or relative path>/templates/background1.pdf" +toc-own-page: true diff --git a/.config/utils/pandoc/templates/template.tex b/.config/utils/pandoc/templates/template.tex new file mode 100644 index 0000000..1f6a16a --- /dev/null +++ b/.config/utils/pandoc/templates/template.tex @@ -0,0 +1,556 @@ +\PassOptionsToPackage{unicode=true$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} % options for packages loaded elsewhere +\PassOptionsToPackage{hyphens}{url} +$if(colorlinks)$ +\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} +$endif$ +$if(dir)$ +$if(latex-dir-rtl)$ +\PassOptionsToPackage{RTLdocument}{bidi} +$endif$ +$endif$ +% +\documentclass[ +$if(fontsize)$ + $fontsize$, +$endif$ +$if(lang)$ + $babel-lang$, +$endif$ +$if(papersize)$ + $papersize$paper, +$endif$ +$if(beamer)$ + ignorenonframetext, +$if(handout)$ + handout, +$endif$ +$if(aspectratio)$ + aspectratio=$aspectratio$, +$endif$ +$endif$ +$for(classoption)$ + $classoption$$sep$, +$endfor$ +]{$documentclass$} +$if(beamer)$ +$if(background-image)$ +\usebackgroundtemplate{% + \includegraphics[width=\paperwidth]{$background-image$}% +} +$endif$ + +\usepackage{pgfpages} +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{caption label separator}{: } +\setbeamercolor{caption name}{fg=normal text.fg} +\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ +$for(beameroption)$ +\setbeameroption{$beameroption$} +$endfor$ +% Prevent slide breaks in the middle of a paragraph: +\widowpenalties 1 10000 +\raggedbottom +$if(section-titles)$ +\setbeamertemplate{part page}{ + \centering + \begin{beamercolorbox}[sep=16pt,center]{part title} + \usebeamerfont{part title}\insertpart\par + \end{beamercolorbox} +} +\setbeamertemplate{section page}{ + \centering + \begin{beamercolorbox}[sep=12pt,center]{part title} + \usebeamerfont{section title}\insertsection\par + \end{beamercolorbox} +} +\setbeamertemplate{subsection page}{ + \centering + \begin{beamercolorbox}[sep=8pt,center]{part title} + \usebeamerfont{subsection title}\insertsubsection\par + \end{beamercolorbox} +} +\AtBeginPart{ + \frame{\partpage} +} +\AtBeginSection{ + \ifbibliography + \else + \frame{\sectionpage} + \fi +} +\AtBeginSubsection{ + \frame{\subsectionpage} +} +$endif$ +$endif$ +$if(beamerarticle)$ +\usepackage{beamerarticle} % needs to be loaded first +$endif$ +$if(fontfamily)$ +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} +$else$ +\usepackage{lmodern} +$endif$ +$if(linestretch)$ +\usepackage{setspace} +\setstretch{$linestretch$} +$endif$ +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provides euro and other symbols +\else % if luatex or xelatex +$if(mathspec)$ + \ifxetex + \usepackage{mathspec} + \else + \usepackage{unicode-math} + \fi +$else$ + \usepackage{unicode-math} +$endif$ + \defaultfontfeatures{Scale=MatchLowercase} + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} +$if(mainfont)$ + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} +$endif$ +$if(sansfont)$ + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} +$endif$ +$if(monofont)$ + \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} +$endif$ +$for(fontfamilies)$ + \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} +$endfor$ +$if(mathfont)$ +$if(mathspec)$ + \ifxetex + \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \else + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \fi +$else$ + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} +$endif$ +$endif$ +$if(CJKmainfont)$ + \ifxetex + \usepackage{xeCJK} + \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + \fi +$endif$ +$if(luatexjapresetoptions)$ + \ifluatex + \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} + \fi +$endif$ +$if(CJKmainfont)$ + \ifluatex + \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} + \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + \fi +$endif$ +\fi +$if(beamer)$ +$if(theme)$ +\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} +$endif$ +$if(colortheme)$ +\usecolortheme{$colortheme$} +$endif$ +$if(fonttheme)$ +\usefonttheme{$fonttheme$} +$endif$ +$if(mainfont)$ +\usefonttheme{serif} % use mainfont rather than sansfont for slide text +$endif$ +$if(innertheme)$ +\useinnertheme{$innertheme$} +$endif$ +$if(outertheme)$ +\useoutertheme{$outertheme$} +$endif$ +$endif$ +%%%%%%%%%%% Fancy header and footer %%%%%%%%%%%%% +%\usepackage[fit]{truncate} +\usepackage{fancyhdr} +\pagestyle{fancy} % % This must be here, because defaults are set and renewcommand for section marks will work. + +\fancyhf{} + %\fancyhead[RO,LE]{\truncate{.95\headwidth}{\leftmark}} +\fancyhead[R]{\nouppercase{\leftmark}} + \fancyfoot[C]{\thepage} + +%\renewcommand{\sectionmark}[1]{\markright{#1}} +%\renewcommand{\chaptermark}[1]{\markleft{#1}} +%\renewcommand{\subsectionmark}[1]{} + +%\fancyhead[L]{\rightmark} +%\fancyhead[R]{\leftmark} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%https://en.wikibooks.org/wiki/LaTeX/Customizing_Page_Headers_and_Footers +%\renewcommand{\chaptermark}[1]{ \markboth{#1}{} } +% +%\renewcommand{\sectionmark}[1]{ \markright{#1} } +% +%\fancyhf{} +%\fancyhead[LE,RO]{\thepage} +%\fancyhead[RE]{\textit{ \nouppercase{\leftmark}} } +%\fancyhead[LO]{\textit{ \nouppercase{\rightmark}} } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%https://latex.org/forum/viewtopic.php?t=31420 + +%\pagestyle{fancy} +%\fancyhead{} +%\fancyhead[RO,LE]{\thepage} +%\fancyhead[CE]{Title of the book} +%\fancyhead[CO]{\chaptermark}<-- \chaptermark has no place here. It is used to *set* the mark(s) for a chapter, not to get it. +%\fancyhead[CO]{\leftmark} +%\fancyfoot{} +%\renewcommand{\chaptermark}[1]{\markboth{#1}{}} +%\renewcommand{\headrulewidth}{0.4pt} +%\renewcommand{\footrulewidth}{0pt} +%\fancypagestyle{plain}{}%<-- only if you really want to have the first page of a chapter showing the same stuff like the chapter's title just below it... + +%%%%%https://tex.stackexchange.com/questions/151784/how-to-display-current-section-title-in-header + +%\fancyhf{} +%\fancyhead[L]{\rightmark} +%\fancyhead[R]{\nouppercase{\leftmark}} +%%\renewcommand{\headrulewidth}{0pt} + + + +%\pagestyle{fancy} % This must be here, because defaults are set and renewcommand for section marks will work. +%\renewcommand{\sectionmark}[1]{\markright{#1}} +%\renewcommand{\subsectionmark}[1]{} +% +%%%https://tex.stackexchange.com/questions/222370/how-can-i-customize-and-use-the-leftmark-and-rightmark-commands-with-custom-fa +%%Fancyhdr Styles +%\fancypagestyle{frontmatter}{% + %\fancyhf{} % clear all fields + %\renewcommand{\headrulewidth}{0pt} + %\lhead{} + %\lfoot{} + %\cfoot{} + %\rfoot{} +%}% +%\fancypagestyle{mainmatter}{% + %\fancyhf{} % clear all fields + %\renewcommand{\headrulewidth}{0pt} + %\lhead{} + %\rhead{} + %\lfoot{} + %\cfoot{} + %\rfoot{} +%}% +%%%%%%%%%%% Fancy header and footer %%%%%%%%%%%%% + +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\IfFileExists{microtype.sty}{% use microtype if available + \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +$if(indent)$ +$else$ +\makeatletter +\@ifundefined{KOMAClassName}{% if non-KOMA class + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt}} +}{% if KOMA class + \KOMAoptions{parskip=half}} +\makeatother +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +\usepackage{xcolor} +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} +\hypersetup{ +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$author-meta$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, + filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$, + citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, +$else$ + pdfborder={0 0 0}, +$endif$ + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +$if(verbatim-in-note)$ +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$if(geometry)$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$if(beamer)$ +\newif\ifbibliography +$endif$ +$if(listings)$ +\usepackage{listings} +\newcommand{\passthrough}[1]{#1} +\lstset{defaultdialect=[5.3]Lua} +\lstset{defaultdialect=[x86masm]Assembler} +$endif$ +%%%%%%% Allow deeper lists %%%%%%%%%%%%%%%%%%% + \usepackage{enumitem} + \setlistdepth{20} + \renewlist{itemize}{itemize}{20} + \renewlist{enumerate}{enumerate}{20} + \setlist[itemize]{label= $cdot$ } + \setlist[itemize,1]{label=\textbullet} + \setlist[itemize,2]{label=--} + \setlist[itemize,3]{label=*} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ +$if(tables)$ +\usepackage{longtable,booktabs} +$if(beamer)$ +\usepackage{caption} +% These lines are needed to make table captions work with longtable: +\makeatletter +\def\fnum@table{\tablename~\thetable} +\makeatother +$else$ +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +$endif$ +$endif$ +$if(graphics)$ +\usepackage{graphicx,grffile} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +$endif$ +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(numbersections)$ +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} +$else$ +\setcounter{secnumdepth}{-2} +$endif$ +$if(beamer)$ +$else$ +$if(subparagraph)$ +$else$ +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else + \let\oldparagraph\paragraph + \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else + \let\oldsubparagraph\subparagraph + \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ +$endif$ +$if(pagestyle)$ +\pagestyle{$pagestyle$} +$endif$ + +% set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother + +$for(header-includes)$ +$header-includes$ +$endfor$ +$if(lang)$ +\ifnum 0\ifxetex 1\fi=0 % if pdftex or luatex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} +$if(babel-newcommands)$ + $babel-newcommands$ +$endif$ +\else % if xetex + % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) + \usepackage{polyglossia} + \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} +$for(polyglossia-otherlangs)$ + \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} +$endfor$ +\fi +$endif$ +$if(dir)$ +\ifxetex + % load bidi as late as possible as it modifies e.g. graphicx + \usepackage{bidi} +\fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ +$if(natbib)$ +\usepackage[$natbiboptions$]{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ + +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +$if(beamer)$ +$else$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +$endif$ +\subtitle{$subtitle$} +$endif$ +$if(author)$ +\author{$for(author)$$author$$sep$ \and $endfor$} +$endif$ +\date{$date$} +$if(beamer)$ +$if(institute)$ +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics{$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ + +\begin{document} +$if(title)$ +$if(beamer)$ +\frame{\titlepage} +$else$ +\maketitle +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ +$endif$ + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$if(toc-title)$ +\renewcommand*\contentsname{$toc-title$} +$endif$ +$if(beamer)$ +\begin{frame} +$if(toc-title)$ + \frametitle{$toc-title$} +$endif$ + %\tableofcontents[hideallsubsections] +\tableofcontents +\end{frame} +$else$ +{ +$if(colorlinks)$ +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} +$endif$ +\setcounter{tocdepth}{$toc-depth$} +%\setcounter{tocdepth}{4} +\setcounter{secnumdepth}{3} +\tableofcontents +%\setlistdepth{9}} +$endif$ +$endif$ +$if(lot)$ +\listoftables +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$body$ + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue +$endif$ + \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$if(beamer)$ +\end{frame} +$endif$ + +$endif$ +$endif$ +$if(biblatex)$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue + \printbibliography[heading=none] +\end{frame} +$else$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} From 0d34052cf1ad0e51698068f0eb3c77c56f8bbb33 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sat, 6 Nov 2021 09:37:17 +0530 Subject: [PATCH 21/38] feat(nvim): use netrw instead of nerdtree + Changes: + netrw winsize and liststyle + shortcut to open netrw --- AppData/Local/nvim/general/general.vim | 4 ++-- AppData/Local/nvim/general/leader.vim | 7 ++++--- AppData/Local/nvim/init.vim | 2 +- AppData/Local/nvim/plugs/plugins.vim | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/AppData/Local/nvim/general/general.vim b/AppData/Local/nvim/general/general.vim index 6eee611..ec99df8 100644 --- a/AppData/Local/nvim/general/general.vim +++ b/AppData/Local/nvim/general/general.vim @@ -3,14 +3,12 @@ set mouse=a " CLIPBOARD ----- {{{ "vim clipboard and system clipboard same now set clipboard^=unnamed - "wrap backspace set backspace=indent,eol,start "https://stackoverflow.com/a/53872985/12988588 "dont save character deleted using `x` "send it to The blackhole-register nnoremap x "_x - "set autochdir " }}} @@ -109,3 +107,5 @@ set shortmess+=c " set guioptions-=e " endif +let g:netrw_liststyle=3 +let g:netrw_winsize=30 diff --git a/AppData/Local/nvim/general/leader.vim b/AppData/Local/nvim/general/leader.vim index 2b4c4f0..af4be05 100644 --- a/AppData/Local/nvim/general/leader.vim +++ b/AppData/Local/nvim/general/leader.vim @@ -1,7 +1,7 @@ " Mappings with leader key " source vim file -nmap <leader>sv :source $LOCALAPPDATA/nvim/init.vim<CR> -nmap <leader>so :e $LOCALAPPDATA/nvim/init.vim<CR> +nmap <leader>vs :source $LOCALAPPDATA/nvim/init.vim<CR> +nmap <leader>vo :e $LOCALAPPDATA/nvim/init.vim<CR> " nmap <leader>so :vsplit <bar> :e $LOCALAPPDATA/nvim/init.vim<CR> nnoremap <leader>n :bnext<CR> nnoremap <leader>p :bprev<CR> @@ -21,4 +21,5 @@ nnoremap <silent> <Leader>0 :exe "vertical resize " . (winwidth(0) * 3/2)<CR> nnoremap <silent> <Leader>9 :exe "vertical resize " . (winwidth(0) * 2/3)<CR> " }}} -"nmap <leader>ws : +"netrw +nnoremap <silent><leader>t :Lexplore<CR> diff --git a/AppData/Local/nvim/init.vim b/AppData/Local/nvim/init.vim index 48177b7..e1522f8 100644 --- a/AppData/Local/nvim/init.vim +++ b/AppData/Local/nvim/init.vim @@ -17,7 +17,7 @@ source $LOCALAPPDATA/nvim/plugs/fzf.vim source $LOCALAPPDATA/nvim/plugs/goyo.vim source $LOCALAPPDATA/nvim/plugs/lightline_v1.vim source $LOCALAPPDATA/nvim/plugs/markdown.vim -source $LOCALAPPDATA/nvim/plugs/nerdtree.vim +"source $LOCALAPPDATA/nvim/plugs/nerdtree.vim source $LOCALAPPDATA/nvim/plugs/telescope_plug.vim " diff --git a/AppData/Local/nvim/plugs/plugins.vim b/AppData/Local/nvim/plugs/plugins.vim index 85625b8..b191ff1 100644 --- a/AppData/Local/nvim/plugs/plugins.vim +++ b/AppData/Local/nvim/plugs/plugins.vim @@ -6,7 +6,7 @@ call plug#begin(s:PLUGIN_DIR) Plug 'morhetz/gruvbox' "Plug 'sainnhe/gruvbox-material' " NERD tree will be loaded on the first invocation of NERDTreeToggle command" - Plug 'preservim/nerdtree',{ 'on': 'NERDTreeToggle'} + "Plug 'preservim/nerdtree',{ 'on': 'NERDTreeToggle'} "Plug 'tiagofumo/vim-nerdtree-syntax-highlight' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-commentary' From fbadb1eaf6dd2e1519c1a2b7d21299ca7d17798c Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:16:03 +0530 Subject: [PATCH 22/38] chore(git): dont ignore neovim config files --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5163288..59e250d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ !.config !.config/** - # Bash stuff (profile just sources bashrc, since it's the only thing sourced # when a shell is a login shell). !.bash* @@ -33,3 +32,7 @@ # vim .netrw* view/ + +# nvim +!AppData/Local/nvim +!AppData/Local/nvim/** From 3e72b1d8cd5269c77867ccf75fd83e2379f82a1f Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:21:04 +0530 Subject: [PATCH 23/38] fix(powershell,vim): support custom vimrc directory --- Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 index 890382e..e21f517 100644 --- a/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1 @@ -118,3 +118,8 @@ set-alias -name wikifiles -value wikifiles_fn ############################################ # Windows terminal settings $wtsettings = (Get-ChildItem "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState" -Filter settings.json).FullName + +$env:GVIMINIT='let $MYGVIMRC=has("nvim")?$MYGVIMRC:"$HOME/.config/vim/vimrc" | source $MYGVIMRC' + +#export VIMINIT='let $MYVIMRC=has("nvim")?$MYVIMRC:"$HOME/.config/vim/vimrc" | source $MYVIMRC' +$env:VIMINIT='let $MYVIMRC=has("nvim")?"$LOCALAPPDATA/nvim/init.vim":"$HOME/.config/vim/vimrc" | source $MYVIMRC' From 4bf667bf382eb8385110104c3c9eff33f674a50a Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:29:28 +0530 Subject: [PATCH 24/38] chore(nvim): update fzf keybindings --- AppData/Local/nvim/plugs/fzf.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AppData/Local/nvim/plugs/fzf.vim b/AppData/Local/nvim/plugs/fzf.vim index 55d5ded..eff8c2e 100644 --- a/AppData/Local/nvim/plugs/fzf.vim +++ b/AppData/Local/nvim/plugs/fzf.vim @@ -1,7 +1,10 @@ " fzf ----- {{{ " put search prompt at the top let $FZF_DEFAULT_OPTS ='--reverse' - nnoremap <C-p> :Files<CR> + nnoremap <leader>fg :GFiles<CR> + nnoremap <leader>ff :Files<CR> + nnoremap <leader>fb :Buffers<CR> +let g:fzf_preview_window = [] " let g:fzf_action = { " \ 'ctrl-t': 'tab split', " \ 'ctrl-s': 'split', From 85d2418030b725de533ef51a121c5117fb65e84d Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:31:09 +0530 Subject: [PATCH 25/38] chore(vim): set bg for vim while in git commit msg --- AppData/Local/nvim/general/git.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/AppData/Local/nvim/general/git.vim b/AppData/Local/nvim/general/git.vim index 21933b4..96afddb 100644 --- a/AppData/Local/nvim/general/git.vim +++ b/AppData/Local/nvim/general/git.vim @@ -26,4 +26,5 @@ augroup GITCOMMIT_SETTINGS "https://vi.stackexchange.com/questions/4343/can-i-detect-whether-current-vim-instance-is-launched-by-git autocmd! autocmd FileType gitcommit,gitrebase silent :call Set_git_settings() + highlight! Normal ctermfg=223 ctermbg=235 guifg=#ebdbb2 guibg=#282828 augroup END From 43c350eb4a5ee57c550ed4ed667cba2dd42c9c96 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:32:06 +0530 Subject: [PATCH 26/38] chore(nvim): update keybindings for telescope --- AppData/Local/nvim/plugs/telescope_plug.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AppData/Local/nvim/plugs/telescope_plug.vim b/AppData/Local/nvim/plugs/telescope_plug.vim index f33f4f6..9738d23 100644 --- a/AppData/Local/nvim/plugs/telescope_plug.vim +++ b/AppData/Local/nvim/plugs/telescope_plug.vim @@ -1,10 +1,10 @@ " Find files using Telescope command-line sugar. "https://github.com/nvim-telescope/telescope.nvim/issues/1144 -nnoremap <leader>ff <cmd>Telescope find_files<cr> -nnoremap <leader>fg <cmd>Telescope git_files<cr> -nnoremap <leader>fl <cmd>Telescope live_grep<cr> -nnoremap <leader>fb <cmd>Telescope buffers<cr> -nnoremap <leader>fh <cmd>Telescope help_tags<cr> +nnoremap <leader>tf <cmd>Telescope find_files<cr> +nnoremap <leader>tg <cmd>Telescope git_files<cr> +nnoremap <leader>tl <cmd>Telescope live_grep<cr> +nnoremap <leader>tb <cmd>Telescope buffers<cr> +nnoremap <leader>th <cmd>Telescope help_tags<cr> lua << EOF require('telescope').setup{ defaults = { vimgrep_arguments = { 'rg', '--color=never', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case', '--ignore-file', '.gitignore' }}} From 0ce6c0ab6afda2e46690617b9f9628c4db64cf20 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:38:02 +0530 Subject: [PATCH 27/38] chore(nvim): add tmux/nvim related color settings --- .../nvim/general/colorscheme_settings.vim | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/AppData/Local/nvim/general/colorscheme_settings.vim b/AppData/Local/nvim/general/colorscheme_settings.vim index 7f45291..2e2b4ab 100644 --- a/AppData/Local/nvim/general/colorscheme_settings.vim +++ b/AppData/Local/nvim/general/colorscheme_settings.vim @@ -1,8 +1,26 @@ +"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. +"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support +"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.) +if (empty($TMUX)) + if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 + endif + "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > + "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > + " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > + if (has("termguicolors")) + set termguicolors + endif +endif + let g:colorscheme='default' + " gruvbox ----- {{{ if (has("termguicolors")) set termguicolors endif + set background=dark set t_Co=256 " colorscheme gruvbox @@ -10,7 +28,7 @@ set t_Co=256 "https://github.com/sainnhe/gruvbox-material/blob/master/doc/gruvbox-material.txt "soft,medium,hard "let g:gruvbox_material_background = 'medium' -let g:gruvbox_material_transparent_background = 1 +"let g:gruvbox_material_transparent_background = 1 let g:gruvbox_material_enable_bold = 1 let g:gruvbox_material_enable_italic = 1 "let g:gruvbox_material_statusline_style = 'original' From 334969be640af94dccb6c12183da6be501ea9aa0 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:40:28 +0530 Subject: [PATCH 28/38] chore(nvim): some setting/unsettings --- AppData/Local/nvim/general/general.vim | 4 +--- AppData/Local/nvim/general/leader.vim | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/AppData/Local/nvim/general/general.vim b/AppData/Local/nvim/general/general.vim index ec99df8..41d4e01 100644 --- a/AppData/Local/nvim/general/general.vim +++ b/AppData/Local/nvim/general/general.vim @@ -106,6 +106,4 @@ set shortmess+=c " if has('gui_running') " set guioptions-=e " endif - -let g:netrw_liststyle=3 -let g:netrw_winsize=30 +" diff --git a/AppData/Local/nvim/general/leader.vim b/AppData/Local/nvim/general/leader.vim index af4be05..18e6468 100644 --- a/AppData/Local/nvim/general/leader.vim +++ b/AppData/Local/nvim/general/leader.vim @@ -22,4 +22,4 @@ nnoremap <silent> <Leader>9 :exe "vertical resize " . (winwidth(0) * 2/3)<CR> " }}} "netrw -nnoremap <silent><leader>t :Lexplore<CR> +"nnoremap <silent><leader>t :Lexplore<CR> From 1bd06721d23db0ba1b53eaee4f592805f8ce0954 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:42:07 +0530 Subject: [PATCH 29/38] feat(bash): add fzy related bash functions --- .config/bash/.bash_functions | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.config/bash/.bash_functions b/.config/bash/.bash_functions index b1279f4..dc5b0b7 100644 --- a/.config/bash/.bash_functions +++ b/.config/bash/.bash_functions @@ -1,3 +1,15 @@ source_if_exists(){ - [ -f "$1" ] && source "$1" && echo "Sourcing \"$1\"" + [ -f "$1" ] && source "$1" } +is_in_git_repo() { + git rev-parse HEAD > /dev/null 2>&1 +} +gb() { + is_in_git_repo && + git branch -a -vv --color=always | grep -v '/HEAD\s' | + fzy | sed 's/^..//' | awk '{print $1}' | + sed 's#^remotes/[^/]*/##' +} + +bind '"\er": redraw-current-line' +bind '"\C-g\C-b": "$(gb)\e\C-e\er"' From 3496a5dc1939bff07bbde3da2e48a2962b17d76e Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:44:25 +0530 Subject: [PATCH 30/38] feat(bash,tmux): create default tmux session also edit wiki.sh --- .config/tmux/scripts/startup.sh | 14 ++++++++++++++ .config/tmux/scripts/wiki.sh | 9 +++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .config/tmux/scripts/startup.sh diff --git a/.config/tmux/scripts/startup.sh b/.config/tmux/scripts/startup.sh new file mode 100644 index 0000000..90ff8ab --- /dev/null +++ b/.config/tmux/scripts/startup.sh @@ -0,0 +1,14 @@ +#! /bin/sh +if command -v tmux &> /dev/null \ + && [ -n "$PS1" ] \ + && [[ ! "$TERM" =~ screen ]] \ + && [[ ! "$TERM" =~ tmux ]] \ + && [ -z "$TMUX" ]; then + #tmux a -t default || exec tmux new -s default && exit; + #-A : attach to 'default' session if already exists + #-s : session name + # tmux new-session -d -s "default"; + #exec tmux new-session -c "$HOME" -A -s default ; + + tmux new-session -c "$HOME" -A -s default ; +fi diff --git a/.config/tmux/scripts/wiki.sh b/.config/tmux/scripts/wiki.sh index 9e0bcc4..d3bce8a 100644 --- a/.config/tmux/scripts/wiki.sh +++ b/.config/tmux/scripts/wiki.sh @@ -10,10 +10,11 @@ SESSION="wiki" if [ "$(tmux display-message -p -F "#{session_name}")" = "${SESSION}" ];then - echo "Detaching from ${SESSION}" + # for -F option see https://man7.org/linux/man-pages/man1/tmux.1.html#FORMATS + #echo "Detaching from ${SESSION}" tmux detach-client # detach if already in the popup tmux display-message "detached from session:${SESSION}" - exit 1 + exit 0 # 0 for success fi WINDOW="vimwiki" @@ -35,9 +36,9 @@ open_wiki(){ tmux has-session -t "${SESSION}" &> /dev/null [ $? == 0 ] && SESSION_EXISTS=1 [ ${SESSION_EXISTS} == 0 ] && open_wiki -echo "Attaching to session 'wiki'" +#echo "Attaching to session 'wiki'" tmux display-message "Attaching to session:${SESSION}" -tmux display-popup -E -h "80%" -w "80%" "tmux attach -t ${SESSION}" +tmux display-popup -E -h "85%" -w "85%" "tmux attach -t ${SESSION}" #tmux display-popup -E -h "80%" -w "80%" "tmux new-session -A -s ${SESSION} \;\ #rename-window -t 0 \"${WINDOW}\" \;\ From c2a279339792616241691cb235fe529d8a9e521b Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:45:41 +0530 Subject: [PATCH 31/38] feat(tmux): edit existing popups to use fzy also do some customization related to status bar --- .config/tmux/plugins/tmux-resurrect | 1 + .config/tmux/tmux.conf | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) create mode 160000 .config/tmux/plugins/tmux-resurrect diff --git a/.config/tmux/plugins/tmux-resurrect b/.config/tmux/plugins/tmux-resurrect new file mode 160000 index 0000000..6be2f34 --- /dev/null +++ b/.config/tmux/plugins/tmux-resurrect @@ -0,0 +1 @@ +Subproject commit 6be2f34b5f06c8a6a23dc3dc835e69c132d58a18 diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index abac088..f9b1eda 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -4,8 +4,8 @@ set -s default-terminal 'xterm-256color' # Custom scripts ###################### bind-key O run-shell -b "bash ~/.config/tmux/scripts/wiki.sh" -bind-key I display-popup -h 80% -w 80% -E "vi ~/.config" -bind-key N display-popup -h 80% -w 80% -E "vi ~/.config/tmux/tmux.conf" +bind-key I display-popup -h 85% -w 85% -E "source ~/.profile;vi \"$(find ~/.config | fzy)\"" +bind-key N display-popup -h 85% -w 85% -E "source ~/.profile;vi ~/.config/tmux/tmux.conf" # credits : https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ ###################### @@ -101,27 +101,29 @@ set -g pane-active-border-style 'fg=colour236 bg=colour236' ###################### # statusbar # status-left window-list status-right -###################### +#set-option -g status-style bg=default #make status bar transparent +#set-option -g status-bg default +#set-option -g status-fg color255 +###################### set -g status-position bottom set -g status-justify left -set -g status-style 'bg=colour235 fg=colour223 dim' -set -g status-left '#{?client_prefix,#[bg=colour100],}#{?client_prefix,#[fg=colour0],} ❐ #S #{?window_zoomed_flag,🔍,} ' -#set -g status-right '#[fg=colour253,bg=colour233] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' +set -g status-style 'bg=default fg=colour223 dim' +set -g status-left '#{?client_prefix,#[bg=colour100],}#{?client_prefix,#[fg=colour0],} ❐ #S #{?window_zoomed_flag,🔍,}' set -g status-right '#{?pane_synchronized, * ,}' set -g status-right-length 50 set -g status-left-length 20 setw -g window-status-current-style 'fg=colour235 bg=colour172' -#setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' setw -g window-status-current-format ' #I:#[bold]#W#[default]#F ' setw -g window-status-style 'fg=colour223 bg=colour237' -#setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' setw -g window-status-format ' #I:#W#F ' -#setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' +setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' # messages set -g message-style 'fg=colour254 bg=colour16 bold' + +#run-shell "$HOME/.config/tmux/plugins/tmux-resurrect/resurrect.tmux" From 622bef3ceeb03a060c498747785aa8729ec3c02b Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:47:37 +0530 Subject: [PATCH 32/38] chore(git): ignore tmux plugins folder --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 59e250d..d02d5e4 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ view/ # nvim !AppData/Local/nvim !AppData/Local/nvim/** + +#tmux plugins +.config/tmux/plugins From 87780ef8c900082d8790c4a961962e82cb7cb202 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:50:10 +0530 Subject: [PATCH 33/38] feat(vim): support custom dir for vimrc also set cursorline --- .config/vim/general/general.vim | 1 + .config/vim/vimrc | 34 ++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.config/vim/general/general.vim b/.config/vim/general/general.vim index e83a43b..5707542 100644 --- a/.config/vim/general/general.vim +++ b/.config/vim/general/general.vim @@ -37,6 +37,7 @@ set showtabline=2 set lazyredraw set scrolloff=999 set colorcolumn=80 +set cursorline " Show white spaces https://gist.github.com/jdavid82/d40f40e6f124aad6223eba0ff0c7ad65#file-vimrc-L37-L39 "set listchars=tab:>·,trail:~,extends:>,precedes:<,space:· "set list diff --git a/.config/vim/vimrc b/.config/vim/vimrc index c9ef1ae..13fa5ec 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -9,7 +9,7 @@ " let g:BASE_DIR="$HOME/.config/vim" let rtp=&runtimepath -set runtimepath=g:BASE_DIR +exec "set runtimepath=".g:BASE_DIR let &runtimepath.="," \.rtp."," \.g:BASE_DIR."/after" @@ -31,3 +31,35 @@ exec "set undodir=" \.g:BASE_DIR."/undo//" \."." let g:netrw_home=g:BASE_DIR + +let mapleader="\<Space>" +exec "source ".g:BASE_DIR."/general/augroups.vim" +exec "source ".g:BASE_DIR."/general/general.vim" +exec "source ".g:BASE_DIR."/general/cursor.vim" +exec "source ".g:BASE_DIR."/general/keybindings.vim" +exec "source ".g:BASE_DIR."/general/leader.vim" + +highlight Comment cterm=italic gui=italic + +highlight ColorColumn ctermbg=235 guibg=lightgrey cterm=NONE gui=NONE +highlight CursorLine ctermbg=236 guibg=lightgrey cterm=NONE gui=NONE +highlight CursorLineNr ctermbg=236 guibg=lightgrey cterm=NONE gui=NONE + +highlight TabLineSel ctermbg=77 ctermfg=0 cterm=BOLD +highlight TabLineFill ctermbg=0 ctermfg=235 cterm=BOLD +highlight TabLineSel ctermbg=77 ctermfg=0 +highlight TabLine ctermbg=0 ctermfg=77 + +highlight visual ctermbg=238 guibg=#000000 gui=NONE + + +hi MatchParen ctermbg=0 guibg=lightblue +"hi! ColorColumn ctermbg=236 guibg=grey cterm=NONE +"hi! CursorLine ctermbg=236 guibg=grey cterm=NONE +"hi! CursorLineNr ctermbg=237 guibg=grey cterm=NONE +hi! LineNr ctermbg=232 guibg=grey cterm=NONE +"hi! NonText guifg=bg ctermfg=NONE +"hi! Visual ctermbg=237 guibg=#dddddd cterm=NONE +" +let g:netrw_cursor=0 " to use userdefined CursorLine and ColorColumn +let g:netrw_winsize=30 From 4d5774fa730dda1e6f2775c0f18219ccc3c1c34c Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:51:03 +0530 Subject: [PATCH 34/38] chore(nvim): add netrw related functions --- AppData/Local/nvim/general/augroups.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/AppData/Local/nvim/general/augroups.vim b/AppData/Local/nvim/general/augroups.vim index ad09b52..3e5b81c 100644 --- a/AppData/Local/nvim/general/augroups.vim +++ b/AppData/Local/nvim/general/augroups.vim @@ -57,3 +57,15 @@ else endif augroup END " }} +" +"autocmd filetype netrw call Netrw_mappings() + +function! Netrw_mappings() + noremap <buffer>% :call CreateInPreview()<cr> +endfunction + +function! CreateInPreview() + let l:filename = input("please enter filename: ") + execute 'silent !touch ' . b:netrw_curdir.'/'.l:filename + redraw! +endf From cee0f579e0c6d62600ca85dd38f239bb12aa9404 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:51:35 +0530 Subject: [PATCH 35/38] chore(git): ignore vim swap folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d02d5e4..2941f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ # vim .netrw* view/ +.config/vim/swap # nvim !AppData/Local/nvim From 2d0e8ada906c6155cf9a57301bb6c0b9fac4809a Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 17:53:36 +0530 Subject: [PATCH 36/38] chore(bash): source prompt related and tmux startup.sh --- .bashrc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.bashrc b/.bashrc index d59855a..22d9a4c 100644 --- a/.bashrc +++ b/.bashrc @@ -3,12 +3,14 @@ # │ BASHRC │ # └────────────────────┘ # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -#export TERM=xterm-256color +export TERM=xterm-256color VISUAL=vim EDITOR=vim HISTSIZE=1000 HISTFILESIZE=2000 - +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth ############################################################################# # ┌─────────────────────────────┐ # │ ALIASES & FUNCTIONS │ @@ -35,8 +37,17 @@ source "$HOME/.config/bash/.bash_functions" # └────────────────────┘ # ref : https://gist.github.com/justintv/168835#gistcomment-2711710 ############################################################################# -source_if_exists "$HOME/.config/git/git-prompt.sh" +#source_if_exists "$HOME/.config/git/minimal.sh" +source_if_exists "$HOME/.config/git/git-prompt1.sh" +#source_if_exists "$HOME/.config/git/minimal_fast_prompt.sh" +#source_if_exists "$HOME/.config/git/powerlevel10k.sh" +#source_if_exists "$HOME/.config/git/custom.sh" +#source_if_exists "$HOME/.config/git/custom2.sh" + #GIT_PS1_SHOWDIRTYSTATE=true + #GIT_PS1_SHOWSTASHSTATE=true + #GIT_PS1_SHOWUPSTREAM="auto" + #PS1='\t:\[\033[32m\]$(__git_ps1 " (%s)")\[\033[00m\] \W$ ' ############################################################################# # ┌────────────────────┐ # │ TMUX │ @@ -44,4 +55,4 @@ source_if_exists "$HOME/.config/git/git-prompt.sh" ############################################################################# # Not so sure : putting it in seperate script makes detaching from tmux # session, results normal bash prompt -source_if_exists "$HOME/.config/tmux/startup.sh" +source_if_exists "$HOME/.config/tmux/scripts/startup.sh" From 6fd8bb5fc165d20eac194e01c727f743d3f1edd3 Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 18:08:36 +0530 Subject: [PATCH 37/38] chore(git): only allow certain dirs inside .config folder --- .gitignore | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2941f1b..a0038ef 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,25 @@ * !.config -!.config/** + +!.config/vim +!.config/vim/** + +!.config/tmux +!.config/tmux/** + +!.config/git +!.config/git/** + +!.config/utils +!.config/utils/** + +!.config/bash +!.config/bash/** + +#tmux plugins +.config/tmux/plugins + # Bash stuff (profile just sources bashrc, since it's the only thing sourced # when a shell is a login shell). !.bash* @@ -38,5 +56,3 @@ view/ !AppData/Local/nvim !AppData/Local/nvim/** -#tmux plugins -.config/tmux/plugins From 608c1812ef6f0846c9aa39dd3bf95a11a82f7c0b Mon Sep 17 00:00:00 2001 From: Prashantha T P <tpprashantha@gmail.com> Date: Sun, 14 Nov 2021 18:13:30 +0530 Subject: [PATCH 38/38] chore(nvim): add some netrw settings some changes in plugins list --- AppData/Local/nvim/init.vim | 18 +++++++++++++++++- AppData/Local/nvim/plugs/plugins.vim | 7 +++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/AppData/Local/nvim/init.vim b/AppData/Local/nvim/init.vim index e1522f8..8f485fe 100644 --- a/AppData/Local/nvim/init.vim +++ b/AppData/Local/nvim/init.vim @@ -17,7 +17,7 @@ source $LOCALAPPDATA/nvim/plugs/fzf.vim source $LOCALAPPDATA/nvim/plugs/goyo.vim source $LOCALAPPDATA/nvim/plugs/lightline_v1.vim source $LOCALAPPDATA/nvim/plugs/markdown.vim -"source $LOCALAPPDATA/nvim/plugs/nerdtree.vim +source $LOCALAPPDATA/nvim/plugs/nerdtree.vim source $LOCALAPPDATA/nvim/plugs/telescope_plug.vim " @@ -39,5 +39,21 @@ source $LOCALAPPDATA/nvim/general/git.vim source $LOCALAPPDATA/nvim/helpers/commands.vim "hi Normal ctermbg=NONE guibg=NONE +" hi Comment gui=italic cterm=italic hi htmlArg gui=italic cterm=italic + +let g:netrw_banner = 0 +"let g:netrw_liststyle=3 +let g:netrw_winsize=30 +let g:netrw_list_hide = '^\.\.\=/\=$,.DS_Store,.idea,.git,__pycache__,venv,node_modules/,*\.o,*\.pyc,.*\.swp' +"let g:netrw_list_hide = '\(^\|\s\s\)\zs\.\S\+' +"let g:netrw_hide = 1 +"let g:netrw_browse_split=2 +"let g:netrw_list_hide= netrw_gitignore#Hide() + ""\.',.*\.swp$' + ""\.',*\.git' + ""\.',*\node_modules' +" +"let g:netrw_list_hide= '.*\.swp$' +"let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' diff --git a/AppData/Local/nvim/plugs/plugins.vim b/AppData/Local/nvim/plugs/plugins.vim index b191ff1..38f5a02 100644 --- a/AppData/Local/nvim/plugs/plugins.vim +++ b/AppData/Local/nvim/plugs/plugins.vim @@ -6,10 +6,12 @@ call plug#begin(s:PLUGIN_DIR) Plug 'morhetz/gruvbox' "Plug 'sainnhe/gruvbox-material' " NERD tree will be loaded on the first invocation of NERDTreeToggle command" - "Plug 'preservim/nerdtree',{ 'on': 'NERDTreeToggle'} + Plug 'preservim/nerdtree',{ 'on': 'NERDTreeToggle'} "Plug 'tiagofumo/vim-nerdtree-syntax-highlight' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-commentary' +" Plug 'tpope/vim-vinegar' + Plug 'ryanoasis/vim-devicons' " Track the engine. Plug 'SirVer/ultisnips' @@ -18,7 +20,7 @@ call plug#begin(s:PLUGIN_DIR) Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' "Plug 'nvim-lua/plenary.nvim' - "Plug 'nvim-telescope/telescope.nvim' + Plug 'nvim-telescope/telescope.nvim' Plug 'neoclide/coc.nvim', {'branch': 'release'} "Plug 'w0rp/ale' "Plug 'sheerun/vim-polyglot' @@ -37,5 +39,6 @@ call plug#begin(s:PLUGIN_DIR) Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } Plug 'junegunn/goyo.vim' + call plug#end() " }}}