You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Dotfiles
alacritty
alacritty.yml
font:
normal:
family: Hackstyle: Regularbold:
family: Hackstyle: Bolditalic:
family: Hackstyle: Italicbold_italic:
family: Hackstyle: Bold Italicsize: 14# Colors (Dracula)colors:
# Default colorsprimary:
background: '0x282a36'foreground: '0xf8f8f2'# Bright and dim foreground colors## The dimmed foreground color is calculated automatically if it is not present.# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`# is `false`, the normal foreground color will be used.#dim_foreground: '0x9a9a9a'#bright_foreground: '0xffffff'# Cursor colors## Colors which should be used to draw the terminal cursor. If these are unset,# the cursor color will be the inverse of the cell color.cursor:
text: '0x44475a'cursor: '0xf8f8f2'# Selection colors## Colors which should be used to draw the selection area. If selection# background is unset, selection color will be the inverse of the cell colors.# If only text is unset the cell text color will remain the same.selection:
text: '0xf8f8f2'background: '0x44475a'# Normal colorsnormal:
black: '0x000000'red: '0xff5555'green: '0x50fa7b'yellow: '0xf1fa8c'blue: '0xbd93f9'magenta: '0xff79c6'cyan: '0x8be9fd'white: '0xbfbfbf'# Bright colorsbright:
black: '0x4d4d4d'red: '0xff6e67'green: '0x5af78e'yellow: '0xf4f99d'blue: '0xcaa9fa'magenta: '0xff92d0'cyan: '0x9aedfe'white: '0xe6e6e6'# Dim colors## If the dim colors are not set, they will be calculated automatically based# on the `normal` colors.dim:
black: '0x14151b'red: '0xff2222'green: '0x1ef956'yellow: '0xebf85b'blue: '0x4d5b86'magenta: '0xff46b0'cyan: '0x59dffc'white: '0xe6e6d1'# Indexed Colors## The indexed colors include all colors from 16 to 256.# When these are not set, they're filled with sensible defaults.## Example:# `- { index: 16, color: '0xff00ff' }`#indexed_colors: []mouse:
hide_when_typing: true
" _" ____ ___ ____ _ __(_)___ ___" / __ \/ _ \/ __ \ | / / / __ `__ \" / / / / __/ /_/ / |/ / / / / / / /"/_/ /_/\___/\____/|___/_/_/ /_/ /_/""SETTINGS {{{setcolorcolumn=81"set visual ruler for the 81th columnsetruler"always show current positionsetmagic"for regular expressions turn magic onsetequalalways"same split sizessetnumber"show line numberssetignorecase"ignore search casesetsmartcase"disable ignorecase when the first letter is uppercasesetexpandtab"expandtab, instead of tab, do the same range as spacesettabstop=4"define tabstopsetsofttabstop=4"define soft tabstopssetshiftwidth=4"shiftwidthsetsmartindent"smart indentsetcursorline"highlight current linesetshowmatch"highlight matching bracketssetlazyredraw"redraw only if necessarysetnobackup"no backup files (auto save file is enough)setnowritebackup"no write backupsetnoswapfile"no swap files (auto save file is enough)setclipboard+=unnamedplus"global copy/pastesetmouse="disable gui mousesetupdatetime=400"update time 1s for auto savingsetfoldmethod=marker"set fold markersetsplitbelowsplitright"open horizontal splits at the bottomsetcompleteopt=menu,noinsert"set the first suggestion but dont insert insetcompleteopt-=preview"don't open the preview split for functionssetnohlsearch"disable search highlightingsetincsearchsethidden"for TextEditsetshortmess+=c"don't give ins-completion-menu messagessetsigncolumn=yes"always show signcolumnssettermguicolors"enable true color supportsetnoshowmode"dont show mode (lightline shows it)"use persistent historyif!isdirectory("/tmp/.vim-undo-dir")
callmkdir("/tmp/.vim-undo-dir", "", 0700)
endifsetundodir=/tmp/.vim-undo-dir"set undodirsetundofile"set persistent undo"}}}" MAPPINGS_VISUAL_MODE {{{"move highlighted lines upxnoremapK:m '<-2<cr>gv=gv"move highlighted lines downxnoremapJ:m '>+1<cr>gv=gv"bind p in visual mode to paste without overriding the current registerxnoremapppgvyxmapgc<Plug>VSCodeCommentarynmapgc<Plug>VSCodeCommentaryomapgc<Plug>VSCodeCommentarynmapgcc<Plug>VSCodeCommentaryLine"}}}
init.vim (backup)
" _" ____ ___ ____ _ __(_)___ ___" / __ \/ _ \/ __ \ | / / / __ `__ \" / / / / __/ /_/ / |/ / / / / / / /"/_/ /_/\___/\____/|___/_/_/ /_/ /_/""SETTINGS {{{setcolorcolumn=81"set visual ruler for the 81th columnsetruler"always show current positionsetmagic"for regular expressions turn magic onsetequalalways"same split sizessetnumber"show line numberssetrelativenumber"set relative number scopesetignorecase"ignore search casesetsmartcase"disable ignorecase when the first letter is uppercasesetexpandtab"expandtab, instead of tab, do the same range as spacesettabstop=4"define tabstopsetsofttabstop=4"define soft tabstopssetshiftwidth=4"shiftwidthsetsmartindent"smart indentsetcursorline"highlight current linesetshowmatch"highlight matching bracketssetlazyredraw"redraw only if necessarysetnobackup"no backup files (auto save file is enough)setnowritebackup"no write backupsetnoswapfile"no swap files (auto save file is enough)setclipboard+=unnamedplus"global copy/pastesetmouse="disable gui mousesetupdatetime=400"update time 1s for auto savingsetfoldmethod=marker"set fold markersetsplitbelowsplitright"open horizontal splits at the bottomsetcompleteopt=menu,noinsert"set the first suggestion but dont insert insetcompleteopt-=preview"don't open the preview split for functionssetnohlsearch"disable search highlightingsetincsearchsethidden"for TextEditsetshortmess+=c"don't give ins-completion-menu messagessetsigncolumn=yes"always show signcolumnssettermguicolors"enable true color supportsetnoshowmode"dont show mode (lightline shows it)"use persistent historyif!isdirectory("/tmp/.vim-undo-dir")
callmkdir("/tmp/.vim-undo-dir", "", 0700)
endifsetundodir=/tmp/.vim-undo-dir"set undodirsetundofile"set persistent undo"}}}" FUNCTIONS {{{"less auto compilefunction!LessCSSCompress()
"blog"cal system('lessc ./blog/assets/style/main.less ./blog/assets/style/main.css')"con6calsystem('lessc ./webroot/less/main.less ./webroot/less/main.css')
endfunction"maximize split togglefunction!MaximizeToggle()
ifexists("s:maximize_session")
exec"source " . s:maximize_sessioncalldelete(s:maximize_session)
unlets:maximize_sessionlet &hidden=s:maximize_hidden_saveunlets:maximize_hidden_saveelselets:maximize_hidden_save= &hiddenlets:maximize_session=tempname()
sethiddenexec"mksession! " . s:maximize_sessiononlyendifendfunction" Terminal Functionletg:term_buf=0letg:term_win=0function!TermToggle(command, height)
ifwin_gotoid(g:term_win)
hideelsebotrightnewexec"resize " . a:heighttryexec"buffer " . g:term_bufcatchcalltermopen(a:command, {"detach": 0})
letg:term_buf=bufnr("")
setnonumbersetnorelativenumbersetsigncolumn=noendtrystartinsert!letg:term_win=win_getid()
endifendfunction"}}}" MAPPINGS_MAPLEADER {{{let mapleader ="""}}}" MAPPINGS_NORMAL_MODE {{{"open ~/.config/nvim/init.vim in new tabnnoremap<leader>ei :tabnew ~/.config/nvim/init.vim<CR>"reload ~/.config/nvim/init.vimnnoremap<leader>si :source ~/.config/nvim/init.vim<CR>"which-key"findnnoremap<leader>ff :FZF<cr>nnoremap<leader>fs :Ag<cr>nnoremap<leader>fb :Buffers<cr>nnoremap<leader>fh :History:<cr>nnoremap<leader>fn :NERDTreeFind<cr>nnoremap<leader>fc :Commits<cr>"togglennoremap<leader>tn :NERDTreeToggle<cr>nnoremap<leader>tt :call TermToggle("/usr/bin/zsh", 12)<cr>nnoremap<leader>tg :call TermToggle("/usr/bin/lazygit", 30)<cr>nnoremap<leader>t+ :call MaximizeToggle()<cr>" addnnoremap<leader>ad "=strftime("%c")<cr>P"remap fol and eol to work within wrapped linesnoremap0g^noremap$g$"faster split navigationnnoremap<c-j><c-w>jnnoremap<c-k><c-w>knnoremap<c-h><c-w>hnnoremap<c-l><c-w>l"}}}" MAPPINGS_VISUAL_MODE {{{"move highlighted lines upxnoremapK:m '<-2<cr>gv=gv"move highlighted lines downxnoremapJ:m '>+1<cr>gv=gv"bind p in visual mode to paste without overriding the current registerxnoremapppgvy"}}}" MAPPINGS_INSERT_MODE {{{"pressing <enter> on autocompletion menu doesn't create a new lineinoremap<expr><cr>((pumvisible())?("\<C-y>"):("\<cr>"))"toggle spell check to de_deinoremap<F5><C-\><C-O>:setlocal spelllang=de_de spell! spell?<CR>"toggle spell check to en_usinoremap<F6><C-\><C-O>:setlocal spelllang=en_us spell! spell?<CR>"remap jj to <esc>inoremapjj<esc>"}}}" MAPPINGS_COMMAND_MODE {{{"write protected filescmapw!!%!sudo tee > /dev/null %"}}}" MAPPINGS_TERMINAL_MODE {{{tnoremap<Esc><C-\><C-n>tnoremap:q<C-\><C-n>:q!<CR>"}}}" MAPPINGS_FILE_TYPES {{{autocmdFileTypelessnmap<buffer><leader>c:call LessCSSCompress()<cr>"}}}" AUTOCMD {{{"auto save filesautocmdCursorHold,CursorHoldI*updateautocmdTextChanged,TextChangedI<buffer>silentwrite"split highlightaugroupSplitHighlightautocmd!autocmdWinEnter*setlocalcursorlineautocmdWinLeave*setlocalnocursorlineaugroupEND"highlight all matches when in search modeaugroupvimrc-incsearch-highlightautocmd!autocmdCmdlineEnter[/\?] :sethlsearchautocmdCmdlineLeave[/\?] :setnohlsearchaugroupEND"when term starts, auto go into insert modeautocmd TermOpen *startinsert"when term starts, turn off line numbers etcautocmd TermOpen *setlocallistchars=nonumbernorelativenumberletg:markdown_folding=1auFileTypemarkdownsetlocalfoldlevel=99"}}}" MISCELLANEOUS_NICE {{{"jump to last known buffers cursor position when reopening, if possibleifhas("autocmd")
auBufReadPost*ifline("'\"") > 0&&line("'\"") <=line("$") | exe"normal! g`\"" | endifendif"}}}" PLUGINS_AUTOINSTALL {{{"auto installs the vim-plug plugin manager if neededifempty(glob('~/.config/nvim/autoload/plug.vim'))
silent!curl -fLo ~/.config/nvim/autoload/plug.vim--create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vimautocmd!autocmdVimEnter* PlugInstall
endif"}}}" PLUGINS_DEFAULT {{{callplug#begin('~/.local/share/nvim/plugged')
Plug '~/.fzf'"Fuzzy file finder dir
Plug 'junegunn/fzf.vim'"Fuzzy file finder
Plug 'tmhedberg/matchit'"Extended % matching for HTML, LaTeX...
Plug 'tpope/vim-fugitive'"Needed for gv.vim
Plug 'tpope/vim-surround'"Surroundings: parentheses, brackets, quotes, XML tags, and more
Plug 'Raimondi/delimitMate'"Provides insert mode auto-completion for quotes, parens, brackets, etc.
Plug 'tpope/vim-commentary'"Comment stuff out and in
Plug 'plasticboy/vim-markdown'"Better markdown defaults
Plug 'neoclide/coc.nvim', {'branch': 'release'}"Lsp
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
"}}}" PLUGINS_INTERFACE {{{
Plug 'junegunn/goyo.vim'"Distraction-free writin
Plug 'Yggdroot/indentLine'"Display indention levels
Plug 'scrooloose/nerdtree'"File Viewer
Plug 'itchyny/lightline.vim'"Statusline
Plug 'kshenoy/vim-signature'"Make marks visible in the gutter
Plug 'ryanoasis/vim-devicons'"Icons
Plug 'airblade/vim-gitgutter'"Git annotations beside line numbers
Plug 'liuchengxu/vim-which-key'"vim-which-key is vim port of emacs-which-key that displays available keybindings in popup
Plug 'gorodinskiy/vim-coloresque'"Show hex colors
Plug 'Xuyuanp/nerdtree-git-plugin'"Git integration for NERDTree
Plug 'ntpeters/vim-better-whitespace'"Show trailing whitespace
Plug 'nvim-treesitter/nvim-treesitter'"Better syntax highlighting
Plug 'junegunn/rainbow_parentheses.vim'"Rainbow parentheses
Plug 'dracula/vim', { 'as': 'dracula' }"Dracula Color Theme
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'"Extra syntax and highlight for nerdtree files"}}}" PLUGINS_PHP {{{"Plug 'StanAngeloff/php.vim' "Better syntax highlighting
Plug 'phpactor/phpactor', {'for': 'php', 'do': 'composer install'}"Some nice tools for php development"}}}" PLUGINS_TWIG {{{
Plug 'lumiliet/vim-twig'"Better syntax highlighting"}}}" PLUGINS_DART_FLUTTER {{{
Plug 'thosakwe/vim-flutter'"Vim commands for Flutter, including hot-reload-on-save and more
Plug 'dart-lang/dart-vim-plugin'"dart-vim-plugin provides filetype detection, syntax highlighting, and indentation for Dart code in Vim" }}}" PLUGINS_MIXED {{{
Plug 'mattn/emmet-vim', {'for': ['html', 'twig', 'php', 'js']}"Code completion for html/php"}}}" PLUGINS_END {{{callplug#end()
"}}}" PLUGINS_CONFIGURATION_LIGHTLINE_VIM {{{letg:lightline= {
\ 'colorscheme': 'dracula',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'coc-status', 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'fugitive#head',
\ 'cocstatus': 'coc#status'\ },
\ }
"}}}" PLUGINS_CONFIGURATION_COC.NVIM {{{" Use <c-space> to trigger completion.inoremap<silent><expr><c-space> coc#refresh()" Use K to show documentation in preview windownnoremap<silent>K:call <SID>show_documentation()<CR>function!s:show_documentation()
if (index(['vim','help'], &filetype) >=0)
execute'h '.expand('<cword>')
elsecallCocAction('doHover')
endifendfunction" Remap keys for gotosnmap<silent>gd<Plug>(coc-definition)nmap<silent>gy<Plug>(coc-type-definition)nmap<silent>gi<Plug>(coc-implementation)nmap<silent>gr<Plug>(coc-references)nmap<silent>ge<Plug>(coc-diagnostic-next)nmap<silent>gE<Plug>(coc-diagnostic-prev)" Highlight symbol under cursor on CursorHoldautocmdCursorHold*silentcallCocActionAsync('highlight')
" Remap for rename current wordnmap<leader>rn <Plug>(coc-rename)" Use `:Format` to format current buffer and substitute to delete all" whitespace, also indent the current buffer, remember position and center" current linecommand! -nargs=0 Format :callCocAction('format')
nnoremap<a-l>ma:Format<cr>:%s/\s\+$//e<cr>`admazz" Show outlinenmap<C-F12>:<C-u>CocList outline<cr>" Add status line support, for integration with other plugin, checkout `:h coc-status`setstatusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Coc plugins mappingsimap<C-j><Plug>(coc-snippets-expand-jump)"}}}" PLUGINS_CONFIGURATION_FZF.VIM {{{"jump to existing buffer if possibleletg:fzf_buffers_jump=1setwildmode=list:longest,list:full
setwildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
let$FZF_DEFAULT_COMMAND="find * -path '*/\.*' -prune -o -path 'node_modules/**' -prune -o -path 'target/**' -prune -o -path 'dist/**' -prune -o -type f -print -o -type l -print 2> /dev/null"" The Silver Searcherifexecutable('ag')
let$FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'setgrepprg=ag\ --nogroup\ --nocolor
endifletg:fzf_action= {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
""let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }"let $FZF_DEFAULT_OPTS='--layout=reverse'"}}}" PLUGINS_CONFIGURATION_VIM-COLORS-DRACULA {{{colorscheme dracula
"}}}" PLUGINS_CONFIGURATION_NERDTREE {{{map<leader><space> :NERDTreeToggle<CR>let NERDTreeQuitOnOpen=1"Close NERDTree when the only left buffer is NERDTreeautocmdbufenter*if (winnr("$") ==1&&exists("b:NERDTree") &&b:NERDTree.isTabTree()) | q | endif"Minimal UIlet NERDTreeMinimalUI=1"}}}" PLUGINS_CONFIGURATION_PHPACTOR {{{" Include use statementnmap<Leader>u :call phpactor#UseAdd()<CR>" Invoke the context menunmap<Leader>mm :call phpactor#ContextMenu()<CR>"}}}" PLUGINS_CONFIGURATION_VIM_MARKDOWN {{{" let g:vim_markdown_folding_disabled = 1" let g:vim_markdown_conceal = 0" let g:vim_markdown_conceal_code_blocks = 0" }}}" PLUGINS_CONFIGURATION_VIM_WHICH_KEY {{{nnoremap<silent><leader>:WhichKey '<Space>'<CR>letg:which_key_map= {}
letg:which_key_map.f= { 'name' : '+file' }
" }}}" PLUGINS_CONFIGURATION_NVIM_TREESITTER {{{lua << EOF
require'nvim-treesitter.configs'.setup {
ensure_installed ="maintained", -- one of "all", "maintained" (parsers with maintainers), oralist of languages
highlight= {
enable= true, -- false will disable the whole extension
},
}
EOF
" }}}
## Application hotkeys Run rofi application launcher
super + d
dmenu_run
# Run rofi window switcher
super + w rofi -location 0 -show window -display-window '' -show-icons -icon-theme papirus
# Terminal emulator
super + Return
alacritty
# Open firefox
super + shift + Return
qutebrowser
# File manager
super + e
thunar
# Ping
shift + F9
mh-ping
# Screenshot
shift + Print
gnome-screenshot --interactive
# Toggle touchpad
super + F4
sh ~/.doom.d/scripts/toggle-touchpad.sh
## Media keys
# Volume
super + F2
pactl set-sink-volume 0 +1%
super + F1
pactl set-sink-volume 0 -1%
super + F3
pactl set-sink-mute 0 toggle
# Screen backlight
super + shift + F2
sudo light -A 5
super + shift + F1
sudo light -U 5
super + shift + F3
sudo light -S 100
## sxhkd hotkeys
# Reload sxhkd configuration files
super + Escape
pkill -USR1 -x sxhkd
## bspwm hotkeys
# Restart bspwm
super + shift + r
killall redshift && bspc wm -r
# Quit bspwm
super + shift + e
bspc quit
# Close and kill
super + {shift, alt} + q
bspc node -{c, k}
# Alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# Send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# Swap the current node and the biggest node
super + g
bspc node -s biggest
## State/flags
# Set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# Set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
## Focus/swap
# Focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# Focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# Focus the next/previous node in the current desktop
super + {_,shift + }n
bspc node -f {next,prev}.local
# Focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# Focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# Focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# Focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
## Preselect
# Preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# Preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# Cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# Cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
## Move/resize
# Expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# Contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# Move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}