From f4b2d0ef8c07f0ea3f0d4e412a925a525cda8e48 Mon Sep 17 00:00:00 2001 From: piccihud Date: Fri, 8 Sep 2023 23:57:01 +0200 Subject: [PATCH] update dotfiles --- linux/alacritty/alacritty.yml | 2 +- linux/bash/bashrc | 35 +-- linux/bash/inputrc | 24 --- linux/neofetch/config.conf | 2 +- .../__init__.cpython-311.opt-1.pyc | Bin 161 -> 159 bytes .../__pycache__/dracula.cpython-311.opt-1.pyc | Bin 6875 -> 6873 bytes linux/ranger/rc.conf | 2 +- linux/ranger/rifle.conf | 7 +- linux/script/crontab | 16 +- linux/vim/vimrc | 203 ++---------------- 10 files changed, 35 insertions(+), 256 deletions(-) diff --git a/linux/alacritty/alacritty.yml b/linux/alacritty/alacritty.yml index 4c85cc0..d7a8e45 100644 --- a/linux/alacritty/alacritty.yml +++ b/linux/alacritty/alacritty.yml @@ -1,5 +1,5 @@ import: - - /home/davide/git/alacritty-master/dracula.yml + - ~/git/alacritty-master/dracula.yml window: opacity: 0.97 # Window position (changes require restart) diff --git a/linux/bash/bashrc b/linux/bash/bashrc index 7c29ef7..9c56e4b 100644 --- a/linux/bash/bashrc +++ b/linux/bash/bashrc @@ -1,4 +1,4 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. +# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples @@ -120,11 +120,10 @@ fi bind 'set show-all-if-ambiguous on' bind 'TAB:menu-complete' -export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin:$HOME/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$HOME/.local/share/flatpak/exports/share" +export PATH="$PATH:HOME/.local/bin:$HOME/bin:$HOME/.local/share/flatpak/exports/share:$HOME/.local/pipx/venvs:$HOME/.cargo/bin" # alias -alias hh="hstr" alias update="sudo nala update ; sudo nala upgrade -y ; sudo nala autoremove -y ; flatpak upgrade -y ; flatpak uninstall --unused -y" alias ll='exa -lh --icons' alias install="sudo nala install -y" @@ -140,12 +139,7 @@ alias push="git push -u origin master" alias pull="git pull" alias gs="git status" alias gm="git commit -m" -# alias rr="rnr 2> /dev/null" alias rr="source ranger 2> /dev/null" -alias dg="ddgr --colorize always --reg it-it" -alias cat="batcat" -alias ..="cd .." -alias ....="cd ../.." alias ipc="ip --color a" alias ss="scrcpy -S" alias weather="curl https://wttr.in/Sacile" @@ -153,12 +147,6 @@ alias nn="ncdu --color dark" alias pd="pandoc -f markdown -t pdf --pdf-engine=xelatex -V lang=it -V colorlinks=true -V linkcolor=teal -V urlcolor=teal -V toccolor=gray --template eisvogel --listings -V table-use-row-colors=true" alias fh="feh" alias fhm="feh -m" -alias dns="dig go.dnscheck.tools | grep -i server | sed -e 's/#.*$//' -e 's/;;//' -e 's/SERVER/DNS/'" - -# RNR - -source ~/.local/share/rnr/rnr.sh -stty -ixon # PS1 @@ -177,23 +165,10 @@ parse_git_branch() { export PS1="$GREEN[\A \d]$CYAN\u$BLUE@\h $DEFAULT(\!):$YELLOW\w $PURPLE\n\$(parse_git_branch)$DEFAULT > " -# HSTR configuration - add this to ~/.bashrc - -export HSTR_CONFIG=monochromatic # get more colors -shopt -s histappend # append new history items to .bash_history -export HISTCONTROL=ignorespace # leading space hides commands from history -export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500) -# ensure synchronization between bash memory and history file -export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" -# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc) -if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi -# if this is interactive shell, then bind 'kill last command' to Ctrl-x k -if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fi - # Editor export EDITOR='vim' export VISUAL='vim' - -#set -o vi -#set show-mode-in-prompt on +LANG="it_IT.UTF-8" +export LANG +. "$HOME/.cargo/env" diff --git a/linux/bash/inputrc b/linux/bash/inputrc index cbe1681..53de1a1 100644 --- a/linux/bash/inputrc +++ b/linux/bash/inputrc @@ -1,26 +1,2 @@ "\e[5~": history-search-backward "\e[6~": history-search-forward - -#set editing-mode vi -#set show-mode-in-prompt on - -# SET THE MODE STRING AND CURSOR TO INDICATE THE VIM MODE -# FOR THE NUMBER AFTER `\e[`: -# 0: blinking block -# 1: blinking block (default) -# 2: steady block -# 3: blinking underline -# 4: steady underline -# 5: blinking bar (xterm) -# 6: steady bar (xterm) -#set vi-ins-mode-string (ins)\1\e[5 q\2 -#set vi-cmd-mode-string (cmd)\1\e[1 q\2 -# -#$if mode=vi - #set keymap vi-command - #"k": history-substring-search-backward - #"j": history-substring-search-forward -# - #set keymap vi-insert - #"\C-l": clear-screen -#$endif diff --git a/linux/neofetch/config.conf b/linux/neofetch/config.conf index 5ca4906..2ee5115 100644 --- a/linux/neofetch/config.conf +++ b/linux/neofetch/config.conf @@ -760,7 +760,7 @@ image_source="auto" # Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, # postmarketOS, and Void have a smaller logo variant. # Use '{distro name}_small' to use the small variants. -ascii_distro="Devuan" +ascii_distro="" # Ascii Colors # diff --git a/linux/ranger/colorschemes/__pycache__/__init__.cpython-311.opt-1.pyc b/linux/ranger/colorschemes/__pycache__/__init__.cpython-311.opt-1.pyc index 4ad6bf785e74066c68f16678a1f8944ec0365d59..e91ff851661ec56638da0c942b3a262f6ca6e902 100644 GIT binary patch delta 34 ocmZ3;IG>SwIWI340}!07`ZAH*l-o!@BR@A)KP53Gf1+;)0H6s9F8}}l delta 36 qcmbQwxR8;1IWI340}$LlmoSmrl-EQ*BR@A)KP9m&GbMGRcL)HpEehNK diff --git a/linux/ranger/colorschemes/__pycache__/dracula.cpython-311.opt-1.pyc b/linux/ranger/colorschemes/__pycache__/dracula.cpython-311.opt-1.pyc index ba2c310fa623a4bbfb5002a83e8e15d2d8d6bc48..fcb4626ea7b75fb5ed8302632b51dd3e4aa53fd3 100644 GIT binary patch delta 37 rcmca@defA9IWI340}!07`m&LG6&tsqenx(7s(wmhO8(|UY?2}X<&_K@ delta 39 tcmca ~/Nextcloud/Database/db.sql -#0 9,20 * * * nice -n 19 clamscan -ir $HOME --log=clamavlog.txt --move=$HOME/quarantine/ 2>&1 -0 22 * * * /usr/bin/rsync -az --delete --exclude=Nextcloud --exclude='VirtualBox VMs' ~/ /media/davide/Backup/Desktop/ && date >> ~/backup.log -0 9,15,20 * * * rsync -az ~/.bashrc ~/Documenti/repos/mywiki/linux/bash/bashrc -0 9,15,20 * * * rsync -az ~/.inputrc ~/Documenti/repos/mywiki/linux/bash/inputrc -0 9,15,20 * * * rsync -az ~/.config/alacritty/alacritty.yml ~/Documenti/repos/mywiki/linux/alacritty/alacritty.yml -0 9,15,20 * * * rsync -az ~/.config/feh/ ~/Documenti/repos/mywiki/linux/feh/ -0 9,15,20 * * * rsync -az ~/.config/neofetch/ ~/Documenti/repos/mywiki/linux/neofetch/ -0 9,15,20 * * * rsync -az ~/.config/ranger/ ~/Documenti/repos/mywiki/linux/ranger/ -0 9,15,20 * * * rsync -az ~/.config/rnr/ ~/Documenti/repos/mywiki/linux/rnr/ -0 9,15,20 * * * rsync -az ~/.vimrc ~/Documenti/repos/mywiki/linux/vim/vimrc -0 9,15,20 * * * rsync -az ~/.xbindkeysrc /home/davide/Documenti/repos/mywiki/linux/xbindkeys/xbindkeysrc -0 9,15,20 * * * rsync -az ~/.tmux.conf /home/davide/Documenti/repos/mywiki/linux/tmux/tmux.conf -0 9,15,22 * * * rsync -az ~/Sync/Task/🎲ToDo.org ~/Nextcloud/Notes/ -0 9,15,20 * * * crontab -l > ~/Documenti/repos/mywiki/linux/script/crontab +0 9,15,20,22 * * * ~/scripts/rsync.sh diff --git a/linux/vim/vimrc b/linux/vim/vimrc index c331d49..cb828d4 100755 --- a/linux/vim/vimrc +++ b/linux/vim/vimrc @@ -4,18 +4,18 @@ packadd! dracula colorscheme dracula set completeopt=longest,menuone setlocal complete+=k -set dictionary+=/home/davide/.vim/dict/dict_it.txt +set dictionary+=/home/dado/.vim/dict/dict_it.txt set wrap set linebreak set expandtab autocmd vimenter * hi Normal guibg=NONE ctermbg=NONE set spell spelllang=it,en -syntax on " Enable type file detection. Vim will be able to try to detect the type of file in use. -filetype off " Enable plugins and load plugin for the detected file type. -set nocompatible " be iMproved, required -filetype plugin indent on " required +syntax on " Enable type file detection. Vim will be able to try to detect the type of file in use. +filetype on " Enable plugins and load plugin for the detected file type. +set nocompatible " be iMproved, required +filetype plugin indent on set omnifunc=syntaxcomplete " Enable Omnicomplete features -filetype plugin on " Load an indent file for the detected file type. +filetype plugin on " Load an indent file for the detected file type. filetype indent on set foldenable set autoindent " Automatically guesses the indentation given the previous one @@ -30,27 +30,23 @@ set undodir=~/.vim/undo/ set nofixeol " Do not insert a new line at the end of the file automatically set backspace=indent,eol,start " Enable backspace key to delete stuffs properly set termguicolors -set number " Add numbers to each line on the left-hand side. set relativenumber set clipboard=unnamedplus -set cursorline " Highlight cursor line underneath the cursor horizontally. -set nobackup " Do not save backup files. -set incsearch " While searching though a file incrementally highlight matching characters as you type. -set ignorecase " Ignore capital letters during search. -set smartcase " This will allow you to search specifically for capital letters. -set showmode " Show the mode you are on the last line. -set showmatch " Show matching words during a search. -set wildmenu " Enable auto completion menu after pressing TAB. -set wildmode=list:longest " Make wildmenu behave like similar to Bash completion. +set cursorline " Highlight cursor line underneath the cursor horizontally. +set nobackup " Do not save backup files. +set incsearch " While searching though a file incrementally highlight matching characters as you type. +set ignorecase " Ignore capital letters during search. +set smartcase " This will allow you to search specifically for capital letters. +set showmode " Show the mode you are on the last line. +set showmatch " Show matching words during a search. +set wildmenu " Enable auto completion menu after pressing TAB. +set wildmode=list:longest " Make wildmenu behave like similar to Bash completion. set foldenable set foldmethod=indent -set ttyfast " Speed up scrolling in Vim +set ttyfast " Speed up scrolling in Vim set encoding=UTF-8 -"set nowritebackup set updatetime=300 set signcolumn=yes -set smarttab "la tabulazione viene eseguita in automatico in modo intelligente -set tabstop=8 "imposta il valore della tabulazione (solitamente viene cosigliato 4 o 8) " }}} @@ -66,11 +62,11 @@ Plugin 'VundleVim/Vundle.vim' " All of your Plugins must be added before the following line " -"Plugin 'lifepillar/vim-mucomplete' -Plugin 'neoclide/coc.nvim', {'branch': 'release'} +Plugin 'gabrielelana/vim-markdown' Plugin 'itchyny/vim-cursorword' Plugin 'preservim/nerdtree' Plugin 'iamcco/markdown-preview.nvim' +Plugin 'iamcco/mathjax-support-for-mkdp' Plugin 'alvan/vim-closetag' Plugin 'mattn/emmet-vim' Plugin 'jiangmiao/auto-pairs' @@ -83,6 +79,8 @@ Plugin 'mracos/mermaid.vim' Plugin 'mzlogin/vim-markdown-toc' Plugin 'bbrtj/vim-vorg-md' Plugin 'sheerun/vim-polyglot' +Plugin 'ervandew/supertab' +Plugin 'Valloric/YouCompleteMe' call vundle#end() " required @@ -116,10 +114,8 @@ augroup END " PREDICTIVE ------------------------------------------------------------- {{{ " -" https://www.reddit.com/r/vim/comments/12qezjf/english_dictionary_autocompletion/?rdt=55684 -"let g:mucomplete#enable_auto_at_startup = v:true -"let g:mucomplete#chains = #{default: ['dict']} -"set dictionary=/home/davide/.vim/dict/dict_it.txt +let g:predictive#dict_path = expand($HOME . '/dict') +let g:predictive#disable_plugin = 0 " " }}} @@ -382,158 +378,3 @@ let g:lightline = { \ } " }}} - - -" COC-NEOCLIDE ---------------------------------------------------------- {{{ -" https://github.com/neoclide/coc.nvim -" https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions - - -" Use tab for trigger completion with characters ahead and navigate -" NOTE: There's always complete item selected by default, you may want to enable -" no select by `"suggest.noselect": true` in your configuration file -" NOTE: Use command ':verbose imap ' to make sure tab is not mapped by -" other plugin before putting this into your config -inoremap - \ coc#pum#visible() ? coc#pum#next(1) : - \ CheckBackspace() ? "\" : - \ coc#refresh() -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - -" Make to accept selected completion item or notify coc.nvim to format -" u breaks current undo, please make your own choice -inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" - -function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion -if has('nvim') - inoremap coc#refresh() -else - inoremap coc#refresh() -endif - -" Use `[g` and `]g` to navigate diagnostics -" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - -" GoTo code navigation -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window -nnoremap K :call ShowDocumentation() - -function! ShowDocumentation() - if CocAction('hasProvider', 'hover') - call CocActionAsync('doHover') - else - call feedkeys('K', 'in') - endif -endfunction - -" Highlight the symbol and its references when holding the cursor -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Symbol renaming -nmap rn (coc-rename) - -" Formatting selected code -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s) - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Applying code actions to the selected code block -" Example: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap keys for applying code actions at the cursor position -nmap ac (coc-codeaction-cursor) -" Remap keys for apply code actions affect whole buffer -nmap as (coc-codeaction-source) -" Apply the most preferred quickfix action to fix diagnostic on the current line -nmap qf (coc-fix-current) - -" Remap keys for applying refactor code actions -nmap re (coc-codeaction-refactor) -xmap r (coc-codeaction-refactor-selected) -nmap r (coc-codeaction-refactor-selected) - -" Run the Code Lens action on the current line -nmap cl (coc-codelens-action) - -" Map function and class text objects -" NOTE: Requires 'textDocument.documentSymbol' support from the language server -xmap if (coc-funcobj-i) -omap if (coc-funcobj-i) -xmap af (coc-funcobj-a) -omap af (coc-funcobj-a) -xmap ic (coc-classobj-i) -omap ic (coc-classobj-i) -xmap ac (coc-classobj-a) -omap ac (coc-classobj-a) - -" Remap and to scroll float windows/popups -if has('nvim-0.4.0') || has('patch-8.2.0750') - nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" -endif - -" Use CTRL-S for selections ranges -" Requires 'textDocument/selectionRange' support of language server -nmap (coc-range-select) -xmap (coc-range-select) - -" Add `:Format` command to format current buffer -command! -nargs=0 Format :call CocActionAsync('format') - -" Add `:Fold` command to fold current buffer -command! -nargs=? Fold :call CocAction('fold', ) - -" Add `:OR` command for organize imports of the current buffer -command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') - -" Add (Neo)Vim's native statusline support -" NOTE: Please see `:h coc-status` for integrations with external plugins that -" provide custom statusline: lightline.vim, vim-airline -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} - -" Mappings for CoCList -" Show all diagnostics -nnoremap a :CocList diagnostics -" Manage extensions -nnoremap e :CocList extensions -" Show commands -nnoremap c :CocList commands -" Find symbol of current document -nnoremap o :CocList outline -" Search workspace symbols -nnoremap s :CocList -I symbols -" Do default action for next item -nnoremap j :CocNext -" Do default action for previous item -nnoremap k :CocPrev -" Resume latest coc list -nnoremap p :CocListResume - -" }}} -