Baltazár Radics 2 years ago
parent
commit
c67719a240
Signed by: baltazar GPG Key ID: 9440F591E4397C3E
  1. 20
      .config/cmus/rc
  2. 9
      .config/coc/extensions/package.json
  3. 226
      .config/nvim/init.vim
  4. 2
      .config/termite/config
  5. 79
      .config/yay/config.json
  6. 18
      .config/zsh/.zshrc
  7. 3
      .gitignore
  8. 1
      .ssh/config
  9. 2
      .tmux.conf
  10. 3
      .zprofile

20
.config/cmus/rc

@ -3,9 +3,9 @@ set altformat_playlist= %-21%A %F %= %d %{?X!=0?%3X? }
set altformat_title=%f
set altformat_trackwin= %F %= %d
set auto_reshuffle=true
set format_current= %a - %l %{?n?%n.?-} %t %= %y
set format_playlist= %-21%A %{?n?%3n.? } %t %= %y %d %{?X!=0?%3X? }
set format_playlist_va= %-21%A %{?n?%3n.? } %t (%a) %= %y %d %{?X!=0?%3X? }
set format_current= %{?a?%a?Unknown Artist} - %{?l?%l - ?}%{?n?%n. ?}%t%= %y
set format_playlist= %-21%A %{?n?%3n.? } %t%= %y %d %{?X!=0?%3X? }
set format_playlist_va= %-21%A %{?n?%3n.? } %t (%a)%= %y %d %{?X!=0?%3X? }
set format_statusline= %{status} %{?show_playback_position?%{position} %{?duration?/ %{duration} }?%{?duration?%{duration} }}- %{total} %{?volume>=0?vol: %{?lvolume!=rvolume?%{lvolume},%{rvolume} ?%{volume} }}%{?stream?buf: %{buffer} }%{?show_current_bitrate & bitrate>=0? %{bitrate} kbps }%=%{?repeat_current?repeat current?%{?play_library?%{playlist_mode} from %{?play_sorted?sorted }library?playlist}} | %{?continue="C"?C?c}%{?follow="F"?F?f}%{?repeat="R"?R?r}%{?shuffle="S"?S?s}
set format_title=%a - %l - %t (%y)
set format_trackwin= %{?n?%3n.? } %t %= %y %d
@ -16,18 +16,12 @@ set format_treewin_artist=%a
set lib_sort=albumartist date album discnumber tracknumber title filename play_count
set mouse=true
set mpris=true
set resume=true
set resume=false
set set_term_title=true
colorscheme green
set color_error=lightred
set color_info=lightgreen
set color_separator=green
set color_statusline_fg=gray
set color_titleline_fg=green
set color_trackwin_album_attr=bold
set color_win_cur=lightgreen
set color_win_cur_sel_fg=white
set color_win_inactive_cur_sel_fg=lightgreen
set color_win_sel_fg=green
set color_win_title_fg=green
set color_win_inactive_sel_fg=lightcyan
bind -f common d shell tmux detach-client -s cmus

9
.config/coc/extensions/package.json

@ -0,0 +1,9 @@
{
"dependencies": {
"coc-highlight": ">=1.2.5",
"coc-json": ">=1.2.4",
"coc-python": ">=1.2.6",
"coc-snippets": ">=2.1.14",
"coc-vimlsp": ">=0.4.3"
}
}

226
.config/nvim/init.vim

