diff --git a/common/gitconfig.example b/common/gitconfig.example deleted file mode 100644 index 5462581..0000000 --- a/common/gitconfig.example +++ /dev/null @@ -1,73 +0,0 @@ -# $DOTFILES/common/gitconfig.example -# Date: 2024-12-22 -# Author: js0ny - -# Location: -# Windows: %USERPROFILE%\.gitconfig -# *nix: ~/.config/git/config -# Linking: (Note that this file is an example, only copy this then edit) -# cp $DOTFILES/common/gitconfig.example ~/.config/git/config -[user] # Modify the name and email - name = whoami - email = whoami@example.com -[alias] - cl = clone - clnh = clone --depth 1 # Clone with no history - cma = commit -am # Add and commit - logs = log --oneline --graph --decorate --all # Show logs - last = log -1 HEAD # Show last commit - undo = reset --hard HEAD # Undo the last commit -[core] - editor = nvim - pager = delta - # autocrlf: - # true: Keep crlf in Windows, lf in *nix - # input: Keep lf in all platforms - autocrlf = input - safecrlf = true - excludesfile = $XDG_CONFIG_HOME/git/ignore - quotePath = false # zh-CN: 解决中文路径问题 - eol = lf -[include] - path = ~/.config/git/catppuccin-delta.gitconfig -[core] - editor = nvim - pager = delta - autocrlf = input # Force End of Line in different platforms -[interactive] - diffFilter = delta --color-only -[delta] - navigate = true - dark = true - features = catppuccin-mocha # Colorscheme -[diff] - tool = nvimdiff -[difftool] - prompt = false -[difftool "nvimdiff"] - cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"" -[merge] - tool = nvimdiff -[mergetool] - prompt = false -[mergetool "nvimdiff"] - cmd = "nvim -d \"$LOCAL\" \"$MERGED\" \"$REMOTE\"" -[color] - ui = auto -[pull] - ff = only -[init] - defaultBranch = master -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true -# Force ssh -# Don't use ssh in GitHub since ssh-agent doesn't work in non-interactive environment -# While GitHub holds many plugins, it's better to use https -# This prevents from Neovide `publickey` error when installing plugins -# [url "git@github.com:"] -# insteadOf = https://github.com/ -[url "git@codeberg.org:"] - insteadOf = https://codeberg.org/ diff --git a/common/ideavimrc b/common/ideavimrc deleted file mode 100644 index 3e4e251..0000000 --- a/common/ideavimrc +++ /dev/null @@ -1,239 +0,0 @@ -" $DOTFILES/common/ideavimrc -" Date: 2024-12-22 -" Author: js0ny - -" Location: -" $XDG_CONFIG_HOME/ideavim/ideavimrc -" Linking: -" ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc - -source ~/.local/share/intellimacs/spacemacs.vim - -source ~/.local/share/intellimacs/extra.vim -source ~/.local/share/intellimacs/major.vim -source ~/.local/share/intellimacs/hybrid.vim - -source ~/.local/share/intellimacs/which-key.vim - - -" """ Basic Configs """ -let mapleader = " " " set to - -""" Colemak """ -noremap n j -noremap e k -noremap i l - -" Similar position to i -noremap l i -noremap L I -" ne[k]st -noremap k n -noremap K N -" [j]ump -noremap j e -noremap J E - -nnoremap H :bp -nnoremap I :bn -noremap N 5j -noremap E 5k -vnoremap H ^ -xnoremap H ^ -onoremap H ^ -vnoremap I $ -xnoremap I $ -onoremap I $ - - - -" Y to yank to end of line -noremap Y y$ - -""" Options """ -" search for actions: :actionlist - -"" Vim Compat "" -set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard -set gdefault " substitute all occurrences in line per default -set history=4096 " keep x lines of command line history -set hlsearch -set ignorecase -set incsearch -set keymodel=startsel,stopsel -set matchpairs+=<:> -set showcmd -set smartcase " no ignore case when pattern is uppercase -set wrapscan " searches wrap around the end of the file - -"" IDE Settings "" -set scrolloff=5 -set sidescrolloff=10 - -"" IDE Features "" -set relativenumber " Hybrid Line Number shown - -"" IdeaVim Only "" -set ideajoin -set ideastatusicon=enabled - -""" Plugins """ - -Plug 'justinmk/vim-sneak' -Plug 'preservim/nerdtree' -Plug 'tpope/vim-surround' -Plug 'tpope/vim-commentary' -Plug 'terryma/vim-multiple-cursors' -Plug 'machakann/vim-highlightedyank' -Plug 'easymotion/vim-easymotion' - -""" Keybindings """ - -"" don't lose selection when indenting "" -vnoremap < >gv -vnoremap = =gv - -"" edit ideavim config v + "" -nnoremap vv :e ~/.ideavimrc -nnoremap vr :source ~/.ideavimrc - -"" NERDTree "" -nnoremap e :NERDTreeToggle - -"" EasyMotion "" -nmap s (easymotion-f) -nmap S (easymotion-F) - -"" Sneak "" -nmap f (sneak-s) -nmap F (sneak-S) - -"" Language Server Protocol "" -nnoremap gd :action GotoDeclaration -nnoremap gtd :action GotoTypeDeclaration -nnoremap gtD :action QuickTypeDefinition -nnoremap gr :action ShowUsages -nnoremap gi :action GotoImplementation -nnoremap gpi :action QuickImplementations -nnoremap gs :action GotoSuperMethod -nnoremap ga :action ShowIntentionActions -nnoremap gq :action ShowIntentionActions -nnoremap ge :action GotoNextError - -"" Collapse and Expand z + "" -nnoremap zi :action ExpandCollapseToggleAction -nnoremap zc :action CollapseRegion -nnoremap zC :action CollapseRegionRecursively -nnoremap zM :action CollapseAll -nnoremap zo :action ExpandRegion -nnoremap zO :action ExpandRegionRecursively -nnoremap zR :action ExpandAll - -"" Miscs "" -nnoremap : :action GotoAction -nnoremap :action GotoFile -nnoremap h :action PrevSplitter -nnoremap i :action NextSplitter - -"" AI Related a + "" -nnoremap ac :action copilot.chat.show -nnoremap ad :action copilot.disableCopilot -nnoremap ae :action copilot.enableCopilot -nnoremap aa :action copilot.openCopilot - -" b : +buffer -nnoremap bb :action Switcher -noremap bd :bdelete -noremap bh :bprevious -noremap bi :bnext -noremap bp :bprevious -noremap bn :bnext - -" c : +code/compile -nnoremap cr :action Run -nnoremap cf :action ReformatCode -nnoremap cs :action GotoSymbol -nnoremap cS :action GotoSymbol -nnoremap cR :action RenameElement -""" Works for Rider only -nnoremap ce :action ReSharperGotoNextErrorInSolution -nnoremap cE :action ReSharperGotoPrevErrorInSolution - -" d : +debug - -" f : +file -nnoremap ff :action GotoFile -nnoremap fF :action TextSearchAction -nnoremap fc :action ShowSettings -nnoremap fC :action ShowSettings -nnoremap fe :NERDTreeToggle -nnoremap fo :OpenInAssociatedApplication -nnoremap ft :action ActivateTerminalToolWindow -nnoremap fx :action WelcomeScreen.Plugins - -" g : +git -nnoremap gp :action Git.Pull -nnoremap gP :action Vcs.Push -nnoremap gb :action Git.Branches -nnoremap gR :action Git.Rebase -nnoremap gM :action Git.Merge -nnoremap gc :action CheckinProject -nnoremap gC :action Git.Clone -nnoremap gg :action ActivateVersionControlToolWindow -nnoremap gS :action Git.Stash - -" h : +help - -" p : +project -nnoremap pr :action Run -nnoremap pd :action Debug -nnoremap pb :action Build - -" q : +quit -nnoremap qq :action Exit -nnoremap Q :action Exit - -" r : +refactor -nnoremap ri :action Inline -nnoremap rr :action RenamElement -nnoremap rev :action IntroduceVariable -vnoremap rev :action IntroduceVariable -nnoremap rem :action ExtractMethod -vnoremap rem :action ExtractMethod -nnoremap rm :action Move -nnoremap ro :action OptimizeImports -nnoremap rG :action Generate - -" t : +test -nnoremap tt :action RiderUnitTestRunSolutionAction -nnoremap tT :action Rider.UnitTesting.MainMenu - -" u : +ui -nnoremap ui :action ChangeLaf -nnoremap uw :action EditorToggleUseSoftWraps - -" w : +write/window -nnoremap ww :write -nnoremap wa :wall -nnoremap wq :wq -nnoremap W :write -nnoremap wh :action PrevSplitter -nnoremap wi :action NextSplitter -nnoremap wH :action SplitHorizontally -nnoremap wI :action SplitHorizontally -nnoremap wN :action SplitVertically -nnoremap wE :action SplitVertically -nnoremap w- :action SplitHorizontally -nnoremap w| :action SplitVertically -nnoremap w\ :action SplitVertically - -nnoremap :action ParameterInfo -inoremap :action ParameterInfo - -""" Handling Ctrls """ - -sethandler i:ide -sethandler n-v:vim i:ide -sethandler a:ide -sethandler > a:ide diff --git a/common/npmrc b/common/npmrc deleted file mode 100644 index a49e127..0000000 --- a/common/npmrc +++ /dev/null @@ -1 +0,0 @@ -strict-ssl=false diff --git a/common/remote.bashrc b/common/remote.bashrc deleted file mode 100644 index 94147d0..0000000 --- a/common/remote.bashrc +++ /dev/null @@ -1,159 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - #alias grep='grep --color=auto' - #alias fgrep='fgrep --color=auto' - #alias egrep='egrep --color=auto' -fi - -# colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# some more ls aliases -alias ll='ls -l' -alias la='ls -A' -alias l='ls -CF' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -source ~/.nvm/nvm.sh - - -# Append to original bashrc for minimal setup -# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc -bind 'set show-mode-in-prompt on' -set -o vi - -alias svi="sudo vim" # Prevent conflicts with svelte-cli -alias v="vim" - -alias sdocker="sudo docker" -alias scompose="sudo docker compose up -d" -alias sdockerps="sudo docker ps" -alias netl="netstat -tulnp" - -alias apt="sudo apt" -alias apts="apt search" -alias apti="sudo apt install" -alias aptr="sudo apt remove" -alias aptu="sudo apt upgrade && sudo apt update" - -alias l="ls -lah" -alias ll="ls -l" -alias la="ls -lA" - -bind 'set vi-ins-mode-string "sh"' -bind 'set vi-cmd-mode-string "vi"' - - - -PS2=" > " -update_ps1() { - local last_status=$? - if [[ $last_status -eq 0 ]]; then - PS1="\[\e[0;33m\]  \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;32m\]✔\n \$ \[\e[0m\]" - else - PS1="\[\e[0;33m\]  \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;31m\]✘\n \$ \[\e[0m\]" - fi -} - -PROMPT_COMMAND=update_ps1 diff --git a/common/vim.noxdg.vimrc b/common/vim.noxdg.vimrc deleted file mode 100644 index 08b99b8..0000000 --- a/common/vim.noxdg.vimrc +++ /dev/null @@ -1,60 +0,0 @@ - -" Source a global configuration file if available -if filereadable("/etc/vim/vimrc.local") - source /etc/vim/vimrc.local -endif - -" This is a minimal setup of vimrc -" ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc - -" Colemak Keys - -" Arrow remap -noremap n j -noremap e k -noremap i l -nnoremap N 5j -nnoremap E 5k -vnoremap H ^ -xnoremap H ^ -onoremap H ^ -vnoremap I $ -xnoremap I $ -onoremap I $ -noremap I L - -" Similar position to i -noremap l i -noremap L I -" ne[k]st -noremap k n -noremap K N -" [j]ump -noremap j e -noremap J E - -" Normal minimal setup - -noremap Y y$ -set expandtab -set tabstop=4 -set shiftwidth=4 -set autoindent -set smartindent -set wrap -set scrolloff=3 -set hlsearch -set incsearch -set ignorecase -set smartcase -set showcmd -set mouse=a " Enable mouse usage (all modes) - -set number -set relativenumber - -set laststatus=2 -set showcmd -set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [󱑉\ %{strftime('%H:%M:%S')}] - -syntax on diff --git a/common/wakatime.example.cfg b/common/wakatime.example.cfg deleted file mode 100644 index 4d3410b..0000000 --- a/common/wakatime.example.cfg +++ /dev/null @@ -1,19 +0,0 @@ - -[settings] -api_key = FILL_YOUR_API_KEY_HERE -exclude = - ^COMMIT_EDITMSG$ - ^TAG_EDITMSG$ - *.md - *.org - *.txt - *.log -include = - readme.md - README.md - readme.org - README.org - readme.txt - README.txt - readme - README diff --git a/common/NuGet.Config b/dot_config/NuGet/nuget.config old mode 100755 new mode 100644 similarity index 78% rename from common/NuGet.Config rename to dot_config/NuGet/nuget.config index 4a9acec..81596d1 --- a/common/NuGet.Config +++ b/dot_config/NuGet/nuget.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/common/condarc.yaml b/dot_config/conda/dot_condarc similarity index 97% rename from common/condarc.yaml rename to dot_config/conda/dot_condarc index 5c7ef3f..4e9da9b 100644 --- a/common/condarc.yaml +++ b/dot_config/conda/dot_condarc @@ -1,14 +1,14 @@ -# $DOTFILES/common/condarc.yaml -# Date: 2024-12-22 -# Author: js0ny - -# Location: -# $XDG_CONFIG_HOME/conda/.condarc -# Linking: -# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc -# ================================================================================ -# Reference: -# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html - -# Use system python by default for better script compatibility -auto_activate_base: false +# $DOTFILES/common/condarc.yaml +# Date: 2024-12-22 +# Author: js0ny + +# Location: +# $XDG_CONFIG_HOME/conda/.condarc +# Linking: +# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc +# ================================================================================ +# Reference: +# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html + +# Use system python by default for better script compatibility +auto_activate_base: false diff --git a/common/glow.yaml b/dot_config/glow/config.yml similarity index 100% rename from common/glow.yaml rename to dot_config/glow/config.yml diff --git a/common/pip.conf b/dot_config/pip/pip.conf similarity index 98% rename from common/pip.conf rename to dot_config/pip/pip.conf index 75044dc..359fd84 100644 --- a/common/pip.conf +++ b/dot_config/pip/pip.conf @@ -1,5 +1,5 @@ -# $XDG_CONFIG_HOME/pip/pip.conf -# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf -# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf -[global] +# $XDG_CONFIG_HOME/pip/pip.conf +# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf +# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf +[global] # index-url = https://pypi.tuna.tsinghua.edu.cn/simple \ No newline at end of file