diff --git a/.config/dwm/autostart.sh b/.config/dwm/autostart.sh index 36ecb61..1512ed9 100755 --- a/.config/dwm/autostart.sh +++ b/.config/dwm/autostart.sh @@ -5,10 +5,5 @@ picom & nitrogen --restore & $HOME/.scripts/launch-conky_dwm.sh & sxhkd -c $HOME/.config/sxhkd/dwm & -if [ x$(pidof dwmblocks) = "x" ] -then - dwmblocks & - pkill -RTMIN+1 dwmblocks -else - echo 'dwmblocks is running, skipped.' -fi +[ x$(pidof dwmblocks) = "x" ] && $(dwmblocks &; pkill -RTMIN+1 dwmblocks) || echo "dwmblocks is running, skipped." +fcitx5 -d & diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index e950ffc..d703b42 100755 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -147,7 +147,8 @@ alt + y passmenu # screenshot super + Print - sh $HOME/.scripts/ss.sh + flameshot gui +# sh $HOME/.scripts/ss.sh # gravit-designer super + alt + g "$HOME/my Files/Gravit/GravitDesigner.AppImage" diff --git a/.config/vim/vim_nix b/.config/vim/vim_nix index 36cf346..0dfe915 100644 --- a/.config/vim/vim_nix +++ b/.config/vim/vim_nix @@ -38,8 +38,8 @@ autocmd FileType c map :w:vs:ter gcc "%" -o %< && ./%< && autocmd FileType c imap :w:vs:ter gcc "%" -o %< && ./%< && read " pandoc (markdown to pdf) -autocmd FileType markdown map :w:!pandoc -o "%:r.pdf" -H ~/Documents/College/include.tex -c ~/Documents/College/pandoc_themes/buttondown.css "%" --from markdown+grid_tables+smart --pdf-engine=xelatex -autocmd FileType markdown imap :w:!pandoc -o "%:r.pdf" -H ~/Documents/College/include.tex -c ~/Documents/College/pandoc_themes/buttondown.css "%" --from markdown+grid_tables+smart --pdf-engine=xelatex +autocmd FileType markdown map :w:!pandoc -o "%:r.pdf" -H ~/Documents/College/include.tex -c ~/Documents/College/pandoc_themes/buttondown.css "%" --from markdown+grid_tables+smart-implicit_figures --pdf-engine=xelatex +autocmd FileType markdown imap :w:!pandoc -o "%:r.pdf" -H ~/Documents/College/include.tex -c ~/Documents/College/pandoc_themes/buttondown.css "%" --from markdown+grid_tables+smart-implicit_figures --pdf-engine=xelatex " Open pdf via zathura if exist autocmd FileType markdown map o :!setsid pdfview "%:r.pdf" diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index e4f5eb4..efd041a 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -65,8 +65,19 @@ Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' } Plug 'ncm2/ncm2' Plug 'roxma/nvim-yarp' " - NCM2 sources -Plug 'ncm2/ncm2-jedi' +Plug 'ncm2/ncm2-jedi' " python +Plug 'ncm2/ncm2-racer' " rust +" --- Auto complete with DDC +" Plug 'Shougo/ddc.vim' +" Plug 'vim-denops/denops.vim' +" Plug 'neovim/nvim-lspconfig' +" " - DDC sources +" Plug 'Shougo/ddc-around' +" Plug 'Shougo/ddc-nvim-lsp' +" " - DDC filters +" Plug 'Shougo/ddc-matcher_head' +" Plug 'Shougo/ddc-sorter_rank' " --- Indent visualization " Plug 'Yggdroot/indentLine' @@ -86,6 +97,11 @@ Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } " --- linting support Plug 'dense-analysis/ale' +" --- For rust +Plug 'rust-lang/rust.vim' + +Plug 'wakatime/vim-wakatime' + call plug#end() " ====================== @@ -218,3 +234,75 @@ hi Conceal ctermfg=0 ctermbg=NONE " --- Python highlighting let g:python_highlight_all = 1 + +" --- DDC +" " Customize global settings +" " Use around source. +" " https://github.com/Shougo/ddc-around +" call ddc#custom#patch_global('sources', ['around', 'nvimlsp']) + +" " Use matcher_head and sorter_rank. +" " https://github.com/Shougo/ddc-matcher_head +" " https://github.com/Shougo/ddc-sorter_rank +" call ddc#custom#patch_global('sourceOptions', { +" \ '_': { +" \ 'matchers': ['matcher_head'], +" \ 'sorters': ['sorter_rank']}, +" \ }) + +" " Change source options +" call ddc#custom#patch_global('sourceOptions', { +" \ 'around': {'mark': 'A'}, +" \ 'nvimlsp': { 'mark': 'lsp', 'forceCompletionPattern': '\.|:|->' }, +" \ }) +" call ddc#custom#patch_global('sourceParams', { +" \ 'around': {'maxSize': 500}, +" \ 'nvimlsp': { 'kindLabels': { 'Class': 'c' } }, +" \ }) + +" " Customize settings on a filetype +" call ddc#custom#patch_filetype(['rust'], 'sources', ['around', 'nvimlsp']) +" call ddc#custom#patch_filetype(['c', 'cpp'], 'sources', ['around', 'clangd']) +" call ddc#custom#patch_filetype(['c', 'cpp'], 'sourceOptions', { +" \ 'clangd': {'mark': 'C'}, +" \ }) +" call ddc#custom#patch_filetype('markdown', 'sourceParams', { +" \ 'around': {'maxSize': 100}, +" \ }) + +" " Mappings + +" " : completion. +" inoremap +" \ pumvisible() ? '' : +" \ (col('.') <= 1 getline('.')[col('.') - 2] =~# '\s') ? +" \ '' : ddc#manual_complete() + +" " : completion back. +" inoremap pumvisible() ? '' : '' + +" " Use ddc. +" call ddc#enable() + +" --- nvim-lsp +" lua << EOF +" require'lspconfig'.pyright.setup{} +" local nvim_lsp = require'lspconfig' + +" nvim_lsp.rust_analyzer.setup({ +" settings = { +" ["rust-analyzer"] = { +" assist = { +" importGranularity = "module", +" importPrefix = "by_self", +" }, +" cargo = { +" loadOutDirsFromCheck = true +" }, +" procMacro = { +" enable = true +" }, +" } +" } +" }) +" EOF diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index 1735054..251dc5c 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -86,10 +86,13 @@ augroup END " ----- indent for corresponding extension autocmd BufEnter *.py set ai sw=4 ts=4 sta et fo=croql +" in C files, tabs looks like 4 spaces, but it's actually tabs autocmd BufEnter *.c set ai sw=4 ts=4 sta noet fo=croql autocmd BufEnter *.md set ai sw=3 ts=3 sta et fo=croql autocmd Filetype html set ai sw=4 ts=4 sta et fo=croql autocmd Filetype css set ai sw=4 ts=4 sta et fo=croql +autocmd Filetype javascript set ai sw=4 ts=4 sta et fo=croql +autocmd Filetype vue set ai sw=4 ts=4 sta et fo=croql " ----- Auto refresh vimrc augroup myvimrc diff --git a/.config/xprofile b/.config/xprofile index 1840e5a..7b63bbe 100644 --- a/.config/xprofile +++ b/.config/xprofile @@ -12,7 +12,7 @@ cpupower frequency-set -g performance dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY # Universal Autostarts -fcitx5 -d & +# fcitx5 -d & xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources & unclutter & dunst & diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 55a5db5..d336ebe 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -1,13 +1,17 @@ #!/bin/zsh +export ANDROID_HOME="/opt/android-sdk" + # -- Path -PATH="$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" +# PATH="$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" +PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" +export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library # -- IBus stuff (IME) export GTK_IM_MODULE='ibus' export QT_IM_MODULE='ibus' -export XMODIFIERS=@im='ibus' export GLFW_IM_MODULE='ibus' +export XMODIFIERS=@im='ibus' # -- DEFAULT export QT_QPA_PLATFORMTHEME='qt5ct' @@ -16,8 +20,8 @@ if [[ -n $SSH_CONNECTION ]]; then else export EDITOR='nvim' fi -# export BROWSER='brave' -export BROWSER='waterfox-g3' +export BROWSER='brave' +# export BROWSER='waterfox-g3' export TERMINAL='kitty' export READER='zathura' export HTTPS='localhost:9050'