@ -12,6 +12,8 @@ set scrolloff=3
set showmatch
set title
set undofile
set updatetime=300
set keymap=magyar iminsert=0
command! DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
@ -21,18 +23,18 @@ if $TERM isnot# 'linux'
set termguicolors
endif
let g:netrw_banner=0
let g:netrw_banner = 0
let g:tex_comment_nospell = 1
let g:tex_fold_enabled = 1
let g:python_recommended_style=0
let g:python_recommended_style = 0
autocmd FileType tex setlocal spell
autocmd FileType python setlocal foldmethod=indent
autocmd BufWritePre /tmp/* setlocal noundofile
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
\ if line("'\"") > 1 && line("'\"") <= line('$') && &ft !~# 'commit'
\| exe 'normal! g`"'
\|endif
nmap <Leader>/ :noh<CR>
nmap Y y$
@ -51,139 +53,6 @@ nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l
function! MyPlugins()
call plug#begin(stdpath('data').'/plugged')
"Plug 'arakashic/chromatica.nvim', { 'do': ':silent UpdateRemotePlugins'}
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'Shougo/deoplete.nvim', { 'do': ':silent UpdateRemotePlugins'}
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'lervag/vimtex'
Plug 'lambdalisue/gina.vim'
Plug 'lambdalisue/suda.vim'
Plug 'mhinz/vim-signify'
Plug 'majutsushi/tagbar', { 'on_cmd' : 'TagbarToggle' }
Plug 'sakhnik/nvim-gdb', {
\ 'do': ':!./install.sh \| silent UpdateRemotePlugins',
\ }
Plug 'vim-scripts/DoxygenToolkit.vim'
Plug 'itchyny/screensaver.vim'
Plug 'crucerucalin/qml.vim'
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'junegunn/vim-easy-align'
call plug#end()
endfunction " MyPlugins
function MyPluginSettings() " -------------------------------------------------
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
let g:easy_align_delimiters = {
\ '/': {
\ 'pattern': '//\+\|/\*\|\*/',
\ 'delimiter_align': 'l',
\ 'ignore_groups': ['!Comment']
\ },
\ }
autocmd FileType markdown imap <Bar> <Bar><Esc>m`gaip*<Bar>``A
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
let g:cpp_class_scope_highlight = 1
let g:cpp_member_variable_highlight = 1
let g:cpp_class_decl_highlight = 1
"let g:cpp_experimental_simple_template_highlight = 1
let g:cpp_experimental_template_highlight = 1
let g:cpp_concepts_highlight = 1
function! LC_maps()
if has_key(g:LanguageClient_serverCommands, &filetype)
set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
nnoremap <buffer> <silent> ge :call LanguageClient#explainErrorAtPoint()<CR>
nnoremap <buffer> <silent> gh :call LanguageClient#textDocument_hover()<CR>
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> gr :call LanguageClient#textDocument_rename()<CR>
nnoremap <buffer> <silent> <leader>f :call LanguageClient_textDocument_formatting()<CR>
endif
endfunction
autocmd FileType * call LC_maps()
let g:LanguageClient_serverCommands = {
\ 'cpp': ['clangd'],
\ 'c': ['clangd'],
\ 'json': ['json-languageserver'],
\ 'html': ['html-languageserver'],
\ 'css': ['css-languageserver'],
\ }
let g:LanguageClient_diagnosticsDisplay = {
\ 1: {
\ 'name': 'Error',
\ 'texthl': 'ErrorText',
\ 'signText': '✖',
\ 'signTexthl': 'Error',
\ 'virtualTexthl': 'Error',
\ },
\ 2: {
\ 'name': 'Warning',
\ 'texthl': 'WarningText',
\ 'signText': '⚠',
\ 'signTexthl': 'Warning',
\ 'virtualTexthl': 'Warning',
\ },
\ 3: {
\ 'name': 'Information',
\ 'texthl': 'Normal',
\ 'signText': 'ℹ',
\ 'signTexthl': 'Info',
\ 'virtualTexthl': 'Info',
\ },
\ 4: {
\ 'name': 'Hint',
\ 'texthl': 'Normal',
\ 'signText': '➤',
\ 'signTexthl': 'Info',
\ 'virtualTexthl': 'Info',
\ },
\ }
let g:deoplete#enable_at_startup = 1
silent! call deoplete#custom#option('smart_case', v:true)
call deoplete#custom#source('LanguageClient',
\ 'min_pattern_length',
\ 2)
call deoplete#custom#var('omni',
\ 'input_patterns', {
\ 'tex': g:vimtex#re#deoplete
\ })
call deoplete#custom#option('sources', {
\ 'tex': ['omni'],
\ 'cpp': ['LanguageClient', 'buffer'],
\ })
"let g:chromatica#enable_at_startup = 1
"let g:chromatica#responsive_mode = 1
let g:vimtex_compiler_latexmk = {'build_dir': 'build'}
let g:vimtex_compiler_latexmk_engines = {'_': '-lualatex'}
let g:vimtex_view_general_viewer = 'llpp.inotify'
autocmd FileType tex inoremap <expr> <buffer> `` vimtex#imaps#wrap_math("``", '`')
let g:load_doxygen_syntax=1
command! W write suda://%
command! E edit suda://%
endfunction " MyPluginSettings ------------------------------------------------
highlight Error guibg=DarkRed ctermbg=1
highlight ErrorMsg guibg=DarkRed ctermbg=1
highlight ErrorText guisp=Red gui=undercurl
@ -198,29 +67,86 @@ highlight Visual guibg=#403d3d
highlight Warning guifg=Blue guibg=Yellow ctermfg=0 ctermbg=11
highlight WarningText guisp=Yellow gui=undercurl
let g:haveNode = executable('node')
let g:haveLaTeX = executable('latexmk')
function! s:MyPlugins()
call plug#begin(stdpath('data').'/plugged')
if g:haveNode
Plug 'neoclide/coc.nvim', {'branch': 'release'}
endif
if g:haveLaTeX
Plug 'lervag/vimtex'
endif
Plug 'junegunn/vim-easy-align'
Plug 'majutsushi/tagbar', { 'on_cmd' : 'TagbarToggle' }
call plug#end()
endfunction
function s:MyPluginSettings()
if g:haveNode
" coc:
nmap <silent> gd <Plug>(coc-definition)
"nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" coc-snippets:
let g:coc_snippet_next = '<c-j>'
let g:coc_snippet_prev = '<c-k>'
endif
if g:haveLaTeX
" vimtex:
let g:vimtex_compiler_latexmk = {'build_dir': 'build'}
let g:vimtex_compiler_latexmk_engines = {'_': '-lualatex'}
if executable('llpp.inotify')
let g:vimtex_view_general_viewer = 'llpp.inotify'
endif
autocmd FileType tex inoremap <expr> <buffer> `` vimtex#imaps#wrap_math("``", '`')
endif
" EasyAlign:
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
let g:easy_align_delimiters = {
\ '/': {
\ 'pattern': '//\+\|/\*\|\ \*',
\ 'delimiter_align': 'l',
\ 'ignore_groups': ['!Comment'],
\ },
\ '\': {
\ 'pattern': '\\',
\ 'indentation': 'keep',
\ 'left_margin': 1,
\ 'delimiter_align': 'center',
\ 'ignore_groups': ['String', 'Comment'],
\ },
\ }
autocmd FileType markdown imap <Bar> <Bar><Esc>m`gaip*<Bar>``A
endfunction
"Install Plug if not found
if empty(glob(stdpath('data').'/site/autoload/plug.vim'))
if $SUDO_USER == ''
function! InitPlugins(jobId, exitCode, eventType)
if a:exitCode != 0
echoerr 'Failed to download vim-plug.'
else
call MyPlugins() | PlugInstall --sync | call MyPluginSettings()
endif
endfunction
function! s:PlugInit(jobId, exitCode, eventType)
if a:exitCode != 0
echoerr 'Failed to download vim-plug.'
else
call <SID>MyPlugins() | PlugInstall --sync | CocPlugins | call <SID>MyPluginSettings()
endif
endfunction
function! s:PlugInstall()
let jobid = jobstart(['/usr/bin/curl', '--create-dirs',
\ '-fLo', stdpath('data').'/site/autoload/plug.vim',
\ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
\ ], {
\ 'on_exit': 'InitPlugins',
\ 'on_exit': '<SID>InitPlugins',
\ })
if jobid > 0
echomsg 'Downloading vim-plug...'
else
echoerr 'Curl not found.'
endif
endif
endfunction
command! PlugInstall call <SID>PlugInstall();
else
call MyPlugins()
call MyPluginSettings()
call <SID>MyPlugins()
call <SID>MyPluginSettings()
endif

2
.config/termite/config

@ -55,7 +55,7 @@ scrollback_lines = 10000
background = rgba(0, 0, 0, 0.8)
# If unset, will reverse foreground and background
highlight = #2f2f2f
highlight = #403d3d
# Colors from color0 to color254 can be set
#color0 = #3f3f3f

79
.config/yay/config.json

@ -1,40 +1,43 @@
{
"aururl": "https://aur.archlinux.org",
"buildDir": "$HOME/.cache/yay",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"tarbin": "bsdtar",
"redownload": "no",
"rebuild": "no",
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"gitflags": "",
"removemake": "ask",
"requestsplitn": 150,
"sortmode": 0,
"completionrefreshtime": 7,
"sudoloop": true,
"timeupdate": false,
"devel": false,
"cleanAfter": false,
"gitclone": true,
"provides": true,
"pgpfetch": true,
"upgrademenu": true,
"cleanmenu": true,
"diffmenu": false,
"editmenu": true,
"combinedupgrade": true,
"useask": false
"aururl": "https://aur.archlinux.org",
"buildDir": "$HOME/.cache/yay",
"absdir": "$HOME/.cache/yay/abs",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"tarbin": "bsdtar",
"redownload": "no",
"rebuild": "no",
"batchinstall": false,
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"searchby": "name-desc",
"gitflags": "",
"removemake": "true",
"requestsplitn": 150,
"sortmode": 0,
"completionrefreshtime": 7,
"sudoloop": true,
"timeupdate": false,
"devel": true,
"cleanAfter": false,
"gitclone": true,
"provides": true,
"pgpfetch": true,
"upgrademenu": true,
"cleanmenu": true,
"diffmenu": false,
"editmenu": true,
"combinedupgrade": true,
"useask": false
}

18
.config/zsh/.zshrc

@ -8,9 +8,7 @@ export MANPAGER="/usr/bin/nvim -c 'set ft=man nomod nolist' -"
export PACKAGER='Baltazár Radics <baltazar.radics@gmail.com>' # for makepkg
export PAGER='/usr/bin/less'
export PDFVIEWER='/usr/bin/okular'
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export ARDMK="$HOME/Arduino/Arduino.mk"
eval $(dircolors)
alias ccat='source-highlight-esc.sh'
@ -21,11 +19,11 @@ alias grep='grep --color=auto'
alias ls='ls -v --color=auto'
alias make="make -sj$(nproc)"
alias pacdiff="sudo DIFFPROG='/usr/bin/nvim -d' DIFFSEARCHPATH='/boot /etc /usr' pacdiff"
alias sudo='sudo --preserve-env=ZDOTDIR,EDITOR,XDG_CONFIG_HOME,XDG_DATA_HOME' # gonna cause troubles for sure
alias sudo='sudo --preserve-env=ZDOTDIR,EDITOR,XDG_CONFIG_HOME,XDG_DATA_HOME ' # gonna cause troubles for sure
alias tmus="tmux attach-session -t cmus 2>/dev/null || tmux -f '$XDG_CONFIG_HOME/cmus/tmux.conf' new-session -s cmus 'cmus'"
alias vi="$EDITOR"
alias ytdl="noglob youtube-dl --add-metadata --audio-format m4a --ignore-errors --output '%(title)s.%(ext)s'"
alias ytdl="noglob youtube-dl --ignore-errors --output '%(title)s.%(ext)s'"
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
@ -96,17 +94,17 @@ prompt_precmd() {
vcs_info
}
add-zsh-hook precmd prompt_precmd
set_title_precmd() {
echo -n "\e]2;$USER@$HOST:`basename "${PWD/#$HOME/~}"`\a"
}
set_title_precmd
add-zsh-hook precmd set_title_precmd
prompt_chpwd() {
FORCE_RUN_VCS_INFO=1
}
add-zsh-hook chpwd prompt_chpwd
set_title_chpwd() {
echo -n "\e]2;$USER@$HOST:`basename "${PWD/#$HOME/~}"`\a"
}
add-zsh-hook chpwd set_title_chpwd
if [[ "$TERM" == 'xterm-termite' && ( ! -f '/usr/share/terminfo/x/xterm-termite' ) && ( ! -f "$XDG_CONFIG_HOME/terminfo/x/xterm-termite" ) ]]; then
curl -fL 'https://raw.githubusercontent.com/thestinger/termite/master/termite.terminfo' | tic -xo"$XDG_CONFIG_HOME/terminfo" -
fi

3
.gitignore

@ -3,6 +3,9 @@
!.config/cmus/
!.config/cmus/rc
!.config/cmus/tmux.conf
!.config/coc/
!.config/coc/extensions/
!.config/coc/extensions/package.json
!.config/git/
!.config/git/config
!.config/git/ignore

1
.ssh/config

@ -24,7 +24,6 @@ Host gaborStudio
Host gaborPorta
HostName 37.221.213.41
User porta
port 44423
Host sv-linux

2
.tmux.conf

@ -1,4 +1,6 @@
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
setw -g mode-keys vi
set -g mouse on
set -sg escape-time 10

3
.zprofile

@ -1,3 +1,6 @@
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
[ -z $SSH_AUTH_SOCK ] && export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
export ZDOTDIR="$HOME/.config/zsh"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
Loading…
Cancel
Save