diff --git a/.config/aliasrc b/.config/aliasrc index 3fba568..6a2c1de 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -9,6 +9,7 @@ alias ".."="cd .." alias "..."="cd ../.." alias "...."="cd ../../.." alias "....."="cd ../../../.." +alias "dockervol"="cd /var/lib/docker/volumes" # cp alias cp="cp -i" @@ -39,7 +40,7 @@ haste() { } #khal -alias calendar="khal" +alias calendar="khal interactive" # khard alias contacts="khard" @@ -53,12 +54,16 @@ alias tree="lsd --tree" # mkdir alias mkdir="mkdir -p" -# mount -alias mount="mount |column -t" +# mutt +alias mutt="neomutt" +alias upmutt="mbsync -a && neomutt" # mv alias mv="mv -i" +# octave +alias octave="octave --persist" + # pacman alias pac="sudo pacman" @@ -90,5 +95,9 @@ command -v nvim >/dev/null && alias vi="nvim" vidiff="nvim -d" # weather alias weather="curl wttr.in" -#wget +# wget alias wget="wget --hsts-file=$XDG_CACHE_HOME/wget-hsts" + +# youtube-dl +alias yta="youtube-dl -f 'bestaudio[ext=m4a]'" +alias yta="youtube-dl -f 'bestvide[ext=mp4]+bestaudio[ext=m4a]'" diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index e9c9b3f..582601d 100644 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -28,8 +28,7 @@ monospace - JetBrainsMono Nerd Font Mono - BlexMono Nerd Font Mono + JetBrainsMono Nerd Font Mono Joy Pixels Noto Color Emoji diff --git a/.config/gtk-2.0/gtkfilechooser.ini b/.config/gtk-2.0/gtkfilechooser.ini index 09a4782..53792db 100644 --- a/.config/gtk-2.0/gtkfilechooser.ini +++ b/.config/gtk-2.0/gtkfilechooser.ini @@ -1,9 +1,9 @@ [Filechooser Settings] -LocationMode=path-bar +LocationMode=filename-entry ShowHidden=false ShowSizeColumn=true -GeometryX=0 -GeometryY=0 +GeometryX=286 +GeometryY=86 GeometryWidth=796 GeometryHeight=596 SortColumn=name diff --git a/.config/mimeapps.list b/.config/mimeapps.list deleted file mode 100644 index 535afe0..0000000 --- a/.config/mimeapps.list +++ /dev/null @@ -1,9 +0,0 @@ -[Default Applications] -x-scheme-handler/mailto=mail.desktop -text/plain=text.desktop; -text/x-shellscript=text.desktop; -application/pdf=pdf.desktop; -image/png=img.desktop; -image/jpeg=img.desktop; -image/gif=img.desktop; -application/rss+xml=rss.desktop diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc deleted file mode 100644 index 9d9dfe5..0000000 --- a/.config/mutt/muttrc +++ /dev/null @@ -1,11 +0,0 @@ -# vim: filetype=neomuttrc -#source /usr/local/share/mutt-wizard/mutt-wizard.muttrc # mw-autogenerated -source /home/tiynger/.config/mutt/custom.muttrc -source /home/tiynger/.config/mutt/muttrc.prv -# khard integration -set query_command = "khard email --parsable --search-in-source-files %s" -bind editor complete-query -bind editor ^T complete -macro index,pager A \ - "khard add-email" \ - "add the sender email address to khard" diff --git a/.config/newsboat/urls b/.config/newsboat/urls deleted file mode 100644 index 835bf7d..0000000 --- a/.config/newsboat/urls +++ /dev/null @@ -1,7 +0,0 @@ -#most recent -https://www.archlinux.org/feeds/news/ - -#Luke Smith -http://lukesmith.xyz/rss.xml "~Luke Smith (Blog)" -https://notrelated.libsyn.com/rss "~Luke Smith - Not Related (Podcast)" -https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)" diff --git a/.config/nvim/.netrwhist b/.config/nvim/.netrwhist deleted file mode 100644 index aca4713..0000000 --- a/.config/nvim/.netrwhist +++ /dev/null @@ -1,7 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =5 -let g:netrw_dirhist_5='/etc/security' -let g:netrw_dirhist_4='/home/tiynger/irc/irc.gnu.org/#gnu' -let g:netrw_dirhist_3='/home/tiynger/irc/irc.hackint.org/#36c3-hall-b' -let g:netrw_dirhist_2='/home/tiynger/.config/zsh' -let g:netrw_dirhist_1='/boot/loader/entries' diff --git a/.config/nvim/UltiSnips/tex.snippets b/.config/nvim/UltiSnips/tex.snippets index 52a1bd7..1517343 100644 --- a/.config/nvim/UltiSnips/tex.snippets +++ b/.config/nvim/UltiSnips/tex.snippets @@ -29,10 +29,11 @@ snippet ,fr "Frame" A \frametitle{$1} $2 \end{frame} +$3 endsnippet snippet ,em "Emphasis" A -\emph{$1} +\emph{$1} $2 endsnippet snippet ,bf "Bold" A @@ -55,12 +56,14 @@ snippet ,ol "Enumeration" A \begin{enumerate} \item $1 \end{enumerate} +$2 endsnippet snippet ,ul "Itemization" A \begin{itemize} \item $1 \end{itemize} +$2 endsnippet snippet ,li "List element" A @@ -76,6 +79,7 @@ snippet ,tab "Tabular" A \begin{tabular} $1 \end{tabular} +$2 endsnippet snippet ,a "Hyperlink" A @@ -87,34 +91,49 @@ snippet ,sc "Small caps" A endsnippet snippet ,chap "Chapter" A -\chapter{$1} +\chapter {$1} $2 endsnippet snippet ,sec "Section" A -\section*{$1} +\section* {$1} +$2 +endsnippet + +snippet ,lsec "Section" A +\section {$1} $2 endsnippet snippet ,ssec "Subsection" A -\subsection*{$1} +\subsection* {$1} $2 endsnippet snippet ,sssec "Subsubsection" A -\subsubsection*{$1} +\subsubsection* {$1} +$2 +endsnippet + +snippet ,par "Paragraph" A +\paragraph* {$1} +$2 +endsnippet + +snippet ,spar "Subparagraph" A +\subparagraph* {$1} $2 endsnippet snippet ,up "Use Packagage" A \usepackage{$1} +$2 endsnippet -snippet ,tt "Typewriter" A +snippet ,ttt "Typewriter" A \texttt{$1} $2 endsnippet -snippet ,par "Paragraph" A -\paragraph*{$1} -$2 +snippet $ "Mathmode" A +$$1$ $2 endsnippet diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 4a0d1c4..8f61424 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,4 +1,6 @@ -" Begin Plugin section +let mapleader ="," + +""" Begin Plugin section if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) echo "Downloading junegunn/vim-plug to manage plugins..." silent !mkdir -p ~/.config/nvim/autoload/ @@ -7,61 +9,113 @@ if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) endif call plug#begin('~/.local/share/nvim/plugged') -Plug 'lervag/vimtex' , {'for' : 'tex'} " Tex library for autocompletion -Plug 'donRaphaco/neotex' , {'for': 'tex'} " Asynchronous pdf rendering -Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} " Filetree -Plug 'majutsushi/tagbar' " Show tags -Plug 'airblade/vim-gitgutter' " Git Upgrades -Plug 'qpkorr/vim-renamer' " Bulk renamer -Plug 'sirver/ultisnips' " Snippets -Plug 'uiiaoo/java-syntax.vim' , {'for': 'java'} " Better syntax highlight for java than default -Plug 'frazrepo/vim-rainbow' " Colorized matching brackets -Plug 'junegunn/fzf.vim' " Quickly jump files using fzf -Plug 'ryanoasis/vim-devicons' " Enable Icons for vim -Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " Color Preview +Plug 'airblade/vim-gitgutter' " git upgrades +Plug 'alvan/vim-closetag' " auto close HTML tags +Plug 'donRaphaco/neotex' , {'for': 'tex'} " asynchronous pdf rendering +Plug 'frazrepo/vim-rainbow' " colorized matching brackets +Plug 'junegunn/fzf.vim' " quickly jump files using fzf +Plug 'lervag/vimtex' , {'for' : 'tex'} " tex library for autocompletion +Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} " show tags +Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'} " autocompletion +Plug 'qpkorr/vim-renamer' " bulk renamer +Plug 'raimondi/delimitmate' " automatic closing of brackets +"Plug 'rakr/vim-one' " adding colorscheme +Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " color Preview +Plug 'ryanoasis/vim-devicons' " enable icons for vim +Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} " filetree +Plug 'sirver/ultisnips' " snippets Plug 'tomasiser/vim-code-dark' " adding colorscheme -"Plug 'blueshirts/darcula' -Plug 'godlygeek/tabular' " Tabularizing things -Plug 'plasticboy/vim-markdown' , {'for': 'md'} " Helps for markdown -Plug 'tpope/vim-surround' " Help for quotes/parantheses -Plug 'alvan/vim-closetag' " Auto close HTML tags +Plug 'tpope/vim-fugitive' " git wrapper +Plug 'tpope/vim-surround' " help for quotes/parantheses +Plug 'uiiaoo/java-syntax.vim' , {'for': 'java'} " better syntax highlight for java than default +Plug 'whonore/coqtail' , {'for': 'v'} " coq interactive proof call plug#end() -" Colorscheme -colorscheme codedark +" alvan/vim-closetag +let g:closetag_filenames = '*.html,*.xhtml,*.phtml' +let g:closetag_xhtml_filenames = '*.xhtml,*.jsx' +let g:closetag_filetypes = 'html,xhtml,phtml' +let g:closetag_xhtml_filetypes = 'xhtml,jsx' +let g:closetag_emptyTags_caseSensitive = 1 +let g:closetag_regions = { + \ 'typescript.tsx': 'jsxRegion,tsxRegion', + \ 'javascript.jsx': 'jsxRegion', + \ } +let g:closetag_shortcut = '>' +let g:closetag_close_shortcut = '>' -" Rainbow -au FileType java,c,cpp,py,h call rainbow#load() - -" You complete me -let g:ycm_global_ycm_extra_conf = '/home/tiynger/.config/nvim/ycm_extra_conf.py' -let g:ycm_autoclose_preview_window_after_completion = 1 -let g:ycm_autoclose_preview_window_after_insertion = 1 -let g:ycm_semantic_triggers = { - \ 'tex' : ['{'] - \} -if !exists('g:ycm_semantic_triggers') - let g:ycm_semantic_triggers = {} -endif -let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme -let g:ycm_filepath_blacklist = {'*': 1} +" donRaphaco/neotex +let g:neotex_enabled = 2 -" Tagbar +" frazrepo/vim-rainbow +au FileType,BufNewFile,BufRead java,c,cpp,py,h call rainbow#load() + +" junegunn/fzf.vim +let $FZF_DEFAULT_COMMAND = 'find . ~ -type f' +nmap :FZF + +" majutsushi/tagbar map :TagbarToggle -" Nerdtree -map :NERDTreeToggle -autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif -let g:NERDTreeWinPos = "left" +" neoclide/coc.nvim +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" -" Neotex -let g:neotex_enabled = 2 +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +let g:coc_global_extensions = [ + \ 'coc-java', + \ 'coc-markdownlint', + \ 'coc-python', + \ 'coc-sh', + \ 'coc-vimtex', + \ ] + +if has('nvim') + inoremap coc#refresh() +else + inoremap coc#refresh() +endif + +inoremap pumvisible() ? coc#_select_confirm() + \: "\u\\=coc#on_enter()\" + +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + elseif (coc#rpc#ready()) + call CocActionAsync('doHover') + else + execute '!' . &keywordprg . " " . expand('') + endif +endfunction + +autocmd CursorHold * silent call CocActionAsync('highlight') + +nmap (coc-rename) + +xmap f (coc-format-selected) +nmap f (coc-format-selected) -" CoVim -let CoVim_default_name = "TiynGER" -let CoVim_default_port = "7000" +augroup mygroup + autocmd! + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end -" Hexokinase +" rrethy/vim-hexokinase let g:Hexokinase_refreshEvents = ['InsertLeave'] let g:Hexokinase_optInPatterns = [ \ 'full_hex', @@ -76,110 +130,179 @@ let g:Hexokinase_optInPatterns = [ let g:Hexokinase_highlighters = ['backgroundfull'] autocmd VimEnter * HexokinaseTurnOn -" Vim-Mardown -let g:vim_markdown_folding_disabled=1 -let g:vim_markdown_no_default_key_mappings=1 +" scrooloose/nerdtree +map :NERDTreeToggle +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif +let g:NERDTreeWinPos = "left" -" Vim-Closetag -let g:closetag_filenames = '*.html,*.xhtml,*.phtml' -let g:closetag_xhtml_filenames = '*.xhtml,*.jsx' -let g:closetag_filetypes = 'html,xhtml,phtml' -let g:closetag_xhtml_filetypes = 'xhtml,jsx' -let g:closetag_emptyTags_caseSensitive = 1 -let g:closetag_regions = { - \ 'typescript.tsx': 'jsxRegion,tsxRegion', - \ 'javascript.jsx': 'jsxRegion', - \ } -let g:closetag_shortcut = '>' -let g:closetag_close_shortcut = '>' +" sirver/ultisnips +let g:UltiSnipsExpandTrigger="" -" End Plugin section +" tpope/vim-fugitive +nnoremap ga :Git add %:p +nnoremap gd :Git diff +nnoremap gc :Gcommit +nnoremap go :Git checkout +nnoremap gh :diffget //3 +nnoremap gr :Gread +nnoremap gu :diffget //2 +nnoremap gs :G -let mapleader ="," +" whonore/coqtail +function g:CoqtailHighlight() + hi def CoqtailChecked guifg=#44FF44 + hi def CoqtailSent guifg=#777777 +endfunction + +""" end plugin section set go=a -" Enable mouse for all modes + +" enable mouse for all modes set mouse=a set clipboard+=unnamedplus -" Enable command completion + +" enable command completion set wildmode=longest,list,full -" Setting Tab-length + +" setting Tab-length set expandtab set softtabstop=4 set shiftwidth=4 -" Splits open at the bottom and right, which is non-retarded, unlike vim defaults. + +" splits open at the bottom and right, which is non-retarded, unlike vim defaults. set splitbelow splitright -" Disable case sensitive matching + +" disable case sensitive matching set ignorecase -" Enable nocompatible mode + +" enable nocompatible mode set nocompatible -" Enable Plugins + +" enable Plugins filetype plugin on -" Enable syntax highlighting + +" enable syntax highlighting syntax on -" Enable true colors + +" enable true colors set termguicolors -" Set utf-8 encoding + +" set utf-8 encoding set encoding=utf-8 -" Show relative numbers on left side + +" show relative numbers on left side set number relativenumber -" Speedup vim with long lines + +" speedup vim with long lines set ttyfast set lazyredraw +" textEdit might fail without hidden +set hidden + +" disable Backupfiles for Lsp +set nobackup +set nowritebackup + +" dont pass messages to ins-completion-menu +set shortmess+=c + +" always show the signcolumn, otherwise it would shift the text each time +" diagnostics appear/become resolved. +if has("patch-8.1.1564") + " Recently vim can merge signcolumn and number column into one + set signcolumn=number +else + set signcolumn=yes +endif + " enable persistent undo if has('persistent_undo') set undofile set undodir=$XDG_CACHE_HOME/vim/undo endif -" Delete trailing whitespaces on save +" unmap unwanted commands +nnoremap +nnoremap +nnoremap +nnoremap +nnoremap + +inoremap +inoremap +inoremap +inoremap +inoremap +inoremap +inoremap +inoremap +inoremap +inoremap +inoremap + +" mapping Dictionaries +nnoremap :setlocal spell! spelllang=de_de +nnoremap :setlocal spell! spelllang=en_us + +" compiler for languages +nnoremap c :w! \| !compiler % + +" open corresponding file (pdf/html/...) +nnoremap p :!opout % + +" shortcut for split navigation +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +" save file as sudo on files that require root permission +cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! + +" alias for replacing +nnoremap ss :%s//gI + +" delete trailing whitespaces on save fun! TrimWhitespace() let l:save = winsaveview() keeppatterns %s/\s\+$//e call winrestview(l:save) endfun autocmd BufWritePre * :call TrimWhitespace() -" Disables automatic commenting on newline: -autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o -" Clean LaTex build files -autocmd VimLeave *.tex !texclear % -" Read files correctly + +" read files correctly autocmd BufRead,BufNewFile *.tex set filetype=tex +autocmd BufRead,BufNewFile *.html set filetype=html autocmd BufRead,BufNewFile *.h set filetype=c -" Mapping Dictionaries -map :setlocal spell! spelllang=de_de -map :set spelllang=en_us -" Compiler for languages -map c :w! \| !compiler % -" Open corresponding file (pdf/html/...) -map p :!opout % -" Shortcut for split navigation -map h -map j -map k -map l -" Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed): -map "+P -vnoremap "+y -" Save file as sudo on files that require root permission -cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' edit! -" Alias for replacing -nnoremap S :%s//gI - -" Start Formatting section - -autocmd FileType java,python,c,tex,latex noremap gggqG - -au FileType python setlocal formatprg=autopep8\ - - -au FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google +" formatting options autocmd FileType java setlocal shiftwidth=2 softtabstop=2 -au FileType c setlocal formatprg=astyle\ --mode=c +" formatting programs +autocmd FileType c setlocal formatprg=astyle\ --mode=c\ --style=ansi +autocmd FileType c noremap gggqG +autocmd FileType html noremap :silent %!tidy -q -i --show-errors 0 +autocmd FileType java setlocal formatprg=astyle\ --indent=spaces=2\ --style=google +autocmd FileType java noremap gggqG +autocmd FileType markdown noremap :silent %!prettier --stdin-filepath % +autocmd FileType python setlocal formatprg=autopep8\ - +autocmd FileType python noremap gggqG +autocmd FileType tex,latex setlocal formatprg=latexindent\ - +autocmd FileType tex,latex noremap gggqG -au FileType tex,latex setlocal formatprg=latexindent\ - +" cleanup certain files after leaving the editor +autocmd VimLeave *.tex !texclear % +autocmd VimLeave *.c !cclear -" End Formatting section +" highlighting break line +autocmd BufEnter,FileType c set colorcolumn=80 +autocmd BufEnter,FileType java set colorcolumn=100 +autocmd BufEnter,FileType markdown set colorcolumn=80 +autocmd BufEnter,FileType python set colorcolumn=80 +" colorscheme +set background=dark +colorscheme codedark +highlight colorcolumn guibg=#772222 diff --git a/.config/nvim/ycm_extra_conf.py b/.config/nvim/ycm_extra_conf.py deleted file mode 100644 index 8d98a5d..0000000 --- a/.config/nvim/ycm_extra_conf.py +++ /dev/null @@ -1,220 +0,0 @@ -# This file is NOT licensed under the GPLv3, which is the license for the rest -# of YouCompleteMe. -# -# Here's the license text for this file: -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# For more information, please refer to - -from distutils.sysconfig import get_python_inc -import os -import platform -import os.path as p -import subprocess - -DIR_OF_THIS_SCRIPT = p.abspath( p.dirname( __file__ ) ) -DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, 'third_party' ) -SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ] - -database = None - -# These are the compilation flags that will be used in case there's no -# compilation database set (by default, one is not set). -# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. -flags = [ -'-Wall', -'-Wextra', -'-Werror', -'-Wno-long-long', -'-Wno-variadic-macros', -'-fexceptions', -'-DNDEBUG', -# You 100% do NOT need -DUSE_CLANG_COMPLETER and/or -DYCM_EXPORT in your flags; -# only the YCM source code needs it. -'-DUSE_CLANG_COMPLETER', -'-DYCM_EXPORT=', -# THIS IS IMPORTANT! Without the '-x' flag, Clang won't know which language to -# use when compiling headers. So it will guess. Badly. So C++ headers will be -# compiled as C headers. You don't want that so ALWAYS specify the '-x' flag. -# For a C project, you would set this to 'c' instead of 'c++'. -'-x', -'c++', -'-isystem', -'cpp/pybind11', -'-isystem', -'cpp/whereami', -'-isystem', -'cpp/BoostParts', -'-isystem', -get_python_inc(), -'-isystem', -'cpp/llvm/include', -'-isystem', -'cpp/llvm/tools/clang/include', -'-I', -'cpp/ycm', -'-I', -'cpp/ycm/ClangCompleter', -'-isystem', -'cpp/ycm/tests/gmock/gtest', -'-isystem', -'cpp/ycm/tests/gmock/gtest/include', -'-isystem', -'cpp/ycm/tests/gmock', -'-isystem', -'cpp/ycm/tests/gmock/include', -'-isystem', -'cpp/ycm/benchmarks/benchmark/include', -] - -# Clang automatically sets the '-std=' flag to 'c++14' for MSVC 2015 or later, -# which is required for compiling the standard library, and to 'c++11' for older -# versions. -if platform.system() != 'Windows': - flags.append( '-std=c++11' ) - - -# Set this to the absolute path to the folder (NOT the file!) containing the -# compile_commands.json file to use that instead of 'flags'. See here for -# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html -# -# You can get CMake to generate this file for you by adding: -# set( CMAKE_EXPORT_COMPILE_COMMANDS 1 ) -# to your CMakeLists.txt file. -# -# Most projects will NOT need to set this to anything; you can just change the -# 'flags' list of compilation flags. Notice that YCM itself uses that approach. -compilation_database_folder = '' - - -def IsHeaderFile( filename ): - extension = p.splitext( filename )[ 1 ] - return extension in [ '.h', '.hxx', '.hpp', '.hh' ] - - -def FindCorrespondingSourceFile( filename ): - if IsHeaderFile( filename ): - basename = p.splitext( filename )[ 0 ] - for extension in SOURCE_EXTENSIONS: - replacement_file = basename + extension - if p.exists( replacement_file ): - return replacement_file - return filename - - -def PathToPythonUsedDuringBuild(): - try: - filepath = p.join( DIR_OF_THIS_SCRIPT, 'PYTHON_USED_DURING_BUILDING' ) - with open( filepath ) as f: - return f.read().strip() - except OSError: - return None - - -def Settings( **kwargs ): - # Do NOT import ycm_core at module scope. - import ycm_core - - global database - if database is None and p.exists( compilation_database_folder ): - database = ycm_core.CompilationDatabase( compilation_database_folder ) - - language = kwargs[ 'language' ] - - if language == 'cfamily': - # If the file is a header, try to find the corresponding source file and - # retrieve its flags from the compilation database if using one. This is - # necessary since compilation databases don't have entries for header files. - # In addition, use this source file as the translation unit. This makes it - # possible to jump from a declaration in the header file to its definition - # in the corresponding source file. - filename = FindCorrespondingSourceFile( kwargs[ 'filename' ] ) - - if not database: - return { - 'flags': flags, - 'include_paths_relative_to_dir': DIR_OF_THIS_SCRIPT, - 'override_filename': filename - } - - compilation_info = database.GetCompilationInfoForFile( filename ) - if not compilation_info.compiler_flags_: - return {} - - # Bear in mind that compilation_info.compiler_flags_ does NOT return a - # python list, but a "list-like" StringVec object. - final_flags = list( compilation_info.compiler_flags_ ) - - # NOTE: This is just for YouCompleteMe; it's highly likely that your project - # does NOT need to remove the stdlib flag. DO NOT USE THIS IN YOUR - # ycm_extra_conf IF YOU'RE NOT 100% SURE YOU NEED IT. - try: - final_flags.remove( '-stdlib=libc++' ) - except ValueError: - pass - - return { - 'flags': final_flags, - 'include_paths_relative_to_dir': compilation_info.compiler_working_dir_, - 'override_filename': filename - } - - if language == 'python': - return { - 'interpreter_path': PathToPythonUsedDuringBuild() - } - - return {} - - -def PythonSysPath( **kwargs ): - sys_path = kwargs[ 'sys_path' ] - - interpreter_path = kwargs[ 'interpreter_path' ] - major_version = subprocess.check_output( [ - interpreter_path, '-c', 'import sys; print( sys.version_info[ 0 ] )' ] - ).rstrip().decode( 'utf8' ) - - sys_path[ 0:0 ] = [ p.join( DIR_OF_THIS_SCRIPT ), - p.join( DIR_OF_THIRD_PARTY, 'bottle' ), - p.join( DIR_OF_THIRD_PARTY, 'cregex', - 'regex_{}'.format( major_version ) ), - p.join( DIR_OF_THIRD_PARTY, 'frozendict' ), - p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'jedi' ), - p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'parso' ), - p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'requests' ), - p.join( DIR_OF_THIRD_PARTY, 'requests_deps', - 'urllib3', - 'src' ), - p.join( DIR_OF_THIRD_PARTY, 'requests_deps', - 'chardet' ), - p.join( DIR_OF_THIRD_PARTY, 'requests_deps', - 'certifi' ), - p.join( DIR_OF_THIRD_PARTY, 'requests_deps', - 'idna' ), - p.join( DIR_OF_THIRD_PARTY, 'waitress' ) ] - - sys_path.append( p.join( DIR_OF_THIRD_PARTY, 'jedi_deps', 'numpydoc' ) ) - return sys_path diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index b06de77..595ec78 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -46,8 +46,8 @@ function +vi-git-stash() { fi } zstyle ':vcs_info:git*+set-message:*' hooks git-st git-stash -PS1='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}\$%b ' -RPROMPT='%B%{$fg[magenta]%}$vcs_info_msg_0_%{$reset_color%}%b' +PS1='%B%{$fg[blue]%}[%{$fg[blue]%}%n%{$fg[blue]%}@%{$fg[blue]%}%M %{$fg[blue]%}%~%{$fg[blue]%}]%{$reset_color%}\$%b ' +RPROMPT='%B%{$fg[blue]%}$vcs_info_msg_0_%{$reset_color%}%b' # History in cache directory HISTSIZE=10000 diff --git a/.local/bin/etc/textemp b/.local/bin/etc/textemp index 5f79e70..be78dbd 100755 --- a/.local/bin/etc/textemp +++ b/.local/bin/etc/textemp @@ -1,7 +1,7 @@ #!/bin/bash # copying tex templates -latexdir=~/gitrepos/main/latextemplates/ +latexdir=~/code/main/latextemplates/ [ -z "$2" ] && echo "missing argument: filename (no ending)" && return 1 diff --git a/.local/bin/tools/dwm/togglemonitor b/.local/bin/tools/dwm/togglemonitor index 7ccc1e0..c894b0d 100755 --- a/.local/bin/tools/dwm/togglemonitor +++ b/.local/bin/tools/dwm/togglemonitor @@ -3,8 +3,8 @@ # toggle external monitor # by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice -intern=LVDS-1 -extern=HDMI-2 +intern=LVDS1 +extern=HDMI2 (xrandr | grep "$extern disconnected") (xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && setbg) & exit) (xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off diff --git a/.local/bin/tools/nvim/cclear b/.local/bin/tools/nvim/cclear new file mode 100755 index 0000000..49b515d --- /dev/null +++ b/.local/bin/tools/nvim/cclear @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -d .ccls-cache ] +then + rm -r '.ccls-cache' +fi diff --git a/.local/bin/tools/nvim/compiler b/.local/bin/tools/nvim/compiler index 087c4fa..ce47e88 100755 --- a/.local/bin/tools/nvim/compiler +++ b/.local/bin/tools/nvim/compiler @@ -28,9 +28,10 @@ case "$file" in *\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;; *\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;; *\.tex) textype "$file" ;; + *\.m) octave -qW "$file" ;; *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; *config.h) sudo make install ;; - *\.c) cc "$file" -o "$base" && "$base" ;; + *\.c) if [ -f Makefile ]; then make run; else cc "$file" -o "$base" && "$base"; fi ;; *\.py) python "$file" ;; *\.go) go run "$file" ;; *\.sent) setsid sent "$file" 2>/dev/null & ;; diff --git a/.local/bin/tools/nvim/texclear b/.local/bin/tools/nvim/texclear index e7a0516..771add6 100755 --- a/.local/bin/tools/nvim/texclear +++ b/.local/bin/tools/nvim/texclear @@ -9,6 +9,7 @@ case "$1" in file=$(readlink -f "$1") dir=$(dirname "$file") base="${file%.*}" + if [ -f "$dir/indent.log" ]; then rm "$dir/indent.log"; fi find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete ;; *) printf "Give .tex file as argument.\\n" ;; esac diff --git a/.profile b/.profile index 46b13d9..c811966 100644 --- a/.profile +++ b/.profile @@ -2,7 +2,7 @@ # Profile file. Runs on login. # Adds `~/.local/bin` and all subdirectories to $PATH -export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" +export PATH="$PATH:$(du "${HOME}/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" export BROWSER="icecat" export RTV_BROWSER="qutebrowser" @@ -13,30 +13,30 @@ export READER="zathura" export STATUSBAR="dwmblocks" export TERMINAL="st" export QT_QPA_PLATFORMTHEME="qt5ct" -export WINEPREFIX="$HOME/.wine" +export WINEPREFIX="${HOME}/.wine" export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" -export XDG_CACHE_HOME="$HOME/.cache" -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="${HOME}/.cache" +export XDG_CONFIG_HOME="${HOME}/.config" +export XDG_DATA_HOME="${HOME}/.local/share" -export ANDROID_SDK_HOME="$XDG_CONFIG_HOME/android" -export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" -export GRADLE_USER_HOME="$XDG_CONFIG_HOME/gradle" -export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" -export HISTFILE="$XDG_CACHE_HOME/shhistory" -export INPUTRC="$XDG_CONFIG_HOME/inputrc" -export LESSKEY="$XDG_CONFIG_HOME/less/lesskey" +export ANDROID_SDK_HOME="${XDG_CONFIG_HOME}/android" +export GNUPGHOME="${XDG_CONFIG_HOME}/gnupg" +export GRADLE_USER_HOME="${XDG_CONFIG_HOME}/gradle" +export GTK2_RC_FILES="${XDG_CONFIG_HOME}/gtk-2.0/gtkrc-2.0" +export HISTFILE="${XDG_CACHE_HOME}/shhistory" +export INPUTRC="${XDG_CONFIG_HOME}/inputrc" +export LESSKEY="${XDG_CONFIG_HOME}/less/lesskey" export LESSHISTFILE="-" export ncmpcpp_directory="-" -export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config" -export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" -export NUGET_PACKAGES="$XDG_CACHE_HOME/nugetpackages" -export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" -export SUDO_ASKPASS="$HOME/.local/bin/tools/dmenupass" -export TMUX_TMPDIR="$XDG_CACHE_HOME/tmux" -export WGETRC="$XDG_CONFIG_HOME/wgetrc" -export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export NOTMUCH_CONFIG="${XDG_CONFIG_HOME}/notmuch-config" +export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc" +export NUGET_PACKAGES="${XDG_CACHE_HOME}/nugetpackages" +export PASSWORD_STORE_DIR="${XDG_DATA_HOME}/pass" +export SUDO_ASKPASS="${HOME}/.local/bin/tools/dmenupass" +export TMUX_TMPDIR="${XDG_CACHE_HOME}/tmux" +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" export _JAVA_AWT_WM_NONREPARENTING=1 # less/man colors @@ -49,8 +49,8 @@ export LESS_TERMCAP_se="$(printf '%b' '')"; a="${a%_}" export LESS_TERMCAP_us="$(printf '%b' '')"; a="${a%_}" export LESS_TERMCAP_ue="$(printf '%b' '')"; a="${a%_}" -echo "$0" | grep "bash$" >/dev/null && [ -f ~/.bashrc ] && source "$HOME/.bashrc" -echo "$0" | grep "zsh$" >/dev/null && [ -f $ZDOTDIR/.zshrc ] && source "$ZDOTDIR/.zshrc" +echo "$0" | grep "bash$" >/dev/null && [ -f ~/.bashrc ] && source "${HOME}/.bashrc" +echo "$0" | grep "zsh$" >/dev/null && [ -f ${ZDOTDIR}/.zshrc ] && source "${ZDOTDIR}/.zshrc" # Start graphical server if not already running. [ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx diff --git a/README.md b/README.md index 3cc80ed..3451543 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # .dotfiles -My Arch Linux dotfiles. +My arch compatible user dotfiles. They were originally based on the dotfiles of [lukesmithxyz](https://github.com/lukesmithxyz/voidrice). This being some time, hundreds of commits and my personalized version of [larbs](https://github.com/TiynGER/larbs) ago, they are now quite different. @@ -17,7 +17,7 @@ To take a look at all the software it installs look at the [progs.csv](https://g ### clone this repository -`git clone --bare https://github.com/TiynGER/.dotfiles $HOME/.dotfiles` +`git clone --bare https://github.com/Tiyn/dotfiles $HOME/.dotfiles` ### checkout changes