dotfiles

:)
git clone https://git.sr.ht/~ashymad/dotfiles
Log | Files | Refs | Submodules | LICENSE

commit 4dd0404432ac3496f8914a5b548f617294a63a87
parent e293e15df72fd44775b134fee10e2c0b5b3bb10f
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Fri, 17 Feb 2023 12:48:50 +0100

Packer + DDC + Rose pine transition

Diffstat:
Malacritty/.config/alacritty/alacritty.yml | 81++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Mfish/.config/fish/config.fish | 4++++
Mfish/.config/fish/functions/7z.fish | 6+++---
Mfish/.config/fish/functions/neovide.fish | 2+-
Mi3/.i3/config.d/bindsyms | 8++++----
Mi3/.i3/config.d/execs | 2+-
Mnvim/.config/nvim/ginit.vim | 16+++++++++++++---
Mnvim/.config/nvim/init.vim | 305++++---------------------------------------------------------------------------
Anvim/.config/nvim/lua/plugins.lua | 202+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpolybar/.config/polybar/config | 45++++++++++++++++++++++++++-------------------
10 files changed, 313 insertions(+), 358 deletions(-)

diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml @@ -46,71 +46,84 @@ draw_bold_text_with_bright_colors: false font: # The normal (roman) font face to use. normal: - family: Code New Roman # should be "Menlo" or something on macOS. + family: CodeNewRoman Nerd Font # should be "Menlo" or something on macOS. # Style can be specified to pick a specific face. - style: Regular + style: Book # The bold font face bold: - family: Code New Roman # # should be "Menlo" or something on macOS. + family: CodeNewRoman Nerd Font # # should be "Menlo" or something on macOS. # Style can be specified to pick a specific face. style: Bold # The italic font face italic: - family: Code New Roman # should be "Menlo" or something on macOS. + family: CodeNewRoman Nerd Font # should be "Menlo" or something on macOS. # Style can be specified to pick a specific face. style: Italic # Point size of the font - size: 14.0 + size: 12.0 # Offset is the extra space around each character. offset.y can be thought of # as modifying the linespacing, and offset.x as modifying the letter spacing. offset: x: 0 - y: -2 + y: 0 # Glyph offset determines the locations of the glyphs within their cells with # the default being at the bottom. Increase the x offset to move the glyph to # the right, increase the y offset to move the glyph upward. glyph_offset: x: 0 - y: 0 - - # OS X only: use thin stroke font rendering. Thin strokes are suitable - # for retina displays, but for non-retina you probably want this set to - # false. - use_thin_strokes: false + y: -2 # Should display the render timer debug: render_timer: false + colors: primary: - background: '0x282c34' - foreground: '0xdcdfe4' - - normal: - black: '0x282c34' - red: '0xe06c75' - green: '0x98c379' - yellow: '0xe5c07b' - blue: '0x61afef' - magenta: '0xc678dd' - cyan: '0x56b6c2' - white: '0xdcdfe4' - - bright: - black: '0x282c34' - red: '0xe06c75' - green: '0x98c379' - yellow: '0xe5c07b' - blue: '0x61afef' - magenta: '0xc678dd' - cyan: '0x56b6c2' - white: '0xdcdfe4' + background: "0x191724" + foreground: "0xe0def4" +cursor: + text: "0xe0def4" + cursor: "0x524f67" +vi_mode_cursor: + text: "0xe0def4" + cursor: "0x524f67" +line_indicator: + foreground: None + background: None +selection: + text: "0xe0def4" + background: "0x403d52" +normal: + black: "0x26233a" + red: "0xeb6f92" + green: "0x31748f" + yellow: "0xf6c177" + blue: "0x9ccfd8" + magenta: "0xc4a7e7" + cyan: "0xebbcba" + white: "0xe0def4" +bright: + black: "0x6e6a86" + red: "0xeb6f92" + green: "0x31748f" + yellow: "0xf6c177" + blue: "0x9ccfd8" + magenta: "0xc4a7e7" + cyan: "0xebbcba" + white: "0xe0def4" +hints: + start: + foreground: "#908caa" + background: "#1f1d2e" + end: + foreground: "#6e6a86" + background: "#1f1d2e" # Visual Bell # diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish @@ -1,5 +1,7 @@ #!/bin/env fish +fish_config theme choose "Rosé Pine" + set fish_greeting "" alias ec "emacsclient -a \"\"" @@ -7,6 +9,8 @@ alias fcd 'cd (fd -I -L -d 8 -t d . ~ | fzf)' alias bash 'env FISH_RAMP_DISABLE=1 bash' alias psgr 'ps aux | grep' +set -g PATH (bash -c -i 'source ~/.bash_profile; echo $PATH') ~/.deno/bin/ + if test -n "$NVIM" alias nvim nvr end diff --git a/fish/.config/fish/functions/7z.fish b/fish/.config/fish/functions/7z.fish @@ -1,8 +1,8 @@ -function 7z --wraps 7z +function 7z if test "$argv[1]" = "xn" - /usr/bin/7z x "$argv[2]" -o(basename $argv[2] | sed 's/\.[^.]*$//') + /usr/bin/7za x "$argv[2]" -o(basename $argv[2] | sed 's/\.[^.]*$//') else - /usr/bin/7z $argv + /usr/bin/7za $argv end end diff --git a/fish/.config/fish/functions/neovide.fish b/fish/.config/fish/functions/neovide.fish @@ -6,6 +6,6 @@ function neovide disown ssh -T shyman@$DISADR "env DISPLAY=:0 neovide --remote-tcp $LOCADR:8118" else - /home/mikulicz/Workspace/neovide/target/release/neovide -- $argv + env neovide -- $argv end end diff --git a/i3/.i3/config.d/bindsyms b/i3/.i3/config.d/bindsyms @@ -81,10 +81,10 @@ bindsym XF86AudioPrev exec --no-startup-id cmus-remote -r bindsym $mod+c exec alacritty --class CMUS -e fish -c cmus // Sreen brightness controls -bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 # increase screen brightness -bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 # decrease screen brightness -bindsym $mod+F12 exec --no-startup-id xbacklight -inc 10 # increase screen brightness -bindsym $mod+F11 exec --no-startup-id xbacklight -dec 10 # decrease screen brightness +bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl s +10% # increase screen brightness +bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl s +10%- # decrease screen brightness +bindsym $mod+F12 exec --no-startup-id brightnessctl s +10% # increase screen brightness +bindsym $mod+F11 exec --no-startup-id brightnessctl s +10%- # decrease screen brightness // Change wallpaper bindsym $mod+p exec --no-startup-id ~/.fehbg -r diff --git a/i3/.i3/config.d/execs b/i3/.i3/config.d/execs @@ -1,5 +1,5 @@ // vim: filetype=i3config -exec --no-startup-id picom --experimental-backends +exec --no-startup-id picom exec --no-startup-id xss-lock -l -- ~/.i3/lock.sh exec --no-startup-id nm-applet exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent diff --git a/nvim/.config/nvim/ginit.vim b/nvim/.config/nvim/ginit.vim @@ -11,8 +11,18 @@ elseif exists('g:fvim_loaded') nnoremap <A-CR> :FVimToggleFullScreen<CR> endif -set guifont=Fira\ Code:h12 -nnoremap <silent> <C-ScrollWheelUp> :set guifont=+<CR> -nnoremap <silent> <C-ScrollWheelDown> :set guifont=-<CR> +let s:font = "Fira\\ Code" +let s:fontsize = 9 +:execute "set guifont=" . s:font . ":h" . s:fontsize + +function! AdjustFontSize(amount) + let s:fontsize = s:fontsize+a:amount + :execute "set guifont=" . s:font . ":h" . s:fontsize +endfunction + +noremap <C-ScrollWheelUp> :call AdjustFontSize(1)<CR> +noremap <C-ScrollWheelDown> :call AdjustFontSize(-1)<CR> +inoremap <C-ScrollWheelUp> <Esc>:call AdjustFontSize(1)<CR>a +inoremap <C-ScrollWheelDown> <Esc>:call AdjustFontSize(-1)<CR>a colorscheme onehalfdark let g:neovide_transparency=0.9 diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim @@ -6,304 +6,16 @@ if &compatible set nocompatible endif -function! PackInit() abort - packadd minpac - - call minpac#init() - - call minpac#add('k-takata/minpac', {'type': 'opt', 'branch': 'devel'}) - - call minpac#add('vim-scripts/indentpython.vim', {'type': 'opt'}) - call minpac#add('Vimjas/vim-python-pep8-indent', {'type': 'opt'}) - - call minpac#add('JuliaEditorSupport/julia-vim', {'type': 'opt'}) - - call minpac#add('lervag/vimtex', {'type': 'opt'}) - call minpac#add('PietroPate/vim-tex-conceal', {'type': 'opt'}) - - call minpac#add('davisdude/vim-love-docs', {'type': 'opt', 'branch': 'build'}) - - call minpac#add('rust-lang/rust.vim', {'type': 'opt'}) - - call minpac#add('dag/vim-fish', {'type': 'opt'}) - - call minpac#add('jalvesaq/Nvim-R', {'type': 'opt'}) - - call minpac#add('mboughaba/i3config.vim', {'type': 'opt'}) - - call minpac#add('paretje/deoplete-notmuch', {'type': 'opt'}) - - call minpac#add('rasjani/robotframework-vim', {'type': 'opt', 'subdir': 'after'}) - - call minpac#add('stephpy/vim-yaml', {'type': 'opt', 'subdir': 'after'}) - - call minpac#add('burnettk/vim-jenkins', {'type': 'opt'}) - - call minpac#add('godlygeek/tabular') - call minpac#add('plasticboy/vim-markdown', {'type': 'opt'}) - - call minpac#add('jackguo380/vim-lsp-cxx-highlight', {'type': 'opt'}) - - call minpac#add('sonph/onehalf', {'subdir': 'vim'}) - - call minpac#add('itchyny/lightline.vim') - call minpac#add('scrooloose/nerdtree') - - call minpac#add('Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }) - - call minpac#add('tpope/vim-fugitive') - - call minpac#add('chaoren/vim-wordmotion') - - call minpac#add("williamboman/nvim-lsp-installer") - call minpac#add('neovim/nvim-lspconfig') - call minpac#add('Shougo/deoplete-lsp') - - call minpac#add('grafi-tt/lunajson', {'name': 'lunajson/lua', 'subdir': 'src'}) -endfunction - -command! PackUpdate call PackInit() | call minpac#update() -command! PackClean call PackInit() | call minpac#clean() -command! PackStatus call PackInit() | call minpac#status() - -packloadall - -" lightline -let g:lightline = { - \ 'colorscheme': 'onehalfdark', - \ } - -" For conceal markers. -if has('conceal') - set conceallevel=2 - let g:tex_conceal="abdgms" -endif - -" vimtex -let g:vimtex_view_method = 'zathura' -let g:vimtex_compiler_progname = 'nvr' -let g:vimtex_quickfix_enabled = 0 -let g:vimtex_compiler_latexmk = { - \ 'options' : [ - \ '-pdf', - \ '-shell-escape', - \ '-verbose', - \ '-file-line-error', - \ '-synctex=1', - \ '-interaction=nonstopmode', - \ ], - \} - -"NERDTree -map <C-k> :NERDTreeToggle<CR> - -"Jenkins -let g:jenkins_url = 'http://krk-sb13-19.soc-mgt.krk-lab.nsn-rdnet.net:8080' -let g:jenkins_username = 'admin' -let g:jenkins_password = 'egenrules' - -" nvim-lsp -lua << EOF - -function nil2em(str) - if str == nil then - return "" - else - return str - end -end - -require("nvim-lsp-installer").setup {} - -local clang = io.popen('clang -print-resource-dir') -local lspconfig = require'lspconfig' -local json = require'lunajson' -local compc = io.open("compile_commands.json","r") -local gccp = "gcc" - -if compc ~= nil then - gccp = json.decode(compc:read("*a"))[1].arguments[1] -end - -local gccs = io.popen(gccp .. " -print-sysroot") -local gcct = io.popen(gccp .. " -dumpmachine") - -lspconfig.ccls.setup { - init_options = { - clang = { - resourceDir = clang:read("*l"); - extraArgs = { - "--sysroot="..nil2em(gccs:read("*l")).."/", - "-target="..gcct:read("*l") - }; - }; - highlight = { - lsRanges = true; - }; - }; - }; - -gcct:close() -clang:close() -EOF - -lua require'lspconfig'.rust_analyzer.setup{} -lua require'lspconfig'.jedi_language_server.setup{} -" lua require'lspconfig'.sumneko_lua.setup{cmd={"lua-language-server"}} -lua require'lspconfig'.texlab.setup{} - -" Deoplete -inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>" -inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>" - -function! s:check_back_space() abort "{{{ - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' -endfunction"}}} -imap <silent><expr> <TAB> - \ pumvisible() ? "\<C-n>" : - \ <SID>check_back_space() ? "\<TAB>" : - \ neosnippet#expandable_or_jumpable() ? - \ "\<Plug>(neosnippet_expand_or_jump)" : - \ deoplete#manual_complete() - -call deoplete#custom#option('omni_patterns', { - \ 'r': ['[^. *\t]\.\w*', '\h\w*::\w*', '\h\w*\$\w*'], - \}) - -call deoplete#custom#option('sources', { - \ 'notmuch': ['notmuch', 'address', '--format=json', '--deduplicate=address', '*'], - \}) - -call deoplete#enable() - -" Autocmds - -autocmd Filetype python call SetPythonOptions() -function SetPythonOptions() - packadd indentpython.vim - packadd vim-python-pep8-indent - setlocal textwidth=79 - setlocal fileformat=unix -endfunction - -autocmd Filetype tex call SetTeXOptions() -function SetTeXOptions() - packadd vim-tex-conceal - packadd vimtex - let g:vimteplete = '\\(?:' - \ . '\w*cite\w*(?:\s*\[[^]]*\]){0,2}\s*{[^}]*' - \ . '|(text|block)cquote\*?(?:\s*\[[^]]*\]){0,2}\s*{[^}]*' - \ . '|(for|hy)\w*cquote\*?{[^}]*}(?:\s*\[[^]]*\]){0,2}\s*{[^}]*' - \ . '|\w*ref(?:\s*{[^}]*|range\s*{[^,}]*(?:}{)?)' - \ . '|hyperref\s*\[[^]]*' - \ . '|includegraphics\*?(?:\s*\[[^]]*\]){0,2}\s*{[^}]*' - \ . '|(?:include(?:only)?|input|subfile)\s*{[^}]*' - \ . '|([cpdr]?(gls|Gls|GLS)|acr|Acr|ACR)[a-zA-Z]*\s*{[^}]*' - \ . '|(ac|Ac|AC)\s*{[^}]*' - \ . '|includepdf(\s*\[[^]]*\])?\s*{[^}]*' - \ . '|includestandalone(\s*\[[^]]*\])?\s*{[^}]*' - \ . '|(usepackage|RequirePackage|PassOptionsToPackage)(\s*\[[^]]*\])?\s*{[^}]*' - \ . '|documentclass(\s*\[[^]]*\])?\s*{[^}]*' - \ . '|begin(\s*\[[^]]*\])?\s*{[^}]*' - \ . '|end(\s*\[[^]]*\])?\s*{[^}]*' - \ . '|\w*' - \ .')' - " \ 'tex': g:vimtex#re#deoplete, - call deoplete#custom#option('omni_patterns', { - \ 'tex': g:vimteplete, - \}) - setlocal sw=2 - setlocal textwidth=79 - setlocal iskeyword+=: - setlocal spell! spelllang=en -endfunction - -autocmd Filetype rust call SetRustOptions() -function SetRustOptions() - packadd rust.vim - setlocal omnifunc=v:lua.vim.lsp.omnifunc -endfunction - -autocmd BufNewFile,BufRead *.jl set filetype=julia -autocmd Filetype julia call SetJuliaOptions() -function SetJuliaOptions() - packadd julia-vim -endfunction - -autocmd Filetype R call SetROptions() -autocmd Filetype noweb call SetROptions() -function SetROptions() - packadd Nvim-R -endfunction - -autocmd BufNewFile,BufRead *.none set filetype=mail -autocmd Filetype mail call SetMailOptions() -function SetMailOptions() - packadd deoplete-notmuch -endfunction - autocmd BufNewFile,BufRead *.fish set filetype=fish -autocmd Filetype fish call SetFishOptions() -function SetFishOptions() - packadd vim-fish -endfunction - -autocmd BufNewFile,BufRead Jenkinsfile,*.Jenkinsfile call SetJenkinsfileOptions() -function SetJenkinsfileOptions() - packadd vim-jenkins - setf perl -endfunction - -autocmd BufNewFile,BufRead *.robot set filetype=robot -autocmd Filetype robot call SetRobotOptions() -function SetRobotOptions() - packadd robotframework-vim -endfunction - -autocmd Filetype i3config call SetI3Options() -function SetI3Options() - packadd i3config.vim -endfunction - -autocmd Filetype lua call SetLuaOptions() -function SetLuaOptions() - packadd vim-love-docs -endfunction - -au BufReadPost APKBUILD set syntax=sh noexpandtab - -autocmd Filetype markdown call SetMDOptions() -function SetMDOptions() - packadd vim-markdown -endfunction -autocmd FileType yaml call SetYAMLOptions() -function SetYAMLOptions() - packadd vim-yaml - setlocal ts=2 sts=2 sw=2 expandtab -endfunction - -autocmd FileType c call SetCOptions() -autocmd FileType cpp call SetCOptions() -function SetCOptions() - packadd vim-lsp-cxx-highlight -endfunction - -augroup LuaHighlight - autocmd! - autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank() -augroup END +autocmd BufNewFile,BufRead Jenkinsfile,*.Jenkinsfile set filetype=groovy autocmd CompleteDone * silent! pclose -" vim settings - +set termguicolors set hidden -" set lazyredraw let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" -set termguicolors set noshowmode set wildmenu set nu @@ -315,14 +27,15 @@ set expandtab set autoindent set noea set inccommand=split +set relativenumber +set pumblend=20 + +let g:vimsyn_embed = 'L' filetype plugin indent on syntax on -colorscheme onehalfdark -hi Normal guibg=none -hi LineNr guibg=none nmap ,d :b#<bar>bd#<CR> tnoremap <Esc> <C-\><C-n> @@ -341,3 +54,9 @@ cnoremap <A-f> <s-right> cnoremap <A-left> <s-left> cnoremap <A-right> <s-right> cnoremap <A-backspace> <c-w> + +"Cpoy and paste +inoremap <C-v> <C-r>+ +vnoremap <C-c> "+y + +lua require('plugins') diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua @@ -0,0 +1,202 @@ +require('packer').startup(function(use) + use 'wbthomason/packer.nvim' + + use { 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate', + config = function() + require'nvim-treesitter.configs'.setup({ + highlight = { enable = true }, + incremental_selection = { enable = true }, + textobjects = { enable = true }, + }) + end + } + + use { 'dag/vim-fish', ft = {'fish'}} + + use { 'mboughaba/i3config.vim', ft = {'i3config'}} + + use { 'stephpy/vim-yaml', rtp = 'after', ft = {'yaml'}} + + use { 'burnettk/vim-jenkins', + ft = {'Jenkinsfile'}, + config = function() + vim.g.jenkins_url = 'http://krk-sb13-19.soc-mgt.krk-lab.nsn-rdnet.net:8080' + vim.g.jenkins_username = 'admin' + vim.g.jenkins_password = 'egenrules' + end + } + + use { "glepnir/lspsaga.nvim", + branch = "main", + config = function() + require('lspsaga').setup({}) + vim.keymap.set("n", "gh", "<cmd>Lspsaga lsp_finder<CR>", { silent = true }) + vim.keymap.set({"n","v"}, "<leader>ca", "<cmd>Lspsaga code_action<CR>", { silent = true }) + vim.keymap.set("n", "gr", "<cmd>Lspsaga rename<CR>", { silent = true }) + vim.keymap.set("n", "gd", "<cmd>Lspsaga peek_definition<CR>", { silent = true }) + vim.keymap.set("n", "<leader>cd", "<cmd>Lspsaga show_line_diagnostics<CR>", { silent = true }) + vim.keymap.set("n", "<leader>cd", "<cmd>Lspsaga show_cursor_diagnostics<CR>", { silent = true }) + vim.keymap.set("n", "[e", "<cmd>Lspsaga diagnostic_jump_prev<CR>", { silent = true }) + vim.keymap.set("n", "]e", "<cmd>Lspsaga diagnostic_jump_next<CR>", { silent = true }) + vim.keymap.set("n", "[E", function() + require("lspsaga.diagnostic").goto_prev({ severity = vim.diagnostic.severity.ERROR }) + end, { silent = true }) + vim.keymap.set("n", "]E", function() + require("lspsaga.diagnostic").goto_next({ severity = vim.diagnostic.severity.ERROR }) + end, { silent = true }) + vim.keymap.set("n","<leader>o", "<cmd>LSoutlineToggle<CR>",{ silent = true }) + vim.keymap.set("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true }) + vim.keymap.set("n", "<A-d>", "<cmd>Lspsaga open_floaterm<CR>", { silent = true }) + vim.keymap.set("t", "<A-d>", [[<C-\><C-n><cmd>Lspsaga close_floaterm<CR>]], { silent = true }) + end + } + + use { 'rose-pine/neovim', + as = 'rose-pine', + config = function() + vim.cmd('colorscheme rose-pine') + end + } + + use { 'nvim-lualine/lualine.nvim', + requires = { + 'kyazdani42/nvim-web-devicons', + 'rose-pine' + }, + config = function() + require('lualine').setup { + options = { + theme = 'rose-pine' + }, + extensions = {'nvim-tree'} + } + end + } + + use { 'xiyaowong/nvim-transparent', + config = function() + require("transparent").setup({ + enable = not(vim.g.neovide), -- boolean: enable transparent + extra_groups = { + "BufferLineTabClose", + "BufferlineBufferSelected", + "BufferLineFill", + "BufferLineBackground", + "BufferLineSeparator", + "BufferLineIndicatorSelected", + }, + exclude = {}, -- table: groups you don't want to clear + }) + end + } + + use {'akinsho/bufferline.nvim', + requires = 'nvim-tree/nvim-web-devicons', + config = function() + vim.opt.termguicolors = true + require("bufferline").setup({ + options = { + offsets = { + { + filetype = "NvimTree", + text = "File Explorer", + text_align = "center", + separator = true + } + }, + } + }) + end + } + + use { 'nvim-tree/nvim-tree.lua', + requires = 'nvim-tree/nvim-web-devicons', + tag = 'nightly', + config = function() + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + + vim.opt.termguicolors = true + + require("nvim-tree").setup({ + view = { + preserve_window_proportions = true, + } + }) + + vim.keymap.set("n", "<C-k>", ":NvimTreeToggle<CR>") + end + } + + use 'godlygeek/tabular' + + use { "lukas-reineke/indent-blankline.nvim", + config = function() + require("indent_blankline").setup({ + char = "⸾", + space_char_blankline = " ", + show_current_context = true, + show_current_context_start = true, + }) + end + } + use 'chaoren/vim-wordmotion' + + use { 'goolord/alpha-nvim', + requires = { 'nvim-tree/nvim-web-devicons' }, + config = function () + local theme = require("alpha.themes.startify") --or require("alpha.themes.startify") + theme.mru_opts.autocd = true + require'alpha'.setup(theme.config) + end + } + + use { 'neovim/nvim-lspconfig', + config = function() + require'lspconfig'.clangd.setup{} + end + } + + use { 'Shougo/ddc-source-nvim-lsp', + requires = {'Shougo/ddc.vim', 'neovim/nvim-lspconfig'} + } + + use { 'Shougo/ddc.vim', + requires = { + 'Shougo/ddc-ui-native', + 'vim-denops/denops.vim', + 'Shougo/ddc-source-nvim-lsp', + 'Shougo/ddc-sorter_rank', + 'Shougo/ddc-matcher_head' + }, + config = function() + vim.fn['ddc#custom#patch_global']('ui', 'native') + vim.fn['ddc#custom#patch_global']({ + sources = {'nvim-lsp'}, + sourceOptions = { + _ = { + matchers = {'matcher_head'}, + sorters = {'sorter_rank'} + }, + ["nvim-lsp"] = { + mark = 'L', + forceCompletionPattern = '\\.\\w*| =\\w*|->\\w*' }, + } + }) + vim.keymap.set('i', '<Tab>', function() + local col = vim.fn.col('.') - 1 + if vim.fn.pumvisible() == 1 then + return "<C-n>" + elseif col <= 1 or vim.fn.getline('.'):sub(col, col):match('%s') then + return "<TAB>" + else + return vim.cmd("call ddc#map#manual_complete()") + end + end, {expr = true, silent = true}) + + vim.fn["ddc#enable"]() + end + } + +end) diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config @@ -8,20 +8,27 @@ ;===================================================== [colors] -black = #282c34 -red = #e06c75 -green = #98c379 -yellow = #e5c07b -blue = #61afef -magenta = #c678dd -cyan = #56b6c2 -white = #dcdfe4 - -background = #e6282c34 -background-alt = #e65c6370 - -foreground = #dcdfe4 -foreground-alt = #ffffff +black = #6e6a86 +red = #eb6f92 +green = #9ccfd8 +yellow = #f6c177 +blue = #31748f +magenta = #c4a7e7 +cyan = #ebbcba +white = #e0def4 +altblack = #6e6a86 +altred = #eb6f92 +altgreen = #9ccfd8 +altyellow = #f6c177 +altblue = #31748f +altmagenta = #c4a7e7 +altcyan = #ebbcba +altwhite = #e0def4 + +foreground = #e0def4 +foreground-alt = #f0eeg4 +background = #191724 +background-alt = #292734 primary = ${colors.green} secondary = ${colors.yellow} @@ -58,8 +65,8 @@ font-1 = "Noto Sans Mono CJK JP:pixelsize=9;1" font-2 = "Siji:pixelsize=10;1" modules-left = i3 -modules-center = cmus -modules-right = filesystem memory cpu backlight-acpi volume eth wlan battery xkeyboard date +modules-center = mpd +modules-right = filesystem memory cpu volume vpn docketh eth wlan battery0 ibacklight xkeyboard date tray-position = left tray-padding = 2 @@ -200,11 +207,11 @@ bar-width = 10 bar-indicator = | bar-indicator-foreground = ${colors.foreground} bar-indicator-font = 2 -bar-fill = ― +bar-fill = ─ bar-fill-font = 2 -bar-fill-foreground = ${colors.magenta} -bar-empty = ― +bar-empty = ─ bar-empty-font = 2 +bar-fill-foreground = ${colors.magenta} bar-empty-foreground = ${colors.foreground} [module/cpu]