mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
Merge branch 'master' of https://www.github.com/js0ny/dotfiles
This commit is contained in:
commit
ee4b1ba440
77 changed files with 5679 additions and 4632 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
|
@ -1,10 +1,6 @@
|
||||||
<!-- $XDG_CONFIG_HOME/NuGet/NuGet.Config -->
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- $Env:APPDATA/NuGet/NuGet.Config -->
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
<!-- https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file -->
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
</packageSources>
|
||||||
<configuration>
|
|
||||||
<packageSources>
|
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
|
||||||
</packageSources>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# $XDG_CONFIG_HOME/conda/condarc.yaml
|
# $XDG_CONFIG_HOME/conda/condarc.yaml
|
||||||
# ==================================================================
|
# ==================================================================
|
||||||
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME\conda\.condarc -Target $DOTFILES\.config\conda\condarc.yaml
|
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME\conda\.condarc -Target $DOTFILES\.config\conda\condarc.yaml
|
||||||
# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
||||||
# ==================================================================
|
# ==================================================================
|
||||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
||||||
auto_activate_base: false
|
auto_activate_base: false
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,20 @@
|
||||||
# $XDG_CONFIG_HOME/git/config
|
# $XDG_CONFIG_HOME/git/config
|
||||||
# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
# %USERPROFILE%\.gitconfig # No XDG support on Windows
|
||||||
# New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig"
|
# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
||||||
[user]
|
# New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig"
|
||||||
name = js0ny
|
[user]
|
||||||
email = json.y@outlook.com
|
name = js0ny
|
||||||
[core]
|
email = json.y@outlook.com
|
||||||
editor = vim
|
[core]
|
||||||
[filter "lfs"]
|
editor = nvim
|
||||||
clean = git-lfs clean -- %f
|
pager = delta
|
||||||
smudge = git-lfs smudge -- %f
|
[interactive]
|
||||||
process = git-lfs filter-process
|
diffFilter = delta --color-only
|
||||||
|
[delta]
|
||||||
|
navigate = true
|
||||||
|
dark = true
|
||||||
|
[filter "lfs"]
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
process = git-lfs filter-process
|
||||||
required = true
|
required = true
|
||||||
|
|
@ -1,152 +1,152 @@
|
||||||
"$XDG_CONFIG_HOME/ideavim/ideavimrc
|
"$XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||||
" New-Item -ItemType SymbolicLink -Path ~\.ideavimrc -Target $DOTFILES\.config\ideavim\ideavimrc.vimrc
|
" New-Item -ItemType SymbolicLink -Path ~\.ideavimrc -Target $DOTFILES\.config\ideavim\ideavimrc.vimrc
|
||||||
" ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
" ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||||
""" Basic Configs """
|
""" Basic Configs """
|
||||||
let mapleader = " " " set <leader> to <space>
|
let mapleader = " " " set <leader> to <space>
|
||||||
|
|
||||||
""" Colemak """
|
""" Colemak """
|
||||||
" Word wrap
|
" Word wrap
|
||||||
noremap n gj
|
noremap n gj
|
||||||
noremap e gk
|
noremap e gk
|
||||||
noremap i l
|
noremap i l
|
||||||
|
|
||||||
" Similar position to i
|
" Similar position to i
|
||||||
noremap l i
|
noremap l i
|
||||||
noremap L I
|
noremap L I
|
||||||
" ne[k]st
|
" ne[k]st
|
||||||
noremap k n
|
noremap k n
|
||||||
noremap K N
|
noremap K N
|
||||||
" [j]ump
|
" [j]ump
|
||||||
noremap j e
|
noremap j e
|
||||||
noremap J E
|
noremap J E
|
||||||
|
|
||||||
" Y to yank to end of line
|
" Y to yank to end of line
|
||||||
noremap Y y$
|
noremap Y y$
|
||||||
|
|
||||||
""" Options """
|
""" Options """
|
||||||
" search for actions: :actionlist <patter>
|
" search for actions: :actionlist <patter>
|
||||||
|
|
||||||
"" Vim Compat ""
|
"" Vim Compat ""
|
||||||
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
|
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
|
||||||
set gdefault " substitute all occurrences in line per default
|
set gdefault " substitute all occurrences in line per default
|
||||||
set history=4096 " keep x lines of command line history
|
set history=4096 " keep x lines of command line history
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set incsearch
|
set incsearch
|
||||||
set keymodel=startsel,stopsel
|
set keymodel=startsel,stopsel
|
||||||
set matchpairs+=<:>
|
set matchpairs+=<:>
|
||||||
set showcmd
|
set showcmd
|
||||||
set smartcase " no ignore case when pattern is uppercase
|
set smartcase " no ignore case when pattern is uppercase
|
||||||
set wrapscan " searches wrap around the end of the file
|
set wrapscan " searches wrap around the end of the file
|
||||||
|
|
||||||
"" IDE Settings ""
|
"" IDE Settings ""
|
||||||
set scrolloff=5
|
set scrolloff=5
|
||||||
set sidescrolloff=10
|
set sidescrolloff=10
|
||||||
|
|
||||||
"" IDE Features ""
|
"" IDE Features ""
|
||||||
set relativenumber " Hybrid Line Number shown
|
set relativenumber " Hybrid Line Number shown
|
||||||
|
|
||||||
"" IdeaVim Only ""
|
"" IdeaVim Only ""
|
||||||
set ideajoin
|
set ideajoin
|
||||||
set ideastatusicon=enabled
|
set ideastatusicon=enabled
|
||||||
|
|
||||||
""" Plugins """
|
""" Plugins """
|
||||||
|
|
||||||
Plug 'justinmk/vim-sneak'
|
Plug 'justinmk/vim-sneak'
|
||||||
Plug 'preservim/nerdtree'
|
Plug 'preservim/nerdtree'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
Plug 'terryma/vim-multiple-cursors'
|
Plug 'terryma/vim-multiple-cursors'
|
||||||
Plug 'machakann/vim-highlightedyank'
|
Plug 'machakann/vim-highlightedyank'
|
||||||
Plug 'easymotion/vim-easymotion'
|
Plug 'easymotion/vim-easymotion'
|
||||||
|
|
||||||
""" Keybindings """
|
""" Keybindings """
|
||||||
|
|
||||||
"" edit ideavim config <leader>v + ""
|
"" edit ideavim config <leader>v + ""
|
||||||
nnoremap <leader>vv :e ~/.ideavimrc<CR>
|
nnoremap <leader>vv :e ~/.ideavimrc<CR>
|
||||||
nnoremap <leader>vr :source ~/.ideavimrc<CR>
|
nnoremap <leader>vr :source ~/.ideavimrc<CR>
|
||||||
|
|
||||||
"" NERDTree ""
|
"" NERDTree ""
|
||||||
nnoremap <leader>e :NERDTreeToggle<CR>
|
nnoremap <leader>e :NERDTreeToggle<CR>
|
||||||
|
|
||||||
"" EasyMotion ""
|
"" EasyMotion ""
|
||||||
nmap s <Plug>(easymotion-f)
|
nmap s <Plug>(easymotion-f)
|
||||||
nmap S <Plug>(easymotion-F)
|
nmap S <Plug>(easymotion-F)
|
||||||
|
|
||||||
"" Sneak ""
|
"" Sneak ""
|
||||||
nmap f <Plug>(sneak-s)
|
nmap f <Plug>(sneak-s)
|
||||||
nmap F <Plug>(sneak-S)
|
nmap F <Plug>(sneak-S)
|
||||||
|
|
||||||
"" Miscs ""
|
"" Miscs ""
|
||||||
nnoremap <leader>: :action GotoAction<CR>
|
nnoremap <leader>: :action GotoAction<CR>
|
||||||
|
|
||||||
"" AI Related <leader>a + ""
|
"" AI Related <leader>a + ""
|
||||||
nnoremap <leader>ac :action copilot.chat.show<CR>
|
nnoremap <leader>ac :action copilot.chat.show<CR>
|
||||||
nnoremap <leader>ad :action copilot.disableCopilot<CR>
|
nnoremap <leader>ad :action copilot.disableCopilot<CR>
|
||||||
nnoremap <leader>ae :action copilot.enableCopilot<CR>
|
nnoremap <leader>ae :action copilot.enableCopilot<CR>
|
||||||
nnoremap <leader>ai :action copilot.openCopilot<CR>
|
nnoremap <leader>ai :action copilot.openCopilot<CR>
|
||||||
|
|
||||||
"" Codes Action <leader>c + ""
|
"" Codes Action <leader>c + ""
|
||||||
nnoremap <leader>cf :action ReformatCode<CR>
|
nnoremap <leader>cf :action ReformatCode<CR>
|
||||||
nnoremap <leader>cs :action GotoSymbol<CR>
|
nnoremap <leader>cs :action GotoSymbol<CR>
|
||||||
nnoremap <leader>c/ :action CommentByLineComment<CR>
|
nnoremap <leader>c/ :action CommentByLineComment<CR>
|
||||||
|
|
||||||
"" Project Action <leader>p + ""
|
"" Project Action <leader>p + ""
|
||||||
nnoremap <leader>pr :action Run<CR>
|
nnoremap <leader>pr :action Run<CR>
|
||||||
nnoremap <leader>pd :action Debug<CR>
|
nnoremap <leader>pd :action Debug<CR>
|
||||||
nnoremap <leader>pb :action Build<CR>
|
nnoremap <leader>pb :action Build<CR>
|
||||||
|
|
||||||
"" Files Action <leader>f + ""
|
"" Files Action <leader>f + ""
|
||||||
nnoremap <leader>fe :NERDTreeToggle<CR>
|
nnoremap <leader>fe :NERDTreeToggle<CR>
|
||||||
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
|
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
|
||||||
|
|
||||||
"" Tab Actions <leader><tab> + ""
|
"" Tab Actions <leader><tab> + ""
|
||||||
nnoremap <leader><tab><tab> :action Switcher<CR>
|
nnoremap <leader><tab><tab> :action Switcher<CR>
|
||||||
|
|
||||||
"" Collapse and Expand z + ""
|
"" Collapse and Expand z + ""
|
||||||
nnoremap zi :action ExpandCollapseToggleAction<CR>
|
nnoremap zi :action ExpandCollapseToggleAction<CR>
|
||||||
nnoremap zc :action CollapseRegion<CR>
|
nnoremap zc :action CollapseRegion<CR>
|
||||||
nnoremap zC :action CollapseRegionRecursively<CR>
|
nnoremap zC :action CollapseRegionRecursively<CR>
|
||||||
nnoremap zM :action CollapseAll<CR>
|
nnoremap zM :action CollapseAll<CR>
|
||||||
nnoremap zo :action ExpandRegion<CR>
|
nnoremap zo :action ExpandRegion<CR>
|
||||||
nnoremap zO :action ExpandRegionRecursively<CR>
|
nnoremap zO :action ExpandRegionRecursively<CR>
|
||||||
nnoremap zR :action ExpandAll<CR>
|
nnoremap zR :action ExpandAll<CR>
|
||||||
|
|
||||||
"" don't lose selection when indenting ""
|
"" don't lose selection when indenting ""
|
||||||
vnoremap < <gv
|
vnoremap < <gv
|
||||||
vnoremap > >gv
|
vnoremap > >gv
|
||||||
vnoremap = =gv
|
vnoremap = =gv
|
||||||
|
|
||||||
|
|
||||||
nnoremap <leader>a :action FindInPath<CR>
|
nnoremap <leader>a :action FindInPath<CR>
|
||||||
nnoremap gd :action GotoDeclaration<CR>
|
nnoremap gd :action GotoDeclaration<CR>
|
||||||
nnoremap gtd :action GotoTypeDeclaration<CR>
|
nnoremap gtd :action GotoTypeDeclaration<CR>
|
||||||
nnoremap gtD :action QuickTypeDefinition<CR>
|
nnoremap gtD :action QuickTypeDefinition<CR>
|
||||||
nnoremap gr :action ShowUsages<CR>
|
nnoremap gr :action ShowUsages<CR>
|
||||||
nnoremap gi :action GotoImplementation<CR>
|
nnoremap gi :action GotoImplementation<CR>
|
||||||
nnoremap gpi :action QuickImplementations<CR>
|
nnoremap gpi :action QuickImplementations<CR>
|
||||||
nnoremap gs :action GotoSuperMethod<CR>
|
nnoremap gs :action GotoSuperMethod<CR>
|
||||||
nnoremap ga :action
|
nnoremap ga :action
|
||||||
nnoremap gq :action ShowIntentionActions<CR>
|
nnoremap gq :action ShowIntentionActions<CR>
|
||||||
nnoremap ge :action GotoNextError<CR>
|
nnoremap ge :action GotoNextError<CR>
|
||||||
|
|
||||||
nnoremap <C-p> :action ParameterInfo<CR>
|
nnoremap <C-p> :action ParameterInfo<CR>
|
||||||
inoremap <C-p> <C-o>:action ParameterInfo<CR>
|
inoremap <C-p> <C-o>:action ParameterInfo<CR>
|
||||||
|
|
||||||
"" Refractor <leader>r + ""
|
"" Refractor <leader>r + ""
|
||||||
|
|
||||||
nnoremap <leader>ri :action Inline<CR>
|
nnoremap <leader>ri :action Inline<CR>
|
||||||
nnoremap <leader>rr :action RenameElement<CR>
|
nnoremap <leader>rr :action RenameElement<CR>
|
||||||
nnoremap <leader>rev :action IntroduceVariable<CR>
|
nnoremap <leader>rev :action IntroduceVariable<CR>
|
||||||
vnoremap <leader>rev :action IntroduceVariable<CR>
|
vnoremap <leader>rev :action IntroduceVariable<CR>
|
||||||
nnoremap <leader>rem :action ExtractMethod<CR>
|
nnoremap <leader>rem :action ExtractMethod<CR>
|
||||||
vnoremap <leader>rem :action ExtractMethod<CR>
|
vnoremap <leader>rem :action ExtractMethod<CR>
|
||||||
nnoremap <leader>rm :action Move<CR>
|
nnoremap <leader>rm :action Move<CR>
|
||||||
nnoremap <leader>ro :action OptimizeImports<CR>
|
nnoremap <leader>ro :action OptimizeImports<CR>
|
||||||
nnoremap <leader>rG :action Generate<CR>
|
nnoremap <leader>rG :action Generate<CR>
|
||||||
|
|
||||||
""" Handling Ctrls """
|
""" Handling Ctrls """
|
||||||
|
|
||||||
sethandler <C-V> n-v:vim i:ide
|
sethandler <C-V> n-v:vim i:ide
|
||||||
sethandler <C-.> a:ide
|
sethandler <C-.> a:ide
|
||||||
sethandler <A-<CR>> a:ide
|
sethandler <A-<CR>> a:ide
|
||||||
|
|
@ -40,4 +40,4 @@ def custom_return(shell):
|
||||||
|
|
||||||
return handle
|
return handle
|
||||||
|
|
||||||
c.TerminalInteractiveShell.handle_return = custom_return
|
c.TerminalInteractiveShell.handle_return = custom_return
|
||||||
|
|
|
||||||
|
|
@ -1,69 +1,69 @@
|
||||||
from prompt_toolkit.key_binding import KeyBindings
|
from prompt_toolkit.key_binding import KeyBindings
|
||||||
from prompt_toolkit.key_binding.vi_state import InputMode
|
from prompt_toolkit.key_binding.vi_state import InputMode
|
||||||
from prompt_toolkit.filters import Condition
|
from prompt_toolkit.filters import Condition
|
||||||
from IPython import get_ipython
|
from IPython import get_ipython
|
||||||
|
|
||||||
ip = get_ipython()
|
ip = get_ipython()
|
||||||
key_bindings = KeyBindings()
|
key_bindings = KeyBindings()
|
||||||
|
|
||||||
@Condition
|
@Condition
|
||||||
def in_navigation_mode():
|
def in_navigation_mode():
|
||||||
return ip.pt_app.app.vi_state.input_mode == InputMode.NAVIGATION
|
return ip.pt_app.app.vi_state.input_mode == InputMode.NAVIGATION
|
||||||
|
|
||||||
# colemak keymap hnei
|
# colemak keymap hnei
|
||||||
@key_bindings.add("n", filter=in_navigation_mode)
|
@key_bindings.add("n", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Move cursor down by visual line"
|
"Move cursor down by visual line"
|
||||||
event.current_buffer.auto_down(count=event.arg)
|
event.current_buffer.auto_down(count=event.arg)
|
||||||
|
|
||||||
@key_bindings.add("e", filter=in_navigation_mode)
|
@key_bindings.add("e", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Move cursor up by visual line"
|
"Move cursor up by visual line"
|
||||||
event.current_buffer.auto_up(count=event.arg)
|
event.current_buffer.auto_up(count=event.arg)
|
||||||
|
|
||||||
@key_bindings.add("i", filter=in_navigation_mode)
|
@key_bindings.add("i", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Move cursor right"
|
"Move cursor right"
|
||||||
event.current_buffer.cursor_right(count=event.arg)
|
event.current_buffer.cursor_right(count=event.arg)
|
||||||
|
|
||||||
# Insert with 'l' and 'L'
|
# Insert with 'l' and 'L'
|
||||||
@key_bindings.add("l", filter=in_navigation_mode)
|
@key_bindings.add("l", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Enter insert mode (similar position to 'i' in Colemak)"
|
"Enter insert mode (similar position to 'i' in Colemak)"
|
||||||
event.app.vi_state.input_mode = InputMode.INSERT
|
event.app.vi_state.input_mode = InputMode.INSERT
|
||||||
|
|
||||||
@key_bindings.add("L", filter=in_navigation_mode)
|
@key_bindings.add("L", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Enter insert mode at the beginning of the line"
|
"Enter insert mode at the beginning of the line"
|
||||||
event.current_buffer.cursor_position += event.current_buffer.document.get_start_of_line_position()
|
event.current_buffer.cursor_position += event.current_buffer.document.get_start_of_line_position()
|
||||||
|
|
||||||
# Ne[k]st
|
# Ne[k]st
|
||||||
@key_bindings.add("k", filter=in_navigation_mode)
|
@key_bindings.add("k", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Find next match"
|
"Find next match"
|
||||||
event.current_buffer.forward_search()
|
event.current_buffer.forward_search()
|
||||||
|
|
||||||
@key_bindings.add("K", filter=in_navigation_mode)
|
@key_bindings.add("K", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Find previous match"
|
"Find previous match"
|
||||||
event.current_buffer.reverse_search()
|
event.current_buffer.reverse_search()
|
||||||
|
|
||||||
# [J]ump
|
# [J]ump
|
||||||
@key_bindings.add("j", filter=in_navigation_mode)
|
@key_bindings.add("j", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Move to end of next word"
|
"Move to end of next word"
|
||||||
event.current_buffer.cursor_right_word()
|
event.current_buffer.cursor_right_word()
|
||||||
|
|
||||||
@key_bindings.add("J", filter=in_navigation_mode)
|
@key_bindings.add("J", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Move to end of next word with capital E"
|
"Move to end of next word with capital E"
|
||||||
event.current_buffer.cursor_right_word(end=True)
|
event.current_buffer.cursor_right_word(end=True)
|
||||||
|
|
||||||
# Yank to end of line with 'Y'
|
# Yank to end of line with 'Y'
|
||||||
@key_bindings.add("Y", filter=in_navigation_mode)
|
@key_bindings.add("Y", filter=in_navigation_mode)
|
||||||
def _(event):
|
def _(event):
|
||||||
"Yank to the end of the line"
|
"Yank to the end of the line"
|
||||||
text_to_yank = event.current_buffer.document.text_after_cursor
|
text_to_yank = event.current_buffer.document.text_after_cursor
|
||||||
event.app.clipboard.set_text(text_to_yank)
|
event.app.clipboard.set_text(text_to_yank)
|
||||||
|
|
||||||
ip.pt_app.key_bindings = key_bindings
|
ip.pt_app.key_bindings = key_bindings
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
from IPython.core.magic import register_line_magic
|
from IPython.core.magic import register_line_magic
|
||||||
|
|
||||||
@register_line_magic
|
@register_line_magic
|
||||||
def ps(cmd):
|
def ps(cmd):
|
||||||
output = get_ipython().getoutput(f"powershell -Command {cmd}")
|
output = get_ipython().getoutput(f"powershell -Command {cmd}")
|
||||||
# If no variable is assigned to the output, print it
|
# If no variable is assigned to the output, print it
|
||||||
if get_ipython().last_execution_result is None:
|
if get_ipython().last_execution_result is None:
|
||||||
print("\n".join(output))
|
print("\n".join(output))
|
||||||
else:
|
else:
|
||||||
return "\n".join(output)
|
return "\n".join(output)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
# $XDG_CONFIG_HOME/lesskey -- less options
|
# $XDG_CONFIG_HOME/lesskey -- less options
|
||||||
# ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
# ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
||||||
# work for less -V > 582, for mac, use brew install less to override the system less
|
# work for less -V > 582, for mac, use brew install less to override the system less
|
||||||
|
|
||||||
# Format: key action
|
# Format: key action
|
||||||
|
|
||||||
# Arrow Remap (hnei -> hjkl)
|
# Arrow Remap (hnei -> hjkl)
|
||||||
n forw-line
|
n forw-line
|
||||||
e back-line
|
e back-line
|
||||||
|
|
||||||
# search with k : ne[k]st
|
# search with k : ne[k]st
|
||||||
k repeat-search
|
k repeat-search
|
||||||
K reverse-search
|
K reverse-search
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"line-length": false,
|
"line-length": false,
|
||||||
"no-inline-html": false,
|
"no-inline-html": false,
|
||||||
"no-alt-text": false,
|
"no-alt-text": false,
|
||||||
"ul-style": { "style": "dash" }
|
"ul-style": { "style": "dash" }
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# ~/.npmrc
|
# ~/.npmrc
|
||||||
# New-Item -ItemType SymbolicLink -Path ~\.npmrc -Target ~\.dotfiles\.npmrc
|
# New-Item -ItemType SymbolicLink -Path ~\.npmrc -Target ~\.dotfiles\.npmrc
|
||||||
# ln -s $DOTFILES/.npmrc ~/.npmrc
|
# ln -s $DOTFILES/.npmrc ~/.npmrc
|
||||||
# registry=https://registry.npmmirror.com
|
# registry=https://registry.npmmirror.com
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
# $XDG_CONFIG_HOME/npm/npmrc
|
# $XDG_CONFIG_HOME/npm/npmrc
|
||||||
# ln -s $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
# ln -s $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||||
# New-Item -ItemType SymbolicLink -Path $env:NPM_CONFIG_USERCONFIG -Value $env:DOTFILES/.config/npm/npmrc
|
# New-Item -ItemType SymbolicLink -Path $env:NPM_CONFIG_USERCONFIG -Value $env:DOTFILES/.config/npm/npmrc
|
||||||
# registry=https://registry.npmmirror.com
|
# registry=https://registry.npmmirror.com
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"neodev": {
|
"neodev": {
|
||||||
"library": {
|
"library": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"plugins": true
|
"plugins": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"neoconf": {
|
"neoconf": {
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"lua_ls": {
|
"lua_ls": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"epwalsh/obsidian.nvim",
|
"epwalsh/obsidian.nvim",
|
||||||
version = "*", -- recommended, use latest release instead of latest commit
|
version = "*", -- recommended, use latest release instead of latest commit
|
||||||
lazy = true,
|
lazy = true,
|
||||||
ft = "markdown",
|
ft = "markdown",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|
@ -19,4 +19,4 @@ return {
|
||||||
|
|
||||||
-- see below for full list of options 👇
|
-- see below for full list of options 👇
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
# Colemak *LazyVim*
|
# Colemak *LazyVim*
|
||||||
|
|
||||||
- Replace the default `hjkl` movement keys with `hnei`
|
- Replace the default `hjkl` movement keys with `hnei`
|
||||||
- `j->e`, `k->n`, `h->h`, `l->i`
|
- `j->e`, `k->n`, `h->h`, `l->i`
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
|
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
|
||||||
```
|
```
|
||||||
|
|
@ -1,2 +1,8 @@
|
||||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
require("config.lazy")
|
if (vim.g.vscode) then
|
||||||
|
print("VSCode detected, skipping lazy loading")
|
||||||
|
require("vscode.code")
|
||||||
|
else
|
||||||
|
require("config.lazy")
|
||||||
|
-- require("config.lazy")
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
-- Add any additional autocmds here
|
-- Add any additional autocmds here
|
||||||
|
|
|
||||||
|
|
@ -1,146 +1,146 @@
|
||||||
-- Keymaps are automatically loaded on the VeryLazy event
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
-- Add any additional keymaps here
|
-- Add any additional keymaps here
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
-- ================= GENERAL KEYBINDS =================
|
-- ================= GENERAL KEYBINDS =================
|
||||||
-- SAVE/QUIT {{{
|
-- SAVE/QUIT {{{
|
||||||
vim.keymap.set("n", "Q", "<cmd>q<CR>", { desc = "Q to quit" })
|
vim.keymap.set("n", "Q", "<cmd>q<CR>", { desc = "Q to quit" })
|
||||||
vim.keymap.set("n", "<C-s>", "<cmd>w<CR>", { desc = "S to write file" })
|
vim.keymap.set("n", "<C-s>", "<cmd>w<CR>", { desc = "S to write file" })
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- NVIM CONFIG SHORTCUTS {{{
|
-- NVIM CONFIG SHORTCUTS {{{
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.keymap.set("n", "<leader>rc", "<cmd>e $HOME/.config/nvim/lua/config/options.lua<CR>", { desc = "Open nvim options.lua" })
|
vim.keymap.set("n", "<leader>rc", "<cmd>e $HOME/.config/nvim/lua/config/options.lua<CR>", { desc = "Open nvim options.lua" })
|
||||||
vim.keymap.set("n", "<leader>rp", "<cmd>e $HOME/.config/nvim/lua/plugins/.<CR>", { desc = "lazy plugins dir" })
|
vim.keymap.set("n", "<leader>rp", "<cmd>e $HOME/.config/nvim/lua/plugins/.<CR>", { desc = "lazy plugins dir" })
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- UNDO
|
-- UNDO
|
||||||
vim.keymap.set({ "n", "v" }, "l", "u", { desc = "Undo" })
|
vim.keymap.set({ "n", "v" }, "l", "u", { desc = "Undo" })
|
||||||
|
|
||||||
-- INSERT
|
-- INSERT
|
||||||
vim.keymap.set({ "n", "v" }, "l", "i", { desc = "Insert" })
|
vim.keymap.set({ "n", "v" }, "l", "i", { desc = "Insert" })
|
||||||
vim.keymap.set({ "n", "v" }, "L", "I", { desc = "Insert at line start" })
|
vim.keymap.set({ "n", "v" }, "L", "I", { desc = "Insert at line start" })
|
||||||
|
|
||||||
-- YANK TO SYSTEM CLIPBOARD
|
-- YANK TO SYSTEM CLIPBOARD
|
||||||
vim.keymap.set("v", "Y", '"+y', { desc = "Copy to (System) Clipboard" })
|
vim.keymap.set("v", "Y", '"+y', { desc = "Copy to (System) Clipboard" })
|
||||||
|
|
||||||
-- SEARCH {{{
|
-- SEARCH {{{
|
||||||
vim.keymap.set("n", "<LEADER><CR>", "<CMD>nohlsearch<CR>", { desc = "clear search highlight" })
|
vim.keymap.set("n", "<LEADER><CR>", "<CMD>nohlsearch<CR>", { desc = "clear search highlight" })
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- SPACE TO TAB{{{
|
-- SPACE TO TAB{{{
|
||||||
vim.keymap.set("n", "<LEADER>tt", "<CMD>%s/ /\t/g<CR>", { desc = "space to tab" })
|
vim.keymap.set("n", "<LEADER>tt", "<CMD>%s/ /\t/g<CR>", { desc = "space to tab" })
|
||||||
vim.keymap.set("v", "<LEADER>tt", "<CMD>s/ /\t/g<CR>", { desc = "space to tab" })
|
vim.keymap.set("v", "<LEADER>tt", "<CMD>s/ /\t/g<CR>", { desc = "space to tab" })
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- MISC {{{
|
-- MISC {{{
|
||||||
vim.keymap.set("n", "<LEADER>o", "za", { desc = "folding" })
|
vim.keymap.set("n", "<LEADER>o", "za", { desc = "folding" })
|
||||||
vim.keymap.set("i", "<C-y>", "<ESC>A {}<ESC>i<CR><ESC>ko", { desc = "insert a pair of {} and goto next line" })
|
vim.keymap.set("i", "<C-y>", "<ESC>A {}<ESC>i<CR><ESC>ko", { desc = "insert a pair of {} and goto next line" })
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- ================= CURSOR MOVEMENT ===================== {{{
|
-- ================= CURSOR MOVEMENT ===================== {{{
|
||||||
-- NEW CURSOR MOVEMENT (ARROW KEY RESIZE WINDOWS)
|
-- NEW CURSOR MOVEMENT (ARROW KEY RESIZE WINDOWS)
|
||||||
-- ^
|
-- ^
|
||||||
-- e
|
-- e
|
||||||
-- < h i >
|
-- < h i >
|
||||||
-- n
|
-- n
|
||||||
-- v
|
-- v
|
||||||
--
|
--
|
||||||
vim.keymap.set({ "n", "v", "", "s", "x" }, "e", "k", { desc = "move cursor ⇧" })
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "e", "k", { desc = "move cursor ⇧" })
|
||||||
vim.keymap.set({ "n", "v", "", "s", "x" }, "n", "j", { desc = "move cursor ⇩" })
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "n", "j", { desc = "move cursor ⇩" })
|
||||||
vim.keymap.set({ "n", "v", "", "s", "x" }, "h", "h", { desc = "move cursor ⇦" })
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "h", "h", { desc = "move cursor ⇦" })
|
||||||
vim.keymap.set({ "n", "v", "", "s", "x" }, "i", "l", { desc = "move cursor ⇨" })
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "i", "l", { desc = "move cursor ⇨" })
|
||||||
|
|
||||||
vim.keymap.set({ "n", "v" }, "E", "5k", { desc = "Move 5up K -> U" })
|
vim.keymap.set({ "n", "v" }, "E", "5k", { desc = "Move 5up K -> U" })
|
||||||
vim.keymap.set({ "n", "v" }, "N", "5j", { desc = "Move 5down J -> E" })
|
vim.keymap.set({ "n", "v" }, "N", "5j", { desc = "Move 5down J -> E" })
|
||||||
|
|
||||||
vim.keymap.set({ "n", "v" }, "H", "0", { desc = "Move start of line" })
|
vim.keymap.set({ "n", "v" }, "H", "0", { desc = "Move start of line" })
|
||||||
vim.keymap.set({ "n", "v" }, "I", "$", { desc = "Move end of line" })
|
vim.keymap.set({ "n", "v" }, "I", "$", { desc = "Move end of line" })
|
||||||
|
|
||||||
vim.keymap.set("n", "gu", "gk", { desc = "move up gk -> gu" })
|
vim.keymap.set("n", "gu", "gk", { desc = "move up gk -> gu" })
|
||||||
vim.keymap.set("n", "ge", "gj", { desc = "move down gj -> ge" })
|
vim.keymap.set("n", "ge", "gj", { desc = "move down gj -> ge" })
|
||||||
|
|
||||||
vim.keymap.set("n", "\v", "v$h", { desc = "???" })
|
vim.keymap.set("n", "\v", "v$h", { desc = "???" })
|
||||||
|
|
||||||
-- FASTER IN-LINE NAVIGATION
|
-- FASTER IN-LINE NAVIGATION
|
||||||
|
|
||||||
-- SET h (SAME AS n, CURSOR LEFT) TO 'END OF WORD'
|
-- SET h (SAME AS n, CURSOR LEFT) TO 'END OF WORD'
|
||||||
vim.keymap.set("n", "j", "e", { desc = "Move cursor to end of word" })
|
vim.keymap.set("n", "j", "e", { desc = "Move cursor to end of word" })
|
||||||
-- CTRL + U OR E WILL MOVE UP/DOWN THE VIEW PORT WITHOUT MOVING THE CURSOR
|
-- CTRL + U OR E WILL MOVE UP/DOWN THE VIEW PORT WITHOUT MOVING THE CURSOR
|
||||||
|
|
||||||
vim.keymap.set({ "n", "v" }, "<C-e>", "5<C-y>", { desc = "Move viewport ⇧" })
|
vim.keymap.set({ "n", "v" }, "<C-e>", "5<C-y>", { desc = "Move viewport ⇧" })
|
||||||
vim.keymap.set({ "n", "v" }, "<C-n>", "5<C-e>", { desc = "Move viewport ⇩" })
|
vim.keymap.set({ "n", "v" }, "<C-n>", "5<C-e>", { desc = "Move viewport ⇩" })
|
||||||
|
|
||||||
-- INSERT MODE CURSOR MOVEMENT
|
-- INSERT MODE CURSOR MOVEMENT
|
||||||
vim.keymap.set("i", "<C-a>", "<ESC>A")
|
vim.keymap.set("i", "<C-a>", "<ESC>A")
|
||||||
|
|
||||||
-- COMMAND MODE CURSOR MOVEMENT
|
-- COMMAND MODE CURSOR MOVEMENT
|
||||||
vim.keymap.set("c", "<C-a>", "<Home>")
|
vim.keymap.set("c", "<C-a>", "<Home>")
|
||||||
vim.keymap.set("c", "<C-e>", "<End>")
|
vim.keymap.set("c", "<C-e>", "<End>")
|
||||||
vim.keymap.set("c", "<C-p>", "<Up>")
|
vim.keymap.set("c", "<C-p>", "<Up>")
|
||||||
vim.keymap.set("c", "<C-n>", "<Down>")
|
vim.keymap.set("c", "<C-n>", "<Down>")
|
||||||
vim.keymap.set("c", "<C-b>", "<Left>")
|
vim.keymap.set("c", "<C-b>", "<Left>")
|
||||||
vim.keymap.set("c", "<C-f>", "<Right>")
|
vim.keymap.set("c", "<C-f>", "<Right>")
|
||||||
vim.keymap.set("c", "<M-b>", "<S-Left>")
|
vim.keymap.set("c", "<M-b>", "<S-Left>")
|
||||||
vim.keymap.set("c", "<M-w>", "<S-Right>")
|
vim.keymap.set("c", "<M-w>", "<S-Right>")
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- ================= SPLIT MANAGMENT ===================== {{{
|
-- ================= SPLIT MANAGMENT ===================== {{{
|
||||||
vim.keymap.set("n", "<C-w>E", "<CMD>set nosplitbelow<CR><CMD>split<CR><CMD>set splitbelow<CR>", { desc = "Split ⇧" })
|
vim.keymap.set("n", "<C-w>E", "<CMD>set nosplitbelow<CR><CMD>split<CR><CMD>set splitbelow<CR>", { desc = "Split ⇧" })
|
||||||
vim.keymap.set("n", "<C-w>N", "<CMD>set splitbelow<CR><CMD>split<CR>", { desc = "Split ⇩" })
|
vim.keymap.set("n", "<C-w>N", "<CMD>set splitbelow<CR><CMD>split<CR>", { desc = "Split ⇩" })
|
||||||
vim.keymap.set("n", "<C-w>H", "<CMD>set nosplitright<CR><CMD>vsplit<CR><CMD>set splitright<CR>", { desc = "Split ⇦" })
|
vim.keymap.set("n", "<C-w>H", "<CMD>set nosplitright<CR><CMD>vsplit<CR><CMD>set splitright<CR>", { desc = "Split ⇦" })
|
||||||
vim.keymap.set("n", "<C-w>I", "<CMD>set splitright<CR><CMD>vsplit<CR>", { desc = "Split ⇨" })
|
vim.keymap.set("n", "<C-w>I", "<CMD>set splitright<CR><CMD>vsplit<CR>", { desc = "Split ⇨" })
|
||||||
|
|
||||||
vim.keymap.set({ "n", "t" }, "<C-w>e", "<C-w>k", { desc = "Move cursor to split ⇧" })
|
vim.keymap.set({ "n", "t" }, "<C-w>e", "<C-w>k", { desc = "Move cursor to split ⇧" })
|
||||||
vim.keymap.set({ "n", "t" }, "<C-w>n", "<C-w>j", { desc = "Move cursor to split ⇩" })
|
vim.keymap.set({ "n", "t" }, "<C-w>n", "<C-w>j", { desc = "Move cursor to split ⇩" })
|
||||||
vim.keymap.set({ "n", "t" }, "<C-w>h", "<C-w>h", { desc = "Move cursor to split ⇦" })
|
vim.keymap.set({ "n", "t" }, "<C-w>h", "<C-w>h", { desc = "Move cursor to split ⇦" })
|
||||||
vim.keymap.set({ "n", "t" }, "<C-w>i", "<C-w>l", { desc = "Move cursor to split ⇨" })
|
vim.keymap.set({ "n", "t" }, "<C-w>i", "<C-w>l", { desc = "Move cursor to split ⇨" })
|
||||||
|
|
||||||
vim.keymap.set({ "n", "t" }, "<C-e>", "<C-k>", { desc = "Move cursor to split ⇧" })
|
vim.keymap.set({ "n", "t" }, "<C-e>", "<C-k>", { desc = "Move cursor to split ⇧" })
|
||||||
vim.keymap.set({ "n", "t" }, "<C-n>", "<C-j>", { desc = "Move cursor to split ⇩" })
|
vim.keymap.set({ "n", "t" }, "<C-n>", "<C-j>", { desc = "Move cursor to split ⇩" })
|
||||||
vim.keymap.set({ "n", "t" }, "<C-h>", "<C-h>", { desc = "Move cursor to split ⇦" })
|
vim.keymap.set({ "n", "t" }, "<C-h>", "<C-h>", { desc = "Move cursor to split ⇦" })
|
||||||
vim.keymap.set({ "n", "t" }, "<C-i>", "<C-l>", { desc = "Move cursor to split ⇨" })
|
vim.keymap.set({ "n", "t" }, "<C-i>", "<C-l>", { desc = "Move cursor to split ⇨" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<up>", "<CMD>res -5<CR>", { desc = "Resize split 0,-5" })
|
vim.keymap.set("n", "<up>", "<CMD>res -5<CR>", { desc = "Resize split 0,-5" })
|
||||||
vim.keymap.set("n", "<down>", "<CMD>res +5<CR>", { desc = "Resize split 0,+5" })
|
vim.keymap.set("n", "<down>", "<CMD>res +5<CR>", { desc = "Resize split 0,+5" })
|
||||||
vim.keymap.set("n", "<left>", "<CMD>vertical resize +5<CR>", { desc = "Resize split +5,0" })
|
vim.keymap.set("n", "<left>", "<CMD>vertical resize +5<CR>", { desc = "Resize split +5,0" })
|
||||||
vim.keymap.set("n", "<right>", "<CMD>vertical resize -5<CR>", { desc = "Resize split -5,0" })
|
vim.keymap.set("n", "<right>", "<CMD>vertical resize -5<CR>", { desc = "Resize split -5,0" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-w>H", "<C-w>t<C-w>K", { desc = "Make splits [H]orizontal" })
|
vim.keymap.set("n", "<C-w>H", "<C-w>t<C-w>K", { desc = "Make splits [H]orizontal" })
|
||||||
vim.keymap.set("n", "<C-w>V", "<C-w>t<C-w>H", { desc = "Make splits [V]ertical" })
|
vim.keymap.set("n", "<C-w>V", "<C-w>t<C-w>H", { desc = "Make splits [V]ertical" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-w>ri", "<C-w>b<C-w>K", { desc = "Rotate splits 90" })
|
vim.keymap.set("n", "<C-w>ri", "<C-w>b<C-w>K", { desc = "Rotate splits 90" })
|
||||||
vim.keymap.set("n", "<C-w>rh", "<C-w>b<C-w>H", { desc = "Rotate splits -90" })
|
vim.keymap.set("n", "<C-w>rh", "<C-w>b<C-w>H", { desc = "Rotate splits -90" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<LEADER>q", "<C-w>j<CMD>q<CR>", { desc = "Close Split ⇩ (Below)" })
|
vim.keymap.set("n", "<LEADER>q", "<C-w>j<CMD>q<CR>", { desc = "Close Split ⇩ (Below)" })
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
-- TAB MANAGEMENT {{{
|
-- TAB MANAGEMENT {{{
|
||||||
vim.keymap.set("n", "<TAB><TAB>", "<CMD>tabe<CR>", { desc = "New [Tab]" })
|
vim.keymap.set("n", "<TAB><TAB>", "<CMD>tabe<CR>", { desc = "New [Tab]" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<TAB>h", "<CMD>-tabnext<CR>", { desc = "Select Tab ⇦" })
|
vim.keymap.set("n", "<TAB>h", "<CMD>-tabnext<CR>", { desc = "Select Tab ⇦" })
|
||||||
vim.keymap.set("n", "<TAB>i", "<CMD>+tabnext<CR>", { desc = "Select Tab ⇨" })
|
vim.keymap.set("n", "<TAB>i", "<CMD>+tabnext<CR>", { desc = "Select Tab ⇨" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<TAB>H", "<CMD>-tabmove<CR>", { desc = "Tab move ⇦" })
|
vim.keymap.set("n", "<TAB>H", "<CMD>-tabmove<CR>", { desc = "Tab move ⇦" })
|
||||||
vim.keymap.set("n", "<TAB>I", "<CMD>+tabmove<CR>", { desc = "Tab move ⇨" })
|
vim.keymap.set("n", "<TAB>I", "<CMD>+tabmove<CR>", { desc = "Tab move ⇨" })
|
||||||
|
|
||||||
-- NOTE: Doesn't seem to work:
|
-- NOTE: Doesn't seem to work:
|
||||||
-- vim.keymap.set("n", "<TAB>c", "<CMD>tab split<CR>", { desc = "New Tab from [C]urrent" })
|
-- vim.keymap.set("n", "<TAB>c", "<CMD>tab split<CR>", { desc = "New Tab from [C]urrent" })
|
||||||
-- vim.keymap.set('n', '<LEADER>dw', '/\(\<\w\+\>\)\_s*\1', {desc='adjacent duplicate words'})
|
-- vim.keymap.set('n', '<LEADER>dw', '/\(\<\w\+\>\)\_s*\1', {desc='adjacent duplicate words'})
|
||||||
|
|
||||||
--vim.keymap.del("n", "<C-w>j")
|
--vim.keymap.del("n", "<C-w>j")
|
||||||
--vim.keymap.del("n", "<C-w>k")
|
--vim.keymap.del("n", "<C-w>k")
|
||||||
--vim.keymap.del("n", "<C-w>l")
|
--vim.keymap.del("n", "<C-w>l")
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- =================== TERM BEHAVIORS ====================
|
-- =================== TERM BEHAVIORS ====================
|
||||||
vim.keymap.set("t", "<C-n>", "<C-\\><C-n>", { desc = "escape terminal, allowing excmds" })
|
vim.keymap.set("t", "<C-n>", "<C-\\><C-n>", { desc = "escape terminal, allowing excmds" })
|
||||||
vim.keymap.set("t", "<C-o>", "<C-\\><C-n><C-o>", { desc = "close terminal" })
|
vim.keymap.set("t", "<C-o>", "<C-\\><C-n><C-o>", { desc = "close terminal" })
|
||||||
|
|
||||||
--vim: set fdm=marker fdl=0
|
--vim: set fdm=marker fdl=0
|
||||||
|
|
||||||
-- buffers
|
-- buffers
|
||||||
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||||
vim.keymap.set("n", "<S-i>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
vim.keymap.set("n", "<S-i>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||||
|
|
|
||||||
|
|
@ -1,53 +1,53 @@
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import/override with your plugins
|
-- import/override with your plugins
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
defaults = {
|
defaults = {
|
||||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
lazy = false,
|
lazy = false,
|
||||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
-- have outdated releases, which may break your Neovim install.
|
-- have outdated releases, which may break your Neovim install.
|
||||||
version = false, -- always use the latest git commit
|
version = false, -- always use the latest git commit
|
||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
},
|
},
|
||||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
checker = {
|
checker = {
|
||||||
enabled = true, -- check for plugin updates periodically
|
enabled = true, -- check for plugin updates periodically
|
||||||
notify = false, -- notify on update
|
notify = false, -- notify on update
|
||||||
}, -- automatically check for plugin updates
|
}, -- automatically check for plugin updates
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
-- disable some rtp plugins
|
-- disable some rtp plugins
|
||||||
disabled_plugins = {
|
disabled_plugins = {
|
||||||
"gzip",
|
"gzip",
|
||||||
-- "matchit",
|
-- "matchit",
|
||||||
-- "matchparen",
|
-- "matchparen",
|
||||||
-- "netrwPlugin",
|
-- "netrwPlugin",
|
||||||
"tarPlugin",
|
"tarPlugin",
|
||||||
"tohtml",
|
"tohtml",
|
||||||
"tutor",
|
"tutor",
|
||||||
"zipPlugin",
|
"zipPlugin",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
|
|
|
||||||
|
|
@ -1,54 +1,54 @@
|
||||||
return {
|
return {
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
opts = {
|
opts = {
|
||||||
integrations = {
|
integrations = {
|
||||||
aerial = true,
|
aerial = true,
|
||||||
alpha = true,
|
alpha = true,
|
||||||
cmp = true,
|
cmp = true,
|
||||||
dashboard = true,
|
dashboard = true,
|
||||||
flash = true,
|
flash = true,
|
||||||
grug_far = true,
|
grug_far = true,
|
||||||
gitsigns = true,
|
gitsigns = true,
|
||||||
headlines = true,
|
headlines = true,
|
||||||
illuminate = true,
|
illuminate = true,
|
||||||
indent_blankline = { enabled = true },
|
indent_blankline = { enabled = true },
|
||||||
leap = true,
|
leap = true,
|
||||||
lsp_trouble = true,
|
lsp_trouble = true,
|
||||||
mason = true,
|
mason = true,
|
||||||
markdown = true,
|
markdown = true,
|
||||||
mini = true,
|
mini = true,
|
||||||
native_lsp = {
|
native_lsp = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
underlines = {
|
underlines = {
|
||||||
errors = { "undercurl" },
|
errors = { "undercurl" },
|
||||||
hints = { "undercurl" },
|
hints = { "undercurl" },
|
||||||
warnings = { "undercurl" },
|
warnings = { "undercurl" },
|
||||||
information = { "undercurl" },
|
information = { "undercurl" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
navic = { enabled = true, custom_bg = "lualine" },
|
navic = { enabled = true, custom_bg = "lualine" },
|
||||||
neotest = true,
|
neotest = true,
|
||||||
neotree = true,
|
neotree = true,
|
||||||
noice = true,
|
noice = true,
|
||||||
notify = true,
|
notify = true,
|
||||||
semantic_tokens = true,
|
semantic_tokens = true,
|
||||||
telescope = true,
|
telescope = true,
|
||||||
treesitter = true,
|
treesitter = true,
|
||||||
treesitter_context = true,
|
treesitter_context = true,
|
||||||
which_key = true,
|
which_key = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
specs = {
|
specs = {
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
if (vim.g.colors_name or ""):find("catppuccin") then
|
if (vim.g.colors_name or ""):find("catppuccin") then
|
||||||
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
|
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
return {
|
return {
|
||||||
-- add gruvbox
|
-- add gruvbox
|
||||||
{ "ellisonleao/gruvbox.nvim" },
|
{ "ellisonleao/gruvbox.nvim" },
|
||||||
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||||
|
|
||||||
-- Configure LazyVim to load gruvbox
|
-- Configure LazyVim to load gruvbox
|
||||||
{
|
{
|
||||||
"LazyVim/LazyVim",
|
"LazyVim/LazyVim",
|
||||||
opts = {
|
opts = {
|
||||||
colorscheme = "catppuccin",
|
colorscheme = "catppuccin",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,197 +1,197 @@
|
||||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
if true then return {} end
|
if true then return {} end
|
||||||
|
|
||||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||||
--
|
--
|
||||||
-- In your plugin files, you can:
|
-- In your plugin files, you can:
|
||||||
-- * add extra plugins
|
-- * add extra plugins
|
||||||
-- * disable/enabled LazyVim plugins
|
-- * disable/enabled LazyVim plugins
|
||||||
-- * override the configuration of LazyVim plugins
|
-- * override the configuration of LazyVim plugins
|
||||||
return {
|
return {
|
||||||
-- add gruvbox
|
-- add gruvbox
|
||||||
{ "ellisonleao/gruvbox.nvim" },
|
{ "ellisonleao/gruvbox.nvim" },
|
||||||
|
|
||||||
-- Configure LazyVim to load gruvbox
|
-- Configure LazyVim to load gruvbox
|
||||||
{
|
{
|
||||||
"LazyVim/LazyVim",
|
"LazyVim/LazyVim",
|
||||||
opts = {
|
opts = {
|
||||||
colorscheme = "gruvbox",
|
colorscheme = "gruvbox",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- change trouble config
|
-- change trouble config
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
-- opts will be merged with the parent spec
|
-- opts will be merged with the parent spec
|
||||||
opts = { use_diagnostic_signs = true },
|
opts = { use_diagnostic_signs = true },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- disable trouble
|
-- disable trouble
|
||||||
{ "folke/trouble.nvim", enabled = false },
|
{ "folke/trouble.nvim", enabled = false },
|
||||||
|
|
||||||
-- override nvim-cmp and add cmp-emoji
|
-- override nvim-cmp and add cmp-emoji
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = { "hrsh7th/cmp-emoji" },
|
dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
---@param opts cmp.ConfigSchema
|
---@param opts cmp.ConfigSchema
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.sources, { name = "emoji" })
|
table.insert(opts.sources, { name = "emoji" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- change some telescope options and a keymap to browse plugin files
|
-- change some telescope options and a keymap to browse plugin files
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
keys = {
|
keys = {
|
||||||
-- add a keymap to browse plugin files
|
-- add a keymap to browse plugin files
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
"<leader>fp",
|
"<leader>fp",
|
||||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||||
desc = "Find Plugin File",
|
desc = "Find Plugin File",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- change some options
|
-- change some options
|
||||||
opts = {
|
opts = {
|
||||||
defaults = {
|
defaults = {
|
||||||
layout_strategy = "horizontal",
|
layout_strategy = "horizontal",
|
||||||
layout_config = { prompt_position = "top" },
|
layout_config = { prompt_position = "top" },
|
||||||
sorting_strategy = "ascending",
|
sorting_strategy = "ascending",
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- add pyright to lspconfig
|
-- add pyright to lspconfig
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
---@class PluginLspOpts
|
---@class PluginLspOpts
|
||||||
opts = {
|
opts = {
|
||||||
---@type lspconfig.options
|
---@type lspconfig.options
|
||||||
servers = {
|
servers = {
|
||||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||||
pyright = {},
|
pyright = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"jose-elias-alvarez/typescript.nvim",
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
init = function()
|
init = function()
|
||||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
---@class PluginLspOpts
|
---@class PluginLspOpts
|
||||||
opts = {
|
opts = {
|
||||||
---@type lspconfig.options
|
---@type lspconfig.options
|
||||||
servers = {
|
servers = {
|
||||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||||
tsserver = {},
|
tsserver = {},
|
||||||
},
|
},
|
||||||
-- you can do any additional lsp server setup here
|
-- you can do any additional lsp server setup here
|
||||||
-- return true if you don't want this server to be setup with lspconfig
|
-- return true if you don't want this server to be setup with lspconfig
|
||||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||||
setup = {
|
setup = {
|
||||||
-- example to setup with typescript.nvim
|
-- example to setup with typescript.nvim
|
||||||
tsserver = function(_, opts)
|
tsserver = function(_, opts)
|
||||||
require("typescript").setup({ server = opts })
|
require("typescript").setup({ server = opts })
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
-- Specify * to use this function as a fallback for any server
|
-- Specify * to use this function as a fallback for any server
|
||||||
-- ["*"] = function(server, opts) end,
|
-- ["*"] = function(server, opts) end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
|
||||||
-- add more treesitter parsers
|
-- add more treesitter parsers
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"bash",
|
"bash",
|
||||||
"html",
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
"lua",
|
"lua",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"python",
|
"python",
|
||||||
"query",
|
"query",
|
||||||
"regex",
|
"regex",
|
||||||
"tsx",
|
"tsx",
|
||||||
"typescript",
|
"typescript",
|
||||||
"vim",
|
"vim",
|
||||||
"yaml",
|
"yaml",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||||
-- would overwrite `ensure_installed` with the new value.
|
-- would overwrite `ensure_installed` with the new value.
|
||||||
-- If you'd rather extend the default config, use the code below instead:
|
-- If you'd rather extend the default config, use the code below instead:
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
-- add tsx and treesitter
|
-- add tsx and treesitter
|
||||||
vim.list_extend(opts.ensure_installed, {
|
vim.list_extend(opts.ensure_installed, {
|
||||||
"tsx",
|
"tsx",
|
||||||
"typescript",
|
"typescript",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- the opts function can also be used to change the default opts:
|
-- the opts function can also be used to change the default opts:
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
table.insert(opts.sections.lualine_x, {
|
table.insert(opts.sections.lualine_x, {
|
||||||
function()
|
function()
|
||||||
return "😄"
|
return "😄"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- or you can return new options to override all the defaults
|
-- or you can return new options to override all the defaults
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function()
|
opts = function()
|
||||||
return {
|
return {
|
||||||
--[[add your custom lualine config here]]
|
--[[add your custom lualine config here]]
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- use mini.starter instead of alpha
|
-- use mini.starter instead of alpha
|
||||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||||
|
|
||||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|
||||||
-- add any tools you want to have installed below
|
-- add any tools you want to have installed below
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"stylua",
|
"stylua",
|
||||||
"shellcheck",
|
"shellcheck",
|
||||||
"shfmt",
|
"shfmt",
|
||||||
"flake8",
|
"flake8",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
.config/nvim/lua/plugins/just.lua
Normal file
4
.config/nvim/lua/plugins/just.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
return {
|
||||||
|
"NoahTheDuke/vim-just",
|
||||||
|
ft = { "just" },
|
||||||
|
}
|
||||||
|
|
@ -1,127 +1,127 @@
|
||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>fe",
|
"<leader>fe",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||||
end,
|
end,
|
||||||
desc = "Explorer NeoTree (Root Dir)",
|
desc = "Explorer NeoTree (Root Dir)",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fE",
|
"<leader>fE",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||||
end,
|
end,
|
||||||
desc = "Explorer NeoTree (cwd)",
|
desc = "Explorer NeoTree (cwd)",
|
||||||
},
|
},
|
||||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||||
{
|
{
|
||||||
"<leader>ge",
|
"<leader>ge",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||||
end,
|
end,
|
||||||
desc = "Git Explorer",
|
desc = "Git Explorer",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>be",
|
"<leader>be",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||||
end,
|
end,
|
||||||
desc = "Buffer Explorer",
|
desc = "Buffer Explorer",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
deactivate = function()
|
deactivate = function()
|
||||||
vim.cmd([[Neotree close]])
|
vim.cmd([[Neotree close]])
|
||||||
end,
|
end,
|
||||||
init = function()
|
init = function()
|
||||||
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
||||||
-- because `cwd` is not set up properly.
|
-- because `cwd` is not set up properly.
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||||
desc = "Start Neo-tree with directory",
|
desc = "Start Neo-tree with directory",
|
||||||
once = true,
|
once = true,
|
||||||
callback = function()
|
callback = function()
|
||||||
if package.loaded["neo-tree"] then
|
if package.loaded["neo-tree"] then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||||
if stats and stats.type == "directory" then
|
if stats and stats.type == "directory" then
|
||||||
require("neo-tree")
|
require("neo-tree")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
sources = { "filesystem", "buffers", "git_status" },
|
sources = { "filesystem", "buffers", "git_status" },
|
||||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||||
filesystem = {
|
filesystem = {
|
||||||
bind_to_cwd = false,
|
bind_to_cwd = false,
|
||||||
follow_current_file = { enabled = true },
|
follow_current_file = { enabled = true },
|
||||||
use_libuv_file_watcher = true,
|
use_libuv_file_watcher = true,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
-- MARKED
|
-- MARKED
|
||||||
["i"] = "open",
|
["i"] = "open",
|
||||||
-- MARKED
|
-- MARKED
|
||||||
["e"] = "noop",
|
["e"] = "noop",
|
||||||
["h"] = "close_node",
|
["h"] = "close_node",
|
||||||
["<space>"] = "none",
|
["<space>"] = "none",
|
||||||
["Y"] = {
|
["Y"] = {
|
||||||
function(state)
|
function(state)
|
||||||
local node = state.tree:get_node()
|
local node = state.tree:get_node()
|
||||||
local path = node:get_id()
|
local path = node:get_id()
|
||||||
vim.fn.setreg("+", path, "c")
|
vim.fn.setreg("+", path, "c")
|
||||||
end,
|
end,
|
||||||
desc = "Copy Path to Clipboard",
|
desc = "Copy Path to Clipboard",
|
||||||
},
|
},
|
||||||
["O"] = {
|
["O"] = {
|
||||||
function(state)
|
function(state)
|
||||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||||
end,
|
end,
|
||||||
desc = "Open with System Application",
|
desc = "Open with System Application",
|
||||||
},
|
},
|
||||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
default_component_configs = {
|
default_component_configs = {
|
||||||
indent = {
|
indent = {
|
||||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
expander_collapsed = "",
|
expander_collapsed = "",
|
||||||
expander_expanded = "",
|
expander_expanded = "",
|
||||||
expander_highlight = "NeoTreeExpander",
|
expander_highlight = "NeoTreeExpander",
|
||||||
},
|
},
|
||||||
git_status = {
|
git_status = {
|
||||||
symbols = {
|
symbols = {
|
||||||
unstaged = "",
|
unstaged = "",
|
||||||
staged = "",
|
staged = "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local function on_move(data)
|
local function on_move(data)
|
||||||
LazyVim.lsp.on_rename(data.source, data.destination)
|
LazyVim.lsp.on_rename(data.source, data.destination)
|
||||||
end
|
end
|
||||||
|
|
||||||
local events = require("neo-tree.events")
|
local events = require("neo-tree.events")
|
||||||
opts.event_handlers = opts.event_handlers or {}
|
opts.event_handlers = opts.event_handlers or {}
|
||||||
vim.list_extend(opts.event_handlers, {
|
vim.list_extend(opts.event_handlers, {
|
||||||
{ event = events.FILE_MOVED, handler = on_move },
|
{ event = events.FILE_MOVED, handler = on_move },
|
||||||
{ event = events.FILE_RENAMED, handler = on_move },
|
{ event = events.FILE_RENAMED, handler = on_move },
|
||||||
})
|
})
|
||||||
require("neo-tree").setup(opts)
|
require("neo-tree").setup(opts)
|
||||||
vim.api.nvim_create_autocmd("TermClose", {
|
vim.api.nvim_create_autocmd("TermClose", {
|
||||||
pattern = "*lazygit",
|
pattern = "*lazygit",
|
||||||
callback = function()
|
callback = function()
|
||||||
if package.loaded["neo-tree.sources.git_status"] then
|
if package.loaded["neo-tree.sources.git_status"] then
|
||||||
require("neo-tree.sources.git_status").refresh()
|
require("neo-tree.sources.git_status").refresh()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
return {
|
return {
|
||||||
{ 'wakatime/vim-wakatime', lazy = false },
|
{ 'wakatime/vim-wakatime', lazy = false },
|
||||||
}
|
}
|
||||||
40
.config/nvim/lua/vscode/keymaps.lua
Normal file
40
.config/nvim/lua/vscode/keymaps.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
local keymap = vim.keymap.set
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "e", "k", { desc = "move cursor ⇧" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "n", "j", { desc = "move cursor ⇩" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "h", "h", { desc = "move cursor ⇦" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "i", "l", { desc = "move cursor ⇨" })
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "N", "J", { desc = "Insert at the line start" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "E", "K", { desc = "Insert at the line start" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "I", "L", { desc = "Insert at the line start" })
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "l", "i", { desc = "Insert mode" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "L", "I", { desc = "Insert at the line start" })
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "k", "n", { desc = "Insert at the line start" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "K", "N", { desc = "Insert at the line start" })
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "j", "e", { desc = "Insert at the line start" })
|
||||||
|
vim.keymap.set({ "n", "v", "", "s", "x" }, "J", "E", { desc = "Insert at the line start" })
|
||||||
|
|
||||||
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.tabstop = 5
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.autoindent = true
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.wrap = true
|
||||||
|
vim.opt.scrolloff = 3
|
||||||
|
vim.opt.hlsearch = true
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
vim.opt.ignorecase = true
|
||||||
|
vim.opt.smartcase = true
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- VSCode commands
|
||||||
|
keymap({ "n", "v" }, "<leader>pp", "<cmd>lua require('vscode').action('workbench.view.extension.project-manager')<CR>")
|
||||||
|
keymap({ "n", "v" }, "<leader>pP", "<cmd>lua require('vscode').action('projectManager.listProjects')<CR>")
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
indent_type = "Spaces"
|
indent_type = "Spaces"
|
||||||
indent_width = 2
|
indent_width = 2
|
||||||
column_width = 120
|
column_width = 120
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# $XDG_CONFIG_HOME/pip/pip.conf
|
# $XDG_CONFIG_HOME/pip/pip.conf
|
||||||
# ln -sf $DOTFILES/.config/pip/pip.conf $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
|
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf
|
||||||
[global]
|
[global]
|
||||||
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
@ -1,202 +1,202 @@
|
||||||
# starship.toml
|
# starship.toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||||
|
|
||||||
add_newline = true
|
add_newline = true
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
disabled = false
|
disabled = false
|
||||||
format = '[\[$time\]](purple)'
|
format = '[\[$time\]](purple)'
|
||||||
time_format = '%H:%M'
|
time_format = '%H:%M'
|
||||||
|
|
||||||
[username]
|
[username]
|
||||||
format = '[$user](bold)'
|
format = '[$user](bold)'
|
||||||
show_always = true
|
show_always = true
|
||||||
|
|
||||||
[hostname]
|
[hostname]
|
||||||
ssh_only = false
|
ssh_only = false
|
||||||
ssh_symbol = ' '
|
ssh_symbol = ' '
|
||||||
|
|
||||||
[directory]
|
[directory]
|
||||||
truncation_length = 2
|
truncation_length = 2
|
||||||
truncate_to_repo = true
|
truncate_to_repo = true
|
||||||
read_only = " "
|
read_only = " "
|
||||||
style ="bold cyan"
|
style ="bold cyan"
|
||||||
truncation_symbol = ".../"
|
truncation_symbol = ".../"
|
||||||
|
|
||||||
[directory.substitutions]
|
[directory.substitutions]
|
||||||
"~/Documents" = " "
|
"~/Documents" = " "
|
||||||
"~/Downloads" = " "
|
"~/Downloads" = " "
|
||||||
"~/Music" = " "
|
"~/Music" = " "
|
||||||
"~/Pictures" = " "
|
"~/Pictures" = " "
|
||||||
"Source" = " "
|
"Source" = " "
|
||||||
"src" = " "
|
"src" = " "
|
||||||
|
|
||||||
[aws]
|
[aws]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[buf]
|
[buf]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[c]
|
[c]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[dart]
|
[dart]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
|
|
||||||
[docker_context]
|
[docker_context]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[elixir]
|
[elixir]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[elm]
|
[elm]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[fennel]
|
[fennel]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[fossil_branch]
|
[fossil_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[git_branch]
|
[git_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[git_commit]
|
[git_commit]
|
||||||
tag_symbol = ' '
|
tag_symbol = ' '
|
||||||
|
|
||||||
[golang]
|
[golang]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[guix_shell]
|
[guix_shell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[haskell]
|
[haskell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[haxe]
|
[haxe]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[hg_branch]
|
[hg_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[java]
|
[java]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[julia]
|
[julia]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[kotlin]
|
[kotlin]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[lua]
|
[lua]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[memory_usage]
|
[memory_usage]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[meson]
|
[meson]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nim]
|
[nim]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nix_shell]
|
[nix_shell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nodejs]
|
[nodejs]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[ocaml]
|
[ocaml]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[os]
|
[os]
|
||||||
disabled = false
|
disabled = false
|
||||||
|
|
||||||
[os.symbols]
|
[os.symbols]
|
||||||
Alpaquita = " "
|
Alpaquita = " "
|
||||||
Alpine = " "
|
Alpine = " "
|
||||||
AlmaLinux = " "
|
AlmaLinux = " "
|
||||||
Amazon = " "
|
Amazon = " "
|
||||||
Android = " "
|
Android = " "
|
||||||
Arch = " "
|
Arch = " "
|
||||||
Artix = " "
|
Artix = " "
|
||||||
CentOS = " "
|
CentOS = " "
|
||||||
Debian = " "
|
Debian = " "
|
||||||
DragonFly = " "
|
DragonFly = " "
|
||||||
Emscripten = " "
|
Emscripten = " "
|
||||||
EndeavourOS = " "
|
EndeavourOS = " "
|
||||||
Fedora = " "
|
Fedora = " "
|
||||||
FreeBSD = " "
|
FreeBSD = " "
|
||||||
Garuda = " "
|
Garuda = " "
|
||||||
Gentoo = " "
|
Gentoo = " "
|
||||||
HardenedBSD = " "
|
HardenedBSD = " "
|
||||||
Illumos = " "
|
Illumos = " "
|
||||||
Kali = " "
|
Kali = " "
|
||||||
Linux = " "
|
Linux = " "
|
||||||
Mabox = " "
|
Mabox = " "
|
||||||
Macos = " "
|
Macos = " "
|
||||||
Manjaro = " "
|
Manjaro = " "
|
||||||
Mariner = " "
|
Mariner = " "
|
||||||
MidnightBSD = " "
|
MidnightBSD = " "
|
||||||
Mint = " "
|
Mint = " "
|
||||||
NetBSD = " "
|
NetBSD = " "
|
||||||
NixOS = " "
|
NixOS = " "
|
||||||
OpenBSD = " "
|
OpenBSD = " "
|
||||||
openSUSE = " "
|
openSUSE = " "
|
||||||
OracleLinux = " "
|
OracleLinux = " "
|
||||||
Pop = " "
|
Pop = " "
|
||||||
Raspbian = " "
|
Raspbian = " "
|
||||||
Redhat = " "
|
Redhat = " "
|
||||||
RedHatEnterprise = " "
|
RedHatEnterprise = " "
|
||||||
RockyLinux = " "
|
RockyLinux = " "
|
||||||
Redox = " "
|
Redox = " "
|
||||||
Solus = " "
|
Solus = " "
|
||||||
SUSE = " "
|
SUSE = " "
|
||||||
Ubuntu = " "
|
Ubuntu = " "
|
||||||
Unknown = " "
|
Unknown = " "
|
||||||
Void = " "
|
Void = " "
|
||||||
Windows = " "
|
Windows = " "
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[perl]
|
[perl]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[php]
|
[php]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[pijul_channel]
|
[pijul_channel]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[python]
|
[python]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[rlang]
|
[rlang]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[ruby]
|
[ruby]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[rust]
|
[rust]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[scala]
|
[scala]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[swift]
|
[swift]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[zig]
|
[zig]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[gradle]
|
[gradle]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
|
||||||
210
.config/starship/starship_nu.toml
Normal file
210
.config/starship/starship_nu.toml
Normal file
|
|
@ -0,0 +1,210 @@
|
||||||
|
# starship.toml
|
||||||
|
# ~/.config/starship.toml
|
||||||
|
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||||
|
continuation_prompt = "[ cr >](bold cyan) "
|
||||||
|
|
||||||
|
add_newline = true
|
||||||
|
|
||||||
|
[time]
|
||||||
|
disabled = false
|
||||||
|
format = '[\[$time\]](purple)'
|
||||||
|
time_format = '%H:%M'
|
||||||
|
|
||||||
|
[username]
|
||||||
|
format = '[$user](bold)'
|
||||||
|
show_always = true
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
ssh_symbol = ' '
|
||||||
|
|
||||||
|
# Currently vimcmd_symbol is not supported in Nu, define in `config.nu` instead
|
||||||
|
[character]
|
||||||
|
success_symbol = ""
|
||||||
|
error_symbol = ""
|
||||||
|
vimcmd_symbol = ""
|
||||||
|
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
truncation_length = 2
|
||||||
|
truncate_to_repo = true
|
||||||
|
read_only = " "
|
||||||
|
style ="bold cyan"
|
||||||
|
truncation_symbol = ".../"
|
||||||
|
|
||||||
|
[directory.substitutions]
|
||||||
|
"~/Documents" = " "
|
||||||
|
"~/Downloads" = " "
|
||||||
|
"~/Music" = " "
|
||||||
|
"~/Pictures" = " "
|
||||||
|
"Source" = " "
|
||||||
|
"src" = " "
|
||||||
|
|
||||||
|
[aws]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[buf]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[c]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[conda]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[crystal]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[dart]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[elixir]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[elm]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[fennel]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[fossil_branch]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
tag_symbol = ' '
|
||||||
|
|
||||||
|
[golang]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[guix_shell]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[haskell]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[haxe]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[hg_branch]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[java]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[julia]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[kotlin]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[lua]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[memory_usage]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[meson]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[nim]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[nix_shell]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[ocaml]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[os]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[os.symbols]
|
||||||
|
Alpaquita = " "
|
||||||
|
Alpine = " "
|
||||||
|
AlmaLinux = " "
|
||||||
|
Amazon = " "
|
||||||
|
Android = " "
|
||||||
|
Arch = " "
|
||||||
|
Artix = " "
|
||||||
|
CentOS = " "
|
||||||
|
Debian = " "
|
||||||
|
DragonFly = " "
|
||||||
|
Emscripten = " "
|
||||||
|
EndeavourOS = " "
|
||||||
|
Fedora = " "
|
||||||
|
FreeBSD = " "
|
||||||
|
Garuda = " "
|
||||||
|
Gentoo = " "
|
||||||
|
HardenedBSD = " "
|
||||||
|
Illumos = " "
|
||||||
|
Kali = " "
|
||||||
|
Linux = " "
|
||||||
|
Mabox = " "
|
||||||
|
Macos = " "
|
||||||
|
Manjaro = " "
|
||||||
|
Mariner = " "
|
||||||
|
MidnightBSD = " "
|
||||||
|
Mint = " "
|
||||||
|
NetBSD = " "
|
||||||
|
NixOS = " "
|
||||||
|
OpenBSD = " "
|
||||||
|
openSUSE = " "
|
||||||
|
OracleLinux = " "
|
||||||
|
Pop = " "
|
||||||
|
Raspbian = " "
|
||||||
|
Redhat = " "
|
||||||
|
RedHatEnterprise = " "
|
||||||
|
RockyLinux = " "
|
||||||
|
Redox = " "
|
||||||
|
Solus = " "
|
||||||
|
SUSE = " "
|
||||||
|
Ubuntu = " "
|
||||||
|
Unknown = " "
|
||||||
|
Void = " "
|
||||||
|
Windows = " "
|
||||||
|
|
||||||
|
[package]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[perl]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[php]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[pijul_channel]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[rlang]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[ruby]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[scala]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[swift]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[zig]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
|
[gradle]
|
||||||
|
symbol = " "
|
||||||
|
|
@ -1,208 +1,208 @@
|
||||||
# starship.toml
|
# starship.toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||||
continuation_prompt = "[CR > ](bold cyan) "
|
continuation_prompt = "[CR > ](bold cyan) "
|
||||||
|
|
||||||
add_newline = true
|
add_newline = true
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
disabled = false
|
disabled = false
|
||||||
format = '[\[$time\]](purple)'
|
format = '[\[$time\]](purple)'
|
||||||
time_format = '%H:%M'
|
time_format = '%H:%M'
|
||||||
|
|
||||||
[username]
|
[username]
|
||||||
format = '[$user](bold)'
|
format = '[$user](bold)'
|
||||||
show_always = true
|
show_always = true
|
||||||
|
|
||||||
[hostname]
|
[hostname]
|
||||||
ssh_only = false
|
ssh_only = false
|
||||||
ssh_symbol = ' '
|
ssh_symbol = ' '
|
||||||
|
|
||||||
[character]
|
[character]
|
||||||
success_symbol = "[PS > ](bold green)"
|
success_symbol = "[PS > ](bold green)"
|
||||||
error_symbol = "[PS > ](bold red)"
|
error_symbol = "[PS > ](bold red)"
|
||||||
vimcmd_symbol = "[Vi < ](bold green)"
|
vimcmd_symbol = "[Vi < ](bold green)"
|
||||||
|
|
||||||
[directory]
|
[directory]
|
||||||
truncation_length = 2
|
truncation_length = 2
|
||||||
truncate_to_repo = true
|
truncate_to_repo = true
|
||||||
read_only = " "
|
read_only = " "
|
||||||
style ="bold cyan"
|
style ="bold cyan"
|
||||||
truncation_symbol = ".../"
|
truncation_symbol = ".../"
|
||||||
|
|
||||||
[directory.substitutions]
|
[directory.substitutions]
|
||||||
"~/Documents" = " "
|
"~/Documents" = " "
|
||||||
"~/Downloads" = " "
|
"~/Downloads" = " "
|
||||||
"~/Music" = " "
|
"~/Music" = " "
|
||||||
"~/Pictures" = " "
|
"~/Pictures" = " "
|
||||||
"Source" = " "
|
"Source" = " "
|
||||||
"src" = " "
|
"src" = " "
|
||||||
|
|
||||||
[aws]
|
[aws]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[buf]
|
[buf]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[c]
|
[c]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[dart]
|
[dart]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
|
|
||||||
[docker_context]
|
[docker_context]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[elixir]
|
[elixir]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[elm]
|
[elm]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[fennel]
|
[fennel]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[fossil_branch]
|
[fossil_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[git_branch]
|
[git_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[git_commit]
|
[git_commit]
|
||||||
tag_symbol = ' '
|
tag_symbol = ' '
|
||||||
|
|
||||||
[golang]
|
[golang]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[guix_shell]
|
[guix_shell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[haskell]
|
[haskell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[haxe]
|
[haxe]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[hg_branch]
|
[hg_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[java]
|
[java]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[julia]
|
[julia]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[kotlin]
|
[kotlin]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[lua]
|
[lua]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[memory_usage]
|
[memory_usage]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[meson]
|
[meson]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nim]
|
[nim]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nix_shell]
|
[nix_shell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nodejs]
|
[nodejs]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[ocaml]
|
[ocaml]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[os]
|
[os]
|
||||||
disabled = false
|
disabled = false
|
||||||
|
|
||||||
[os.symbols]
|
[os.symbols]
|
||||||
Alpaquita = " "
|
Alpaquita = " "
|
||||||
Alpine = " "
|
Alpine = " "
|
||||||
AlmaLinux = " "
|
AlmaLinux = " "
|
||||||
Amazon = " "
|
Amazon = " "
|
||||||
Android = " "
|
Android = " "
|
||||||
Arch = " "
|
Arch = " "
|
||||||
Artix = " "
|
Artix = " "
|
||||||
CentOS = " "
|
CentOS = " "
|
||||||
Debian = " "
|
Debian = " "
|
||||||
DragonFly = " "
|
DragonFly = " "
|
||||||
Emscripten = " "
|
Emscripten = " "
|
||||||
EndeavourOS = " "
|
EndeavourOS = " "
|
||||||
Fedora = " "
|
Fedora = " "
|
||||||
FreeBSD = " "
|
FreeBSD = " "
|
||||||
Garuda = " "
|
Garuda = " "
|
||||||
Gentoo = " "
|
Gentoo = " "
|
||||||
HardenedBSD = " "
|
HardenedBSD = " "
|
||||||
Illumos = " "
|
Illumos = " "
|
||||||
Kali = " "
|
Kali = " "
|
||||||
Linux = " "
|
Linux = " "
|
||||||
Mabox = " "
|
Mabox = " "
|
||||||
Macos = " "
|
Macos = " "
|
||||||
Manjaro = " "
|
Manjaro = " "
|
||||||
Mariner = " "
|
Mariner = " "
|
||||||
MidnightBSD = " "
|
MidnightBSD = " "
|
||||||
Mint = " "
|
Mint = " "
|
||||||
NetBSD = " "
|
NetBSD = " "
|
||||||
NixOS = " "
|
NixOS = " "
|
||||||
OpenBSD = " "
|
OpenBSD = " "
|
||||||
openSUSE = " "
|
openSUSE = " "
|
||||||
OracleLinux = " "
|
OracleLinux = " "
|
||||||
Pop = " "
|
Pop = " "
|
||||||
Raspbian = " "
|
Raspbian = " "
|
||||||
Redhat = " "
|
Redhat = " "
|
||||||
RedHatEnterprise = " "
|
RedHatEnterprise = " "
|
||||||
RockyLinux = " "
|
RockyLinux = " "
|
||||||
Redox = " "
|
Redox = " "
|
||||||
Solus = " "
|
Solus = " "
|
||||||
SUSE = " "
|
SUSE = " "
|
||||||
Ubuntu = " "
|
Ubuntu = " "
|
||||||
Unknown = " "
|
Unknown = " "
|
||||||
Void = " "
|
Void = " "
|
||||||
Windows = " "
|
Windows = " "
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[perl]
|
[perl]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[php]
|
[php]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[pijul_channel]
|
[pijul_channel]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[python]
|
[python]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[rlang]
|
[rlang]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[ruby]
|
[ruby]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[rust]
|
[rust]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[scala]
|
[scala]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[swift]
|
[swift]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[zig]
|
[zig]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[gradle]
|
[gradle]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
|
||||||
|
|
@ -1,208 +1,208 @@
|
||||||
# starship.toml
|
# starship.toml
|
||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||||
continuation_prompt = "[r % ](bold cyan) "
|
continuation_prompt = "[r % ](bold cyan) "
|
||||||
|
|
||||||
add_newline = true
|
add_newline = true
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
disabled = false
|
disabled = false
|
||||||
format = '[\[$time\]](purple)'
|
format = '[\[$time\]](purple)'
|
||||||
time_format = '%H:%M'
|
time_format = '%H:%M'
|
||||||
|
|
||||||
[username]
|
[username]
|
||||||
format = '[$user](bold)'
|
format = '[$user](bold)'
|
||||||
show_always = true
|
show_always = true
|
||||||
|
|
||||||
[hostname]
|
[hostname]
|
||||||
ssh_only = false
|
ssh_only = false
|
||||||
ssh_symbol = ' '
|
ssh_symbol = ' '
|
||||||
|
|
||||||
[character]
|
[character]
|
||||||
success_symbol = "[z % ](bold green)"
|
success_symbol = "[z % ](bold green)"
|
||||||
error_symbol = "[z % ](bold red)"
|
error_symbol = "[z % ](bold red)"
|
||||||
vimcmd_symbol = "[v ! ](bold green)"
|
vimcmd_symbol = "[v ! ](bold green)"
|
||||||
|
|
||||||
[directory]
|
[directory]
|
||||||
truncation_length = 2
|
truncation_length = 2
|
||||||
truncate_to_repo = true
|
truncate_to_repo = true
|
||||||
read_only = " "
|
read_only = " "
|
||||||
style ="bold cyan"
|
style ="bold cyan"
|
||||||
truncation_symbol = ".../"
|
truncation_symbol = ".../"
|
||||||
|
|
||||||
[directory.substitutions]
|
[directory.substitutions]
|
||||||
"~/Documents" = " "
|
"~/Documents" = " "
|
||||||
"~/Downloads" = " "
|
"~/Downloads" = " "
|
||||||
"~/Music" = " "
|
"~/Music" = " "
|
||||||
"~/Pictures" = " "
|
"~/Pictures" = " "
|
||||||
"Source" = " "
|
"Source" = " "
|
||||||
"src" = " "
|
"src" = " "
|
||||||
|
|
||||||
[aws]
|
[aws]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[buf]
|
[buf]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[c]
|
[c]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[crystal]
|
[crystal]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[dart]
|
[dart]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
|
|
||||||
[docker_context]
|
[docker_context]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[elixir]
|
[elixir]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[elm]
|
[elm]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[fennel]
|
[fennel]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[fossil_branch]
|
[fossil_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[git_branch]
|
[git_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[git_commit]
|
[git_commit]
|
||||||
tag_symbol = ' '
|
tag_symbol = ' '
|
||||||
|
|
||||||
[golang]
|
[golang]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[guix_shell]
|
[guix_shell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[haskell]
|
[haskell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[haxe]
|
[haxe]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[hg_branch]
|
[hg_branch]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[java]
|
[java]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[julia]
|
[julia]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[kotlin]
|
[kotlin]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[lua]
|
[lua]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[memory_usage]
|
[memory_usage]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[meson]
|
[meson]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nim]
|
[nim]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nix_shell]
|
[nix_shell]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[nodejs]
|
[nodejs]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[ocaml]
|
[ocaml]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[os]
|
[os]
|
||||||
disabled = false
|
disabled = false
|
||||||
|
|
||||||
[os.symbols]
|
[os.symbols]
|
||||||
Alpaquita = " "
|
Alpaquita = " "
|
||||||
Alpine = " "
|
Alpine = " "
|
||||||
AlmaLinux = " "
|
AlmaLinux = " "
|
||||||
Amazon = " "
|
Amazon = " "
|
||||||
Android = " "
|
Android = " "
|
||||||
Arch = " "
|
Arch = " "
|
||||||
Artix = " "
|
Artix = " "
|
||||||
CentOS = " "
|
CentOS = " "
|
||||||
Debian = " "
|
Debian = " "
|
||||||
DragonFly = " "
|
DragonFly = " "
|
||||||
Emscripten = " "
|
Emscripten = " "
|
||||||
EndeavourOS = " "
|
EndeavourOS = " "
|
||||||
Fedora = " "
|
Fedora = " "
|
||||||
FreeBSD = " "
|
FreeBSD = " "
|
||||||
Garuda = " "
|
Garuda = " "
|
||||||
Gentoo = " "
|
Gentoo = " "
|
||||||
HardenedBSD = " "
|
HardenedBSD = " "
|
||||||
Illumos = " "
|
Illumos = " "
|
||||||
Kali = " "
|
Kali = " "
|
||||||
Linux = " "
|
Linux = " "
|
||||||
Mabox = " "
|
Mabox = " "
|
||||||
Macos = " "
|
Macos = " "
|
||||||
Manjaro = " "
|
Manjaro = " "
|
||||||
Mariner = " "
|
Mariner = " "
|
||||||
MidnightBSD = " "
|
MidnightBSD = " "
|
||||||
Mint = " "
|
Mint = " "
|
||||||
NetBSD = " "
|
NetBSD = " "
|
||||||
NixOS = " "
|
NixOS = " "
|
||||||
OpenBSD = " "
|
OpenBSD = " "
|
||||||
openSUSE = " "
|
openSUSE = " "
|
||||||
OracleLinux = " "
|
OracleLinux = " "
|
||||||
Pop = " "
|
Pop = " "
|
||||||
Raspbian = " "
|
Raspbian = " "
|
||||||
Redhat = " "
|
Redhat = " "
|
||||||
RedHatEnterprise = " "
|
RedHatEnterprise = " "
|
||||||
RockyLinux = " "
|
RockyLinux = " "
|
||||||
Redox = " "
|
Redox = " "
|
||||||
Solus = " "
|
Solus = " "
|
||||||
SUSE = " "
|
SUSE = " "
|
||||||
Ubuntu = " "
|
Ubuntu = " "
|
||||||
Unknown = " "
|
Unknown = " "
|
||||||
Void = " "
|
Void = " "
|
||||||
Windows = " "
|
Windows = " "
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[perl]
|
[perl]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[php]
|
[php]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[pijul_channel]
|
[pijul_channel]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[python]
|
[python]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[rlang]
|
[rlang]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[ruby]
|
[ruby]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[rust]
|
[rust]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[scala]
|
[scala]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[swift]
|
[swift]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[zig]
|
[zig]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
[gradle]
|
[gradle]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@
|
||||||
noremap n j
|
noremap n j
|
||||||
noremap e k
|
noremap e k
|
||||||
noremap i l
|
noremap i l
|
||||||
|
noremap N J
|
||||||
|
noremap E K
|
||||||
|
noremap I L
|
||||||
|
|
||||||
" Similar position to i
|
" Similar position to i
|
||||||
noremap l i
|
noremap l i
|
||||||
|
|
@ -15,7 +18,7 @@ noremap L I
|
||||||
" ne[k]st
|
" ne[k]st
|
||||||
noremap k n
|
noremap k n
|
||||||
noremap K N
|
noremap K N
|
||||||
" [j]ump
|
" [j]ump
|
||||||
noremap j e
|
noremap j e
|
||||||
noremap J E
|
noremap J E
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
// ~/.config/zellij/config.kdl
|
// ~/.config/zellij/config.kdl
|
||||||
// ln -sf $DOTFILES/.config/zellij/config.kdl ~.config/zellij/config.kdl
|
// ln -sf $DOTFILES/.config/zellij/config.kdl ~.config/zellij/config.kdl
|
||||||
// https://zellij.dev/documentation/configuration
|
// https://zellij.dev/documentation/configuration
|
||||||
keybinds {
|
keybinds {
|
||||||
// keybinds are divided into modes
|
// keybinds are divided into modes
|
||||||
normal {
|
normal {
|
||||||
// bind instructions can include one or more keys (both keys will be bound separately)
|
// bind instructions can include one or more keys (both keys will be bound separately)
|
||||||
// bind keys can include one or more actions (all actions will be performed with no sequential guarantees)
|
// bind keys can include one or more actions (all actions will be performed with no sequential guarantees)
|
||||||
bind "Ctrl g" { SwitchToMode "locked"; }
|
bind "Ctrl g" { SwitchToMode "locked"; }
|
||||||
bind "Ctrl p" { SwitchToMode "pane"; }
|
bind "Ctrl p" { SwitchToMode "pane"; }
|
||||||
bind "Alt n" { NewPane; }
|
bind "Alt n" { NewPane; }
|
||||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||||
}
|
}
|
||||||
pane {
|
pane {
|
||||||
bind "h" "Left" { MoveFocus "Left"; }
|
bind "h" "Left" { MoveFocus "Left"; }
|
||||||
bind "i" "Right" { MoveFocus "Right"; }
|
bind "i" "Right" { MoveFocus "Right"; }
|
||||||
bind "n" "Down" { MoveFocus "Down"; }
|
bind "n" "Down" { MoveFocus "Down"; }
|
||||||
bind "e" "Up" { MoveFocus "Up"; }
|
bind "e" "Up" { MoveFocus "Up"; }
|
||||||
bind "p" { SwitchFocus; }
|
bind "p" { SwitchFocus; }
|
||||||
}
|
}
|
||||||
locked {
|
locked {
|
||||||
bind "Ctrl g" { SwitchToMode "normal"; }
|
bind "Ctrl g" { SwitchToMode "normal"; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
.editorconfig
Normal file
22
.editorconfig
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# $DOTFILES/.editorconfig
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{sh,zsh,zshrc,zshenv,bashrc}]
|
||||||
|
end_of_line = lf
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.{json,toml,js,lua,yaml,yml}]
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
39
.gitignore
vendored
39
.gitignore
vendored
|
|
@ -1,10 +1,28 @@
|
||||||
|
# Private Files
|
||||||
*private*
|
*private*
|
||||||
.private.env.*
|
.private.env.*
|
||||||
|
|
||||||
|
# Test files
|
||||||
|
test/
|
||||||
|
test.*
|
||||||
|
|
||||||
|
# Archives
|
||||||
|
*.gz
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Utils
|
||||||
|
xdg-ninja/
|
||||||
|
|
||||||
|
# IPython config cache
|
||||||
.config/ipython/profile_default/db
|
.config/ipython/profile_default/db
|
||||||
.config/ipython/profile_default/log
|
.config/ipython/profile_default/log
|
||||||
.config/ipython/profile_default/pid
|
.config/ipython/profile_default/pid
|
||||||
.config/ipython/profile_default/security
|
.config/ipython/profile_default/security
|
||||||
.config/ipython/profile_default/history.sqlite
|
.config/ipython/profile_default/history.sqlite
|
||||||
|
|
||||||
|
# nvim config cache
|
||||||
.config/nvim/tt.*
|
.config/nvim/tt.*
|
||||||
.config/nvim/.tests
|
.config/nvim/.tests
|
||||||
.config/nvim/doc/tags
|
.config/nvim/doc/tags
|
||||||
|
|
@ -16,12 +34,17 @@
|
||||||
.config/nvim/lazy-lock.json
|
.config/nvim/lazy-lock.json
|
||||||
.config/nvim/lazyvim.json
|
.config/nvim/lazyvim.json
|
||||||
.config/nvim/lua/plugins/obsidian.lua
|
.config/nvim/lua/plugins/obsidian.lua
|
||||||
test/
|
|
||||||
test.*
|
# Undone
|
||||||
*.gz
|
# Windows PowerToys
|
||||||
*.tar
|
|
||||||
*.zip
|
|
||||||
*.tgz
|
|
||||||
# WindowsTerminal.json
|
|
||||||
PowerToys/
|
PowerToys/
|
||||||
xdg-ninja/
|
# Just Script
|
||||||
|
Justfile
|
||||||
|
# Nushell
|
||||||
|
.config/nushell/
|
||||||
|
# VSCode Neovim
|
||||||
|
vscode/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# OS generated files
|
||||||
|
.DS_Store
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ noremap L I
|
||||||
" ne[k]st
|
" ne[k]st
|
||||||
noremap k n
|
noremap k n
|
||||||
noremap K N
|
noremap K N
|
||||||
" [j]ump
|
" [j]ump
|
||||||
noremap j e
|
noremap j e
|
||||||
noremap J E
|
noremap J E
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ exmap vsplit obcommand workspace:split-vertical
|
||||||
exmap hsplit obcommand workspace:split-horizontal
|
exmap hsplit obcommand workspace:split-horizontal
|
||||||
map <Space>| :vsplit<CR>
|
map <Space>| :vsplit<CR>
|
||||||
map <Space>- :hsplit<CR>
|
map <Space>- :hsplit<CR>
|
||||||
" map <Space>bd
|
" map <Space>bd
|
||||||
|
|
||||||
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
||||||
map <Space>ai :chat<CR>
|
map <Space>ai :chat<CR>
|
||||||
|
|
|
||||||
688
LICENSE
688
LICENSE
|
|
@ -1,21 +1,675 @@
|
||||||
MIT License
|
Copyright (c) 2024-2024 js0ny
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Copyright (c) 2024 js0ny
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Preamble
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The GNU General Public License is a free, copyleft license for
|
||||||
copies or substantial portions of the Software.
|
software and other kinds of works.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
The licenses for most software and other practical works are designed
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
to take away your freedom to share and change the works. By contrast,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
share and change all versions of a program--to make sure it remains free
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
GNU General Public License for most of our software; it applies also to
|
||||||
SOFTWARE.
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
|
|
|
||||||
|
|
@ -1,360 +1,360 @@
|
||||||
// Paste this into surfingkeys advanced settings
|
// Paste this into surfingkeys advanced settings
|
||||||
// or use:
|
// or use:
|
||||||
// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/browser/surfingkeys.js
|
// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/browser/surfingkeys.js
|
||||||
|
|
||||||
/** Examples
|
/** Examples
|
||||||
|
|
||||||
// an example to create a new mapping `ctrl-y`
|
// an example to create a new mapping `ctrl-y`
|
||||||
api.mapkey('<ctrl-y>', 'Show me the money', function() {
|
api.mapkey('<ctrl-y>', 'Show me the money', function() {
|
||||||
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
|
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
|
||||||
});
|
});
|
||||||
|
|
||||||
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
|
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
|
||||||
api.map('gt', 'T');
|
api.map('gt', 'T');
|
||||||
|
|
||||||
|
|
||||||
// an example to remove mapkey `Ctrl-i`
|
// an example to remove mapkey `Ctrl-i`
|
||||||
api.unmap('<ctrl-i>');
|
api.unmap('<ctrl-i>');
|
||||||
|
|
||||||
*/
|
*/
|
||||||
// Settings
|
// Settings
|
||||||
settings.language = "zh-CN" ;
|
settings.language = "zh-CN" ;
|
||||||
settings.showModeStatus = false;
|
settings.showModeStatus = false;
|
||||||
// Keymap, reference https://github.com/texiwustion/colemak_config_for_surfingkeys/tree/main
|
// Keymap, reference https://github.com/texiwustion/colemak_config_for_surfingkeys/tree/main
|
||||||
const forward = {
|
const forward = {
|
||||||
add: function (key) { // 转发即将被 unmap 的键
|
add: function (key) { // 转发即将被 unmap 的键
|
||||||
return api.map(`for${key}`, key)
|
return api.map(`for${key}`, key)
|
||||||
},
|
},
|
||||||
cancel: function (key) { // 删除转发生成的键
|
cancel: function (key) { // 删除转发生成的键
|
||||||
api.unmap(`for${key}`)
|
api.unmap(`for${key}`)
|
||||||
api.unmap(key)
|
api.unmap(key)
|
||||||
},
|
},
|
||||||
use: function (key) {
|
use: function (key) {
|
||||||
return `for${key}`
|
return `for${key}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const colemak = {
|
const colemak = {
|
||||||
forward: function (key) { // 转发即将被 unmap 的键
|
forward: function (key) { // 转发即将被 unmap 的键
|
||||||
api.map(key, `col${key}`)
|
api.map(key, `col${key}`)
|
||||||
api.unmap(`col${key}`)
|
api.unmap(`col${key}`)
|
||||||
|
|
||||||
},
|
},
|
||||||
use: function (key) {
|
use: function (key) {
|
||||||
return `col${key}`
|
return `col${key}`
|
||||||
},
|
},
|
||||||
map: function (a, b) {
|
map: function (a, b) {
|
||||||
api.map(colemak.use(a), forward.use(b))
|
api.map(colemak.use(a), forward.use(b))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const forwardFactory = {
|
const forwardFactory = {
|
||||||
push: function (mapLists) { // forward original keys
|
push: function (mapLists) { // forward original keys
|
||||||
for (let key in mapLists) {
|
for (let key in mapLists) {
|
||||||
forward.add(mapLists[key])
|
forward.add(mapLists[key])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
map: function (mapLists) {
|
map: function (mapLists) {
|
||||||
for (let key in mapLists) {
|
for (let key in mapLists) {
|
||||||
colemak.map(key, mapLists[key])
|
colemak.map(key, mapLists[key])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pull: function (mapLists) {
|
pull: function (mapLists) {
|
||||||
for (let key in mapLists) {
|
for (let key in mapLists) {
|
||||||
forward.cancel(mapLists[key])
|
forward.cancel(mapLists[key])
|
||||||
}
|
}
|
||||||
for (let key in mapLists) {
|
for (let key in mapLists) {
|
||||||
colemak.forward(key)
|
colemak.forward(key)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapLists = {
|
const mapLists = {
|
||||||
/// scroll page
|
/// scroll page
|
||||||
// Arrow
|
// Arrow
|
||||||
'n': 'j',
|
'n': 'j',
|
||||||
'e': 'k',
|
'e': 'k',
|
||||||
'i': 'l',
|
'i': 'l',
|
||||||
// l <-> i
|
// l <-> i
|
||||||
'l': 'i',
|
'l': 'i',
|
||||||
'L': 'I',
|
'L': 'I',
|
||||||
// k <-> n
|
// k <-> n
|
||||||
'k': 'n',
|
'k': 'n',
|
||||||
'K': 'N',
|
'K': 'N',
|
||||||
// j <-> e
|
// j <-> e
|
||||||
'j': 'e',
|
'j': 'e',
|
||||||
'J': 'E',
|
'J': 'E',
|
||||||
// 缩放
|
// 缩放
|
||||||
'zu': 'zi',
|
'zu': 'zi',
|
||||||
'zo': 'ze',
|
'zo': 'ze',
|
||||||
'zz': 'zr',
|
'zz': 'zr',
|
||||||
}
|
}
|
||||||
|
|
||||||
forwardFactory.push(mapLists)
|
forwardFactory.push(mapLists)
|
||||||
api.unmap('t')
|
api.unmap('t')
|
||||||
forwardFactory.map(mapLists)
|
forwardFactory.map(mapLists)
|
||||||
// 鼠标点击
|
// 鼠标点击
|
||||||
api.unmap('gi')
|
api.unmap('gi')
|
||||||
api.unmap('[[')
|
api.unmap('[[')
|
||||||
api.unmap(']]')
|
api.unmap(']]')
|
||||||
api.unmap(';m')
|
api.unmap(';m')
|
||||||
api.unmap(';fs')
|
api.unmap(';fs')
|
||||||
api.unmap('O')
|
api.unmap('O')
|
||||||
api.unmap('C')
|
api.unmap('C')
|
||||||
forwardFactory.pull(mapLists)
|
forwardFactory.pull(mapLists)
|
||||||
|
|
||||||
|
|
||||||
// Search Alias
|
// Search Alias
|
||||||
api.addSearchAlias('f', 'Felo', 'https://felo.ai/search?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
api.addSearchAlias('f', 'Felo', 'https://felo.ai/search?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||||
var res = JSON.parse(response.text);
|
var res = JSON.parse(response.text);
|
||||||
return res.map(function(r){
|
return res.map(function(r){
|
||||||
return r.phrase;
|
return r.phrase;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
api.addSearchAlias('p', 'Perplexity', 'https://www.perplexity.ai/?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
api.addSearchAlias('p', 'Perplexity', 'https://www.perplexity.ai/?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||||
var res = JSON.parse(response.text);
|
var res = JSON.parse(response.text);
|
||||||
return res.map(function(r){
|
return res.map(function(r){
|
||||||
return r.phrase;
|
return r.phrase;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
api.addSearchAlias('r', 'Raindrop', 'https://app.raindrop.io/my/0/', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
api.addSearchAlias('r', 'Raindrop', 'https://app.raindrop.io/my/0/', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||||
var res = JSON.parse(response.text);
|
var res = JSON.parse(response.text);
|
||||||
return res.map(function(r){
|
return res.map(function(r){
|
||||||
return r.phrase;
|
return r.phrase;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Theme, reference to https://github.com/Foldex/surfingkeys-config
|
// Theme, reference to https://github.com/Foldex/surfingkeys-config
|
||||||
api.Hints.style('border: solid 2px #4C566A; color:#A3BE8C; background: initial; background-color: #3B4252;');
|
api.Hints.style('border: solid 2px #4C566A; color:#A3BE8C; background: initial; background-color: #3B4252;');
|
||||||
api.Hints.style("border: solid 2px #4C566A !important; padding: 1px !important; color: #E5E9F0 !important; background: #3B4252 !important;", "text");
|
api.Hints.style("border: solid 2px #4C566A !important; padding: 1px !important; color: #E5E9F0 !important; background: #3B4252 !important;", "text");
|
||||||
api.Visual.style('marks', 'background-color: #A3BE8C99;');
|
api.Visual.style('marks', 'background-color: #A3BE8C99;');
|
||||||
api.Visual.style('cursor', 'background-color: #88C0D0;');
|
api.Visual.style('cursor', 'background-color: #88C0D0;');
|
||||||
settings.theme = `
|
settings.theme = `
|
||||||
fg: #E5E9F0;
|
fg: #E5E9F0;
|
||||||
bg: #3B4252;
|
bg: #3B4252;
|
||||||
bg-dark: #2E3440;
|
bg-dark: #2E3440;
|
||||||
border: #4C566A;
|
border: #4C566A;
|
||||||
main-fg: #88C0D0;
|
main-fg: #88C0D0;
|
||||||
accent-fg: #A3BE8C;
|
accent-fg: #A3BE8C;
|
||||||
info-fg: #5E81AC;
|
info-fg: #5E81AC;
|
||||||
select: #4C566A;
|
select: #4C566A;
|
||||||
/* ---------- Generic ---------- */
|
/* ---------- Generic ---------- */
|
||||||
.sk_theme {
|
.sk_theme {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
background-color: var(--bg);
|
background-color: var(--bg);
|
||||||
border-color: var(--border);
|
border-color: var(--border);
|
||||||
font-family: var(--font);
|
font-family: var(--font);
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
font-weight: var(--font-weight);
|
font-weight: var(--font-weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
font-family: var(--font);
|
font-family: var(--font);
|
||||||
font-weight: var(--font-weight);
|
font-weight: var(--font-weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme tbody {
|
.sk_theme tbody {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme input {
|
.sk_theme input {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hints */
|
/* Hints */
|
||||||
#sk_hints .begin {
|
#sk_hints .begin {
|
||||||
color: var(--accent-fg) !important;
|
color: var(--accent-fg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_tabs .sk_tab {
|
#sk_tabs .sk_tab {
|
||||||
background: var(--bg-dark);
|
background: var(--bg-dark);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_tabs .sk_tab_title {
|
#sk_tabs .sk_tab_title {
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_tabs .sk_tab_url {
|
#sk_tabs .sk_tab_url {
|
||||||
color: var(--main-fg);
|
color: var(--main-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_tabs .sk_tab_hint {
|
#sk_tabs .sk_tab_hint {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme #sk_frame {
|
.sk_theme #sk_frame {
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Omnibar ---------- */
|
/* ---------- Omnibar ---------- */
|
||||||
/* Uncomment this and use settings.omnibarPosition = 'bottom' for Pentadactyl/Tridactyl style bottom bar */
|
/* Uncomment this and use settings.omnibarPosition = 'bottom' for Pentadactyl/Tridactyl style bottom bar */
|
||||||
/* .sk_theme#sk_omnibar {
|
/* .sk_theme#sk_omnibar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.sk_theme .title {
|
.sk_theme .title {
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .url {
|
.sk_theme .url {
|
||||||
color: var(--main-fg);
|
color: var(--main-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .annotation {
|
.sk_theme .annotation {
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .omnibar_highlight {
|
.sk_theme .omnibar_highlight {
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .omnibar_timestamp {
|
.sk_theme .omnibar_timestamp {
|
||||||
color: var(--info-fg);
|
color: var(--info-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .omnibar_visitcount {
|
.sk_theme .omnibar_visitcount {
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
|
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
|
||||||
background: var(--bg-dark);
|
background: var(--bg-dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme #sk_omnibarSearchResult ul li.focused {
|
.sk_theme #sk_omnibarSearchResult ul li.focused {
|
||||||
background: var(--border);
|
background: var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme #sk_omnibarSearchArea {
|
.sk_theme #sk_omnibarSearchArea {
|
||||||
border-top-color: var(--border);
|
border-top-color: var(--border);
|
||||||
border-bottom-color: var(--border);
|
border-bottom-color: var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme #sk_omnibarSearchArea input,
|
.sk_theme #sk_omnibarSearchArea input,
|
||||||
.sk_theme #sk_omnibarSearchArea span {
|
.sk_theme #sk_omnibarSearchArea span {
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .separator {
|
.sk_theme .separator {
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Popup Notification Banner ---------- */
|
/* ---------- Popup Notification Banner ---------- */
|
||||||
#sk_banner {
|
#sk_banner {
|
||||||
font-family: var(--font);
|
font-family: var(--font);
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
font-weight: var(--font-weight);
|
font-weight: var(--font-weight);
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
border-color: var(--border);
|
border-color: var(--border);
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Popup Keys ---------- */
|
/* ---------- Popup Keys ---------- */
|
||||||
#sk_keystroke {
|
#sk_keystroke {
|
||||||
background-color: var(--bg);
|
background-color: var(--bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme kbd .candidates {
|
.sk_theme kbd .candidates {
|
||||||
color: var(--info-fg);
|
color: var(--info-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme span.annotation {
|
.sk_theme span.annotation {
|
||||||
color: var(--accent-fg);
|
color: var(--accent-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Popup Translation Bubble ---------- */
|
/* ---------- Popup Translation Bubble ---------- */
|
||||||
#sk_bubble {
|
#sk_bubble {
|
||||||
background-color: var(--bg) !important;
|
background-color: var(--bg) !important;
|
||||||
color: var(--fg) !important;
|
color: var(--fg) !important;
|
||||||
border-color: var(--border) !important;
|
border-color: var(--border) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_bubble * {
|
#sk_bubble * {
|
||||||
color: var(--fg) !important;
|
color: var(--fg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_bubble div.sk_arrow div:nth-of-type(1) {
|
#sk_bubble div.sk_arrow div:nth-of-type(1) {
|
||||||
border-top-color: var(--border) !important;
|
border-top-color: var(--border) !important;
|
||||||
border-bottom-color: var(--border) !important;
|
border-bottom-color: var(--border) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sk_bubble div.sk_arrow div:nth-of-type(2) {
|
#sk_bubble div.sk_arrow div:nth-of-type(2) {
|
||||||
border-top-color: var(--bg) !important;
|
border-top-color: var(--bg) !important;
|
||||||
border-bottom-color: var(--bg) !important;
|
border-bottom-color: var(--bg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- Search ---------- */
|
/* ---------- Search ---------- */
|
||||||
#sk_status,
|
#sk_status,
|
||||||
#sk_find {
|
#sk_find {
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
border-color: var(--border);
|
border-color: var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme kbd {
|
.sk_theme kbd {
|
||||||
background: var(--bg-dark);
|
background: var(--bg-dark);
|
||||||
border-color: var(--border);
|
border-color: var(--border);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sk_theme .feature_name span {
|
.sk_theme .feature_name span {
|
||||||
color: var(--main-fg);
|
color: var(--main-fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- ACE Editor ---------- */
|
/* ---------- ACE Editor ---------- */
|
||||||
#sk_editor {
|
#sk_editor {
|
||||||
background: var(--bg-dark) !important;
|
background: var(--bg-dark) !important;
|
||||||
height: 50% !important;
|
height: 50% !important;
|
||||||
/* Remove this to restore the default editor size */
|
/* Remove this to restore the default editor size */
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_dialog-bottom {
|
.ace_dialog-bottom {
|
||||||
border-top: 1px solid var(--bg) !important;
|
border-top: 1px solid var(--bg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace-chrome .ace_print-margin,
|
.ace-chrome .ace_print-margin,
|
||||||
.ace_gutter,
|
.ace_gutter,
|
||||||
.ace_gutter-cell,
|
.ace_gutter-cell,
|
||||||
.ace_dialog {
|
.ace_dialog {
|
||||||
background: var(--bg) !important;
|
background: var(--bg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace-chrome {
|
.ace-chrome {
|
||||||
color: var(--fg) !important;
|
color: var(--fg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_gutter,
|
.ace_gutter,
|
||||||
.ace_dialog {
|
.ace_dialog {
|
||||||
color: var(--fg) !important;
|
color: var(--fg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_cursor {
|
.ace_cursor {
|
||||||
color: var(--fg) !important;
|
color: var(--fg) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.normal-mode .ace_cursor {
|
.normal-mode .ace_cursor {
|
||||||
background-color: var(--fg) !important;
|
background-color: var(--fg) !important;
|
||||||
border: var(--fg) !important;
|
border: var(--fg) !important;
|
||||||
opacity: 0.7 !important;
|
opacity: 0.7 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_marker-layer .ace_selection {
|
.ace_marker-layer .ace_selection {
|
||||||
background: var(--select) !important;
|
background: var(--select) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_editor,
|
.ace_editor,
|
||||||
.ace_dialog span,
|
.ace_dialog span,
|
||||||
.ace_dialog input {
|
.ace_dialog input {
|
||||||
font-family: var(--font);
|
font-family: var(--font);
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
font-weight: var(--font-weight);
|
font-weight: var(--font-weight);
|
||||||
}`;
|
}`;
|
||||||
// click `Save` button to make above settings to take effect.</ctrl-i></ctrl-y>
|
// click `Save` button to make above settings to take effect.</ctrl-i></ctrl-y>
|
||||||
12
desktop.ini
12
desktop.ini
|
|
@ -1,6 +1,6 @@
|
||||||
[.ShellClassInfo]
|
[.ShellClassInfo]
|
||||||
IconResource=D:\Assets\Folder11-Ico\ico\bash.ico,0
|
IconResource=D:\Assets\Folder11-Ico\ico\bash.ico,0
|
||||||
[ViewState]
|
[ViewState]
|
||||||
Mode=
|
Mode=
|
||||||
Vid=
|
Vid=
|
||||||
FolderType=Documents
|
FolderType=Documents
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
$DOTFILES = "$HOME/.dotfiles"
|
$DOTFILES = "$HOME/.dotfiles"
|
||||||
|
|
||||||
### Load Configs ###
|
### Load Configs ###
|
||||||
|
|
||||||
Get-ChildItem -Path $DOTFILES/powershell -Filter *.ps1 | ForEach-Object {. $_}
|
Get-ChildItem -Path $DOTFILES/powershell -Filter *.ps1 | ForEach-Object {. $_}
|
||||||
Get-ChildItem -Path $DOTFILES/powershell_private -Filter *.ps1 | ForEach-Object {. $_}
|
Get-ChildItem -Path $DOTFILES/powershell_private -Filter *.ps1 | ForEach-Object {. $_}
|
||||||
|
|
@ -21,4 +21,4 @@ Set-Alias "open" "Invoke-Item" # Use ii instead of open
|
||||||
# Dev #
|
# Dev #
|
||||||
|
|
||||||
${function:zshcfg} = { nvim ~/.zshrc }
|
${function:zshcfg} = { nvim ~/.zshrc }
|
||||||
${function:bashcfg} = { nvim ~/.bashrc }
|
${function:bashcfg} = { nvim ~/.bashrc }
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
{
|
{
|
||||||
"description": "CapsLock to ESC (alone) or LCommand (withKeys)",
|
"description": "CapsLock to ESC (alone) or LCommand (withKeys)",
|
||||||
"manipulators": [
|
"manipulators": [
|
||||||
{
|
{
|
||||||
"from": {
|
"from": {
|
||||||
"key_code": "caps_lock",
|
"key_code": "caps_lock",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"optional": [
|
"optional": [
|
||||||
"any"
|
"any"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"to": [
|
"to": [
|
||||||
{
|
{
|
||||||
"key_code": "left_command"
|
"key_code": "left_command"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"to_if_alone": [
|
"to_if_alone": [
|
||||||
{
|
{
|
||||||
"key_code": "escape"
|
"key_code": "escape"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
{
|
{
|
||||||
"description": "Map fn+tab to cmd+tab",
|
"description": "Map fn+tab to cmd+tab",
|
||||||
"manipulators": [
|
"manipulators": [
|
||||||
{
|
{
|
||||||
"from": {
|
"from": {
|
||||||
"key_code": "tab",
|
"key_code": "tab",
|
||||||
"modifiers": {
|
"modifiers": {
|
||||||
"mandatory": [
|
"mandatory": [
|
||||||
"fn"
|
"fn"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"to": [
|
"to": [
|
||||||
{
|
{
|
||||||
"key_code": "tab",
|
"key_code": "tab",
|
||||||
"modifiers": [
|
"modifiers": [
|
||||||
"left_command"
|
"left_command"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
# $XDG_CONFIG_HOME/neovide/config.toml
|
# $XDG_CONFIG_HOME/neovide/config.toml
|
||||||
# ln -sf $DOTFILES/mac/neovide.toml $XDG_CONFIG_HOME/neovide/config.toml
|
# ln -sf $DOTFILES/mac/neovide.toml $XDG_CONFIG_HOME/neovide/config.toml
|
||||||
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/neovide/config.toml -Value $DOTFILES\mac\neovide.toml (Mac)
|
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/neovide/config.toml -Value $DOTFILES\mac\neovide.toml (Mac)
|
||||||
# https://neovide.dev/config-file.html?highlight=toml#config-file
|
# https://neovide.dev/config-file.html?highlight=toml#config-file
|
||||||
fork = false
|
fork = false
|
||||||
frame = "full"
|
frame = "full"
|
||||||
idle = true
|
idle = true
|
||||||
maximized = false
|
maximized = false
|
||||||
neovim-bin = "/opt/homebrew/bin/nvim"
|
neovim-bin = "/opt/homebrew/bin/nvim"
|
||||||
no-multigrid = false
|
no-multigrid = false
|
||||||
srgb = false
|
srgb = false
|
||||||
tabs = true
|
tabs = true
|
||||||
theme = "auto"
|
theme = "auto"
|
||||||
title-hidden = true
|
title-hidden = true
|
||||||
vsync = true
|
vsync = true
|
||||||
wsl = false
|
wsl = false
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||||
size = 14.0
|
size = 14.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
tell application "Finder"
|
tell application "Finder"
|
||||||
activate
|
activate
|
||||||
make new Finder window
|
make new Finder window
|
||||||
end tell
|
end tell
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# pip
|
# pip
|
||||||
Set-Alias pip pip3
|
Set-Alias pip pip3
|
||||||
Set-Alias python python3
|
Set-Alias python python3
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
# npm
|
# npm
|
||||||
npm config set registry https://registry.npmmirror.com
|
npm config set registry https://registry.npmmirror.com
|
||||||
|
|
@ -19,4 +19,4 @@ brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.
|
||||||
# 除 homebrew/core 仓库外的 tap 仓库仍然需要设置镜像
|
# 除 homebrew/core 仓库外的 tap 仓库仍然需要设置镜像
|
||||||
brew tap --custom-remote --force-auto-update homebrew/command-not-found https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git
|
brew tap --custom-remote --force-auto-update homebrew/command-not-found https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-command-not-found.git
|
||||||
brew tap --custom-remote --force-auto-update homebrew/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git
|
brew tap --custom-remote --force-auto-update homebrew/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git
|
||||||
brew update
|
brew update
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
||||||
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
|
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
|
||||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
|
||||||
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
|
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
|
||||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
|
||||||
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
|
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
|
||||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
|
||||||
|
|
||||||
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
|
# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
|
||||||
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
||||||
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
||||||
|
|
||||||
# 预发布软件源,不建议启用
|
# 预发布软件源,不建议启用
|
||||||
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
||||||
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
||||||
|
|
@ -1,37 +1,37 @@
|
||||||
### VARIABLES ###
|
### VARIABLES ###
|
||||||
$EDITOR = "code"
|
$EDITOR = "code"
|
||||||
# Shell Equivalents #
|
# Shell Equivalents #
|
||||||
Set-Alias "touch" "New-Item"
|
Set-Alias "touch" "New-Item"
|
||||||
${function:ll} = { Get-ChildItem -Force }
|
${function:ll} = { Get-ChildItem -Force }
|
||||||
|
|
||||||
# Shell Configurations #
|
# Shell Configurations #
|
||||||
${function:shcfg} = { code $PROFILE }
|
${function:shcfg} = { code $PROFILE }
|
||||||
Set-Alias "pwshcfg" "shcfg"
|
Set-Alias "pwshcfg" "shcfg"
|
||||||
${function:reload} = { . $PROFILE }
|
${function:reload} = { . $PROFILE }
|
||||||
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
||||||
|
|
||||||
# Editors #
|
# Editors #
|
||||||
Set-Alias "v" "nvim"
|
Set-Alias "v" "nvim"
|
||||||
Set-Alias "c" "code"
|
Set-Alias "c" "code"
|
||||||
Set-Alias "gvi" "neovide"
|
Set-Alias "gvi" "neovide"
|
||||||
|
|
||||||
# File Creation #
|
# File Creation #
|
||||||
function mkcd { param ( [string] $dirname) mkdir $dirname && Set-Location $dirname }
|
function mkcd { param ( [string] $dirname) mkdir $dirname && Set-Location $dirname }
|
||||||
function tc { param ( [string] $filename) New-Item $filename && code $filename }
|
function tc { param ( [string] $filename) New-Item $filename && code $filename }
|
||||||
function tv { param ( [string] $filename) New-Item $filename && nvim $filename }
|
function tv { param ( [string] $filename) New-Item $filename && nvim $filename }
|
||||||
function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem }
|
function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem }
|
||||||
|
|
||||||
### Dev ###
|
### Dev ###
|
||||||
|
|
||||||
# .NET #
|
# .NET #
|
||||||
${function:csi} = { dotnet repl --default-kernel csharp}
|
${function:csi} = { dotnet repl --default-kernel csharp}
|
||||||
${function:fsi} = { dotnet repl --default-kernel fsharp}
|
${function:fsi} = { dotnet repl --default-kernel fsharp}
|
||||||
|
|
||||||
# Python & Conda #
|
# Python & Conda #
|
||||||
Set-Alias "py" "python"
|
Set-Alias "py" "python"
|
||||||
Set-Alias "ipy" "ipython"
|
Set-Alias "ipy" "ipython"
|
||||||
${function:pyact} = { conda activate $args[0] }
|
${function:pyact} = { conda activate $args[0] }
|
||||||
${function:pydact} = { conda deactivate }
|
${function:pydact} = { conda deactivate }
|
||||||
${function:pylsenvs} = { conda env list }
|
${function:pylsenvs} = { conda env list }
|
||||||
${function:pymkenv} = { conda create --name $args[0] }
|
${function:pymkenv} = { conda create --name $args[0] }
|
||||||
${function:pyrmenv} = { conda remove --name $args[0] --all }
|
${function:pyrmenv} = { conda remove --name $args[0] --all }
|
||||||
9
powershell/Completions.ps1
Normal file
9
powershell/Completions.ps1
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
function Invoke-Completion {
|
||||||
|
param ([string]$command)
|
||||||
|
switch ($command) {
|
||||||
|
'docker' { docker completion powershell | Out-String | Invoke-Expression }
|
||||||
|
'git' { Import-Module Posh-Git }
|
||||||
|
'hugo' { hugo completion powershell | Out-String | Invoke-Expression }
|
||||||
|
'pip' { pip completion --powershell | Out-String | Invoke-Expression }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Use XDG Base Directory Specification and its similar structure for Windows
|
# Use XDG Base Directory Specification and its similar structure for Windows
|
||||||
|
|
||||||
# wget
|
# wget
|
||||||
${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args}
|
${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args}
|
||||||
|
|
||||||
# yarn v1
|
# yarn v1
|
||||||
${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args}
|
${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args}
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
# aka PSReadLine
|
# aka PSReadLine
|
||||||
# PSReadLineOptions
|
# PSReadLineOptions
|
||||||
Set-PSReadLineOption -EditMode Vi # Vi Keybindings
|
Set-PSReadLineOption -EditMode Vi # Vi Keybindings
|
||||||
Set-PSReadLineOption -PredictionViewStyle ListView
|
Set-PSReadLineOption -PredictionViewStyle ListView
|
||||||
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
||||||
# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead
|
# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead
|
||||||
# PSReadLineKeyHandlers
|
# PSReadLineKeyHandlers
|
||||||
## Colemak hnei
|
## Colemak hnei
|
||||||
Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command
|
||||||
Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command
|
||||||
Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command
|
||||||
## Similar position to [i] in QWERTY
|
## Similar position to [i] in QWERTY
|
||||||
Set-PSReadLineKeyHandler -Chord "l" -Function ViInsertMode -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "l" -Function ViInsertMode -ViMode Command
|
||||||
Set-PSReadlineKeyHandler -Chord "L" -Function ViInsertAtBegining -ViMode Command
|
Set-PSReadlineKeyHandler -Chord "L" -Function ViInsertAtBegining -ViMode Command
|
||||||
## Ne{[k]s}t
|
## Ne{[k]s}t
|
||||||
Set-PSReadLineKeyHandler -Chord "k" -Function RepeatSearch -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "k" -Function RepeatSearch -ViMode Command
|
||||||
Set-PSReadLineKeyHandler -Chord "K" -Function RepeatSearchBackward -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "K" -Function RepeatSearchBackward -ViMode Command
|
||||||
## [j]ump
|
## [j]ump
|
||||||
Set-PSReadLineKeyHandler -Chord "j" -Function NextWordEnd -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "j" -Function NextWordEnd -ViMode Command
|
||||||
Set-PSReadLineKeyHandler -Chord "J" -Function ViEndOfGlob -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "J" -Function ViEndOfGlob -ViMode Command
|
||||||
## Use N to Join
|
## Use N to Join
|
||||||
Set-PSReadLineKeyHandler -Chord "N" -Function ViJoinLines -ViMode Command
|
Set-PSReadLineKeyHandler -Chord "N" -Function ViJoinLines -ViMode Command
|
||||||
Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape
|
Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine
|
Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine
|
Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
Import-Module -Name Terminal-Icons
|
Import-Module -Name Terminal-Icons
|
||||||
Import-Module -Name CompletionPredictor
|
Import-Module -Name CompletionPredictor
|
||||||
if ($IsWindows) {
|
if ($IsWindows) {
|
||||||
# Chocolatey
|
# Chocolatey
|
||||||
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" }
|
if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" }
|
||||||
# WinGet
|
# WinGet
|
||||||
Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58
|
Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58
|
||||||
}
|
}
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
# ${function:~} = { Set-Location -Path ~ } cd is better
|
# ${function:~} = { Set-Location -Path ~ } cd is better
|
||||||
${function:...} = { Set-Location -Path ..\.. }
|
${function:...} = { Set-Location -Path ..\.. }
|
||||||
${function:....} = { Set-Location -Path ..\..\.. }
|
${function:....} = { Set-Location -Path ..\..\.. }
|
||||||
${function:.....} = { Set-Location -Path ..\..\..\.. }
|
${function:.....} = { Set-Location -Path ..\..\..\.. }
|
||||||
${function:......} = { Set-Location -Path ..\..\..\..\.. }
|
${function:......} = { Set-Location -Path ..\..\..\..\.. }
|
||||||
|
|
||||||
# Absolute navigation
|
# Absolute navigation
|
||||||
${function:docs} = { Set-Location -Path ~/Documents }
|
${function:docs} = { Set-Location -Path ~/Documents }
|
||||||
${function:down} = { Set-Location -Path ~/Downloads }
|
${function:down} = { Set-Location -Path ~/Downloads }
|
||||||
${function:dt} = { Set-Location -Path ~/Desktop }
|
${function:dt} = { Set-Location -Path ~/Desktop }
|
||||||
${function:mytmp} = { Set-Location -Path ~/Temp }
|
${function:mytmp} = { Set-Location -Path ~/Temp }
|
||||||
${function:one} = { Set-Location -Path ~/OneDrive }
|
${function:one} = { Set-Location -Path ~/OneDrive }
|
||||||
${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem }
|
${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem }
|
||||||
|
|
||||||
Invoke-Expression (& { (zoxide init powershell | Out-String) })
|
Invoke-Expression (& { (zoxide init powershell | Out-String) })
|
||||||
|
|
@ -1,92 +1,92 @@
|
||||||
# Use starship to set prompt
|
# Use starship to set prompt
|
||||||
$ENV:STARSHIP_CONFIG = "$DOTFILES/.config/starship/starship_pwsh.toml"
|
$ENV:STARSHIP_CONFIG = "$DOTFILES/.config/starship/starship_pwsh.toml"
|
||||||
|
|
||||||
Invoke-Expression (&starship init powershell)
|
Invoke-Expression (&starship init powershell)
|
||||||
|
|
||||||
# Below is the backup of original prompt function
|
# Below is the backup of original prompt function
|
||||||
# $promptTime = $true
|
# $promptTime = $true
|
||||||
# # $promptWeather = $false
|
# # $promptWeather = $false
|
||||||
|
|
||||||
# function prompt {
|
# function prompt {
|
||||||
# $prompt = "`e[35m"
|
# $prompt = "`e[35m"
|
||||||
# # Time
|
# # Time
|
||||||
# if ($promptTime) {
|
# if ($promptTime) {
|
||||||
# $promptTime = Get-Date -Format HH:mm
|
# $promptTime = Get-Date -Format HH:mm
|
||||||
# $prompt += "`[$promptTime]"
|
# $prompt += "`[$promptTime]"
|
||||||
# }
|
# }
|
||||||
# # UserInfo
|
# # UserInfo
|
||||||
# $prompt += " $Env:Username @ $Env:Userdomain"
|
# $prompt += " $Env:Username @ $Env:Userdomain"
|
||||||
# # Directory
|
# # Directory
|
||||||
# $promptCurrentDirectory = $(PWD).Path
|
# $promptCurrentDirectory = $(PWD).Path
|
||||||
# $promptCurrentDirectory = $promptCurrentDirectory.Replace("$HOME", "~")
|
# $promptCurrentDirectory = $promptCurrentDirectory.Replace("$HOME", "~")
|
||||||
# $prompt += "`e[0m in `e[33m$promptCurrentDirectory "
|
# $prompt += "`e[0m in `e[33m$promptCurrentDirectory "
|
||||||
# # Git
|
# # Git
|
||||||
# if ($(git rev-parse --is-inside-work-tree 2> $null) -eq "true") {
|
# if ($(git rev-parse --is-inside-work-tree 2> $null) -eq "true") {
|
||||||
# $prompt += "`e[32m`u{e702} $(git branch --show-current)"
|
# $prompt += "`e[32m`u{e702} $(git branch --show-current)"
|
||||||
# }
|
# }
|
||||||
# # Conda
|
# # Conda
|
||||||
# if ( $Env:CONDA_PROMPT_MODIFIER ) {
|
# if ( $Env:CONDA_PROMPT_MODIFIER ) {
|
||||||
# $promptConda = $Env:CONDA_PROMPT_MODIFIER.Replace("`(","").Replace(")","")
|
# $promptConda = $Env:CONDA_PROMPT_MODIFIER.Replace("`(","").Replace(")","")
|
||||||
# $pythonVersion = $(python --version).Split(" ")[1]
|
# $pythonVersion = $(python --version).Split(" ")[1]
|
||||||
# $prompt += " `e[33m`u{e73c} $promptConda $pythonVersion"
|
# $prompt += " `e[33m`u{e73c} $promptConda $pythonVersion"
|
||||||
# }
|
# }
|
||||||
# # Programming Language (by Get-ChildItem)
|
# # Programming Language (by Get-ChildItem)
|
||||||
# ## Python
|
# ## Python
|
||||||
# if (Test-Path -Path "$PWD\pyproject.toml") {
|
# if (Test-Path -Path "$PWD\pyproject.toml") {
|
||||||
# $pythonVersion = $(python --version).Split(" ")[1]
|
# $pythonVersion = $(python --version).Split(" ")[1]
|
||||||
# $prompt += " `e[33m`u{e73c} $pythonVersion"
|
# $prompt += " `e[33m`u{e73c} $pythonVersion"
|
||||||
# }
|
# }
|
||||||
# ## Node.js
|
# ## Node.js
|
||||||
# if (Test-Path -Path "$PWD\package.json") {
|
# if (Test-Path -Path "$PWD\package.json") {
|
||||||
# $nodeVersion = $(node --version)
|
# $nodeVersion = $(node --version)
|
||||||
# $prompt += " `e[32m`u{e3a0} $nodeVersion"
|
# $prompt += " `e[32m`u{e3a0} $nodeVersion"
|
||||||
# # Locked
|
# # Locked
|
||||||
# if (Test-Path -Path "$PWD\yarn.lock" || Test-Path -Path "$PWD\package-lock.json") {
|
# if (Test-Path -Path "$PWD\yarn.lock" || Test-Path -Path "$PWD\package-lock.json") {
|
||||||
# $prompt += "`u{f023}"
|
# $prompt += "`u{f023}"
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
# ## .NET
|
# ## .NET
|
||||||
# ### C Sharp
|
# ### C Sharp
|
||||||
# if (Test-Path -Path "$PWD\*.csproj") {
|
# if (Test-Path -Path "$PWD\*.csproj") {
|
||||||
# $dotnetVersion = $(dotnet --version)
|
# $dotnetVersion = $(dotnet --version)
|
||||||
# $prompt += " `e[34m`u{e648} $dotnetVersion"
|
# $prompt += " `e[34m`u{e648} $dotnetVersion"
|
||||||
# }
|
# }
|
||||||
# ### F Sharp
|
# ### F Sharp
|
||||||
# if (Test-Path -Path "$PWD\*.fsproj") {
|
# if (Test-Path -Path "$PWD\*.fsproj") {
|
||||||
# $dotnetVersion = $(dotnet --version)
|
# $dotnetVersion = $(dotnet --version)
|
||||||
# $prompt += " `e[35m`u{e65a} $dotnetVersion"
|
# $prompt += " `e[35m`u{e65a} $dotnetVersion"
|
||||||
# }
|
# }
|
||||||
# ## Rust
|
# ## Rust
|
||||||
# if (Test-Path -Path "$PWD\Cargo.toml") {
|
# if (Test-Path -Path "$PWD\Cargo.toml") {
|
||||||
# $rustVersion = $(cargo --version).Split(" ")[1]
|
# $rustVersion = $(cargo --version).Split(" ")[1]
|
||||||
# $prompt += " `e[31m`u{e7a8} $rustVersion"
|
# $prompt += " `e[31m`u{e7a8} $rustVersion"
|
||||||
# }
|
# }
|
||||||
# ## Java
|
# ## Java
|
||||||
# if (Test-Path -Path "$PWD\pom.xml" || Test-Path -Path "$PWD\build.gradle") {
|
# if (Test-Path -Path "$PWD\pom.xml" || Test-Path -Path "$PWD\build.gradle") {
|
||||||
# $javaVersion = $(java --version).Split(" ")[1]
|
# $javaVersion = $(java --version).Split(" ")[1]
|
||||||
# $prompt += " `e[31m`u{e738} $javaVersion"
|
# $prompt += " `e[31m`u{e738} $javaVersion"
|
||||||
# }
|
# }
|
||||||
# ## Makefile
|
# ## Makefile
|
||||||
# if (Test-Path -Path "$PWD\Makefile") {
|
# if (Test-Path -Path "$PWD\Makefile") {
|
||||||
# $prompt += " `e[32m`u{e673}"
|
# $prompt += " `e[32m`u{e673}"
|
||||||
# }
|
# }
|
||||||
# if (Test-Path -Path "$PWD\CMakeLists.txt") {
|
# if (Test-Path -Path "$PWD\CMakeLists.txt") {
|
||||||
# $prompt += " `e[32m `u{e61d}"
|
# $prompt += " `e[32m `u{e61d}"
|
||||||
# }
|
# }
|
||||||
# # Docker
|
# # Docker
|
||||||
# if (Test-Path -Path "$PWD\Dockerfile" || Test-Path -Path "$PWD\docker-compose.yml") {
|
# if (Test-Path -Path "$PWD\Dockerfile" || Test-Path -Path "$PWD\docker-compose.yml") {
|
||||||
# $prompt += " `e[33m`u{f21f}"
|
# $prompt += " `e[33m`u{f21f}"
|
||||||
# }
|
# }
|
||||||
# # Weather
|
# # Weather
|
||||||
# # if ( $global:promptWeather ) {
|
# # if ( $global:promptWeather ) {
|
||||||
# # $prompt += $(Write-WeatherCurrent -City "Edinburgh" -Country "UK" -Unit "metric" -Inline -Apikey $Env:WEATHER_API_KEY)
|
# # $prompt += $(Write-WeatherCurrent -City "Edinburgh" -Country "UK" -Unit "metric" -Inline -Apikey $Env:WEATHER_API_KEY)
|
||||||
# # }
|
# # }
|
||||||
# # Error on last command
|
# # Error on last command
|
||||||
# ## TODO: Seems does not work
|
# ## TODO: Seems does not work
|
||||||
# if ($?) {
|
# if ($?) {
|
||||||
# $prompt += "`n`e[32m PS > `e[0m"
|
# $prompt += "`n`e[32m PS > `e[0m"
|
||||||
# } else {
|
# } else {
|
||||||
# $prompt += "`n`e[31m PS > `e[0m"
|
# $prompt += "`n`e[31m PS > `e[0m"
|
||||||
# }
|
# }
|
||||||
# return $prompt
|
# return $prompt
|
||||||
# }
|
# }
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
function CsvToMarkdown {
|
function CsvToMarkdown {
|
||||||
param( [string]$csv)
|
param( [string]$csv)
|
||||||
$counter = 0
|
$counter = 0
|
||||||
$column = $csv.Split("`n")[0].Split(",").Length
|
$column = $csv.Split("`n")[0].Split(",").Length
|
||||||
$aHeader = " --- |"
|
$aHeader = " --- |"
|
||||||
$header = "|" + $aHeader * $column
|
$header = "|" + $aHeader * $column
|
||||||
$csv.replace(",", " | ").Split("`n") | ForEach-Object {
|
$csv.replace(",", " | ").Split("`n") | ForEach-Object {
|
||||||
if ($counter -eq 0) {
|
if ($counter -eq 0) {
|
||||||
Write-Output "| $_ |"
|
Write-Output "| $_ |"
|
||||||
$counter++
|
$counter++
|
||||||
Write-Output $header
|
Write-Output $header
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Output "| $_ |"
|
Write-Output "| $_ |"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
# PowerShell Profile
|
# PowerShell Profile
|
||||||
|
|
||||||
This is the cross-platform PowerShell profile for PowerShell Core
|
This is the cross-platform PowerShell profile for PowerShell Core
|
||||||
|
|
||||||
```text
|
```text
|
||||||
.
|
.
|
||||||
├── Aliases.ps1
|
├── Aliases.ps1
|
||||||
├── Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak
|
├── Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak
|
||||||
├── Modules.ps1
|
├── Modules.ps1
|
||||||
├── Navigation.ps1
|
├── Navigation.ps1
|
||||||
├── Prompt.ps1
|
├── Prompt.ps1
|
||||||
├── readme.md
|
├── readme.md
|
||||||
└── Scripts.ps1
|
└── Scripts.ps1
|
||||||
|
|
||||||
1 directory, 7 files
|
1 directory, 7 files
|
||||||
```
|
```
|
||||||
|
|
||||||
| Keymap | Action | Mode |
|
| Keymap | Action | Mode |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `^a` | To Beginning of Line | All |
|
| `^a` | To Beginning of Line | All |
|
||||||
| `^e` | To End of Line | All |
|
| `^e` | To End of Line | All |
|
||||||
| `^[` | To Normal Mode | Insert |
|
| `^[` | To Normal Mode | Insert |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# .dotfiles
|
# .dotfiles
|
||||||
|
|
||||||
Moving to *Colemak*
|
Moving to *Colemak*
|
||||||
|
|
||||||
|
|
|
||||||
19
setup/requirements.txt
Normal file
19
setup/requirements.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# This file lists all the must-have libraries for installing a new computer
|
||||||
|
# For scripting use
|
||||||
|
# pip install -r requirements.txt
|
||||||
|
colorama
|
||||||
|
# Basic Mathemetics
|
||||||
|
numpy
|
||||||
|
matplotlib
|
||||||
|
# Data Analysis
|
||||||
|
pandas
|
||||||
|
# Image Processing
|
||||||
|
pillow
|
||||||
|
# Web Scraping
|
||||||
|
requests
|
||||||
|
beautifulsoup4
|
||||||
|
# Testing
|
||||||
|
pytest
|
||||||
|
mypy
|
||||||
|
# Healthy Neovim
|
||||||
|
pynvim
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode $XDG_CONFIG_HOME/NuGet $XDG_CONFIG_HOME/vim $XDG_CONFIG_HOME/tmux $XDG_CONFIG_HOME/npm
|
mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode $XDG_CONFIG_HOME/NuGet $XDG_CONFIG_HOME/vim $XDG_CONFIG_HOME/tmux $XDG_CONFIG_HOME/npm
|
||||||
mkdir -p ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory
|
mkdir -p ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory
|
||||||
mkdir -p $WAKATIME_HOME
|
mkdir -p $WAKATIME_HOME
|
||||||
mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view
|
mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view
|
||||||
# $DOTFILES/.config
|
# $DOTFILES/.config
|
||||||
ln -sf $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
ln -sf $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
||||||
ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
||||||
ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||||
ln -sf $DOTFILES/.config/markdownlint/.markdownlint.json $XDG_CONFIG_HOME/markdownlint/markdownlint.json
|
ln -sf $DOTFILES/.config/markdownlint/.markdownlint.json $XDG_CONFIG_HOME/markdownlint/markdownlint.json
|
||||||
ln -sf $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
ln -sf $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||||
ln -sf $DOTFILES/.config/NuGet/NuGet.Config $XDG_CONFIG_HOME/NuGet/NuGet.Config
|
ln -sf $DOTFILES/.config/NuGet/NuGet.Config $XDG_CONFIG_HOME/NuGet/NuGet.Config
|
||||||
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
|
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
|
||||||
ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
||||||
ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf
|
ln -sf $DOTFILES/.config/tmux/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf
|
||||||
ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
|
ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
|
||||||
ln -sf $DOTFILES/.config/zellij/config.kdl ~/.config/zellij/config.kdl
|
ln -sf $DOTFILES/.config/zellij/config.kdl ~/.config/zellij/config.kdl
|
||||||
ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
||||||
# $DOTFILES/vscode
|
# $DOTFILES/vscode
|
||||||
ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc
|
ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc
|
||||||
# $DOTFILES root
|
# $DOTFILES root
|
||||||
ln -sf $DOTFILES/.haskeline ~/.haskeline
|
ln -sf $DOTFILES/.haskeline ~/.haskeline
|
||||||
|
|
@ -16,7 +16,9 @@ Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
|
||||||
# Set Environment Variables
|
# Set Environment Variables
|
||||||
# Use %PATH_EXT% to prevent PATH from being too long
|
# Use %PATH_EXT% to prevent PATH from being too long
|
||||||
[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "D:\bin", "User")
|
[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "D:\bin", "User")
|
||||||
[System.Environment]::SetEnvironmentVariable("Path_EXT_1", "", "User")
|
[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "C:\Users\citoy\AppData\Local\Cargo\bin", "User")
|
||||||
|
[System.Environment]::SetEnvironmentVariable("Path_EXT_1", "C:\Users\citoy\AppData\Local\Cargo\bin", "User")
|
||||||
|
[System.Environment]::SetEnvironmentVariable("Path_EXT_2", "C:\Users\citoy\AppData\Local\Cargo\bin", "User")
|
||||||
[System.Environment]::SetEnvironmentVariable("Path_EXT_2", "", "User")
|
[System.Environment]::SetEnvironmentVariable("Path_EXT_2", "", "User")
|
||||||
$currentPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
|
$currentPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
|
||||||
if ($currentPath -notlike "*%PATH_EXT%*") {
|
if ($currentPath -notlike "*%PATH_EXT%*") {
|
||||||
|
|
@ -59,7 +61,7 @@ New-Item -ItemType Directory -Path "$Env:AppData\aws" -Force
|
||||||
# ~\.dotnet -> %LocalAppData%\dotNET :: .NET Core
|
# ~\.dotnet -> %LocalAppData%\dotNET :: .NET Core
|
||||||
[System.Environment]::SetEnvironmentVariable("DOTNET_CLI_HOME", "$Env:LocalAppData\dotNET", "User")
|
[System.Environment]::SetEnvironmentVariable("DOTNET_CLI_HOME", "$Env:LocalAppData\dotNET", "User")
|
||||||
# ~\.emacs.d -> %AppData%\.emacs.d :: Emacs (This is default)
|
# ~\.emacs.d -> %AppData%\.emacs.d :: Emacs (This is default)
|
||||||
# [System.Environment]::SetEnvironmentVariable("EMACS_HOME", "$Env:AppData\emacs.d", "User")
|
# [System.Environment]::SetEnvironmentVariable("EMACS_HOME", "$Env:AppData\emacs.d", "User")
|
||||||
# ~\go -> %LocalAppData%\GO :: golang
|
# ~\go -> %LocalAppData%\GO :: golang
|
||||||
[System.Environment]::SetEnvironmentVariable("GOPATH", "$Env:LocalAppData\GO", "User")
|
[System.Environment]::SetEnvironmentVariable("GOPATH", "$Env:LocalAppData\GO", "User")
|
||||||
# ~\.ipython -> %AppData%\ipython :: IPython
|
# ~\.ipython -> %AppData%\ipython :: IPython
|
||||||
|
|
@ -125,14 +127,14 @@ New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\Vim\_vimrc" -Target
|
||||||
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
||||||
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
|
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
|
||||||
# New-Item -ItemType SymbolicLink -Path "~\.vscode.vimrc" -Target "$DOTFILES\vscode\vscode.vimrc" Use Absolute Path
|
# New-Item -ItemType SymbolicLink -Path "~\.vscode.vimrc" -Target "$DOTFILES\vscode\vscode.vimrc" Use Absolute Path
|
||||||
# Hide dotfiles
|
# Hide dotfiles
|
||||||
Get-ChildItem -Force -Filter .* -Path $HOME | ForEach-Object { $_.Attributes += "Hidden" }
|
Get-ChildItem -Force -Filter .* -Path $HOME | ForEach-Object { $_.Attributes += "Hidden" }
|
||||||
@(
|
@(
|
||||||
Join-Path $HOME '.config'
|
Join-Path $HOME '.config'
|
||||||
Join-Path $HOME '.dotfiles'
|
Join-Path $HOME '.dotfiles'
|
||||||
) | ForEach-Object {
|
) | ForEach-Object {
|
||||||
$_.Attributes -band -bnot [System.IO.FileAttributes]::Hidden
|
$_.Attributes -band -bnot [System.IO.FileAttributes]::Hidden
|
||||||
}
|
}
|
||||||
Set-Location $HOME\Documents
|
Set-Location $HOME\Documents
|
||||||
# Match WindowsPowerShell and PowerShell
|
# Match WindowsPowerShell and PowerShell
|
||||||
Get-ChildItem -Force -Filter *owerShell | ForEach-Object { $_.Attributes += "Hidden" }
|
Get-ChildItem -Force -Filter *owerShell | ForEach-Object { $_.Attributes += "Hidden" }
|
||||||
|
|
@ -167,9 +169,12 @@ scoop install main/ripgrep
|
||||||
scoop install main/wget
|
scoop install main/wget
|
||||||
scoop install main/wget2
|
scoop install main/wget2
|
||||||
scoop install main/cmake
|
scoop install main/cmake
|
||||||
scoop install main/bat
|
scoop install main/bat # modern cat
|
||||||
scoop install main/zoxide
|
scoop install main/zoxide # Directory Jump
|
||||||
scoop install main/dos2unix
|
scoop install main/dos2unix # Convert line endings
|
||||||
|
scoop install main/hyperfine # Benchmark
|
||||||
|
scoop install main/bottom # System Monitor
|
||||||
|
scoop install main/delta # diff
|
||||||
|
|
||||||
# File Management
|
# File Management
|
||||||
scoop install extras/everything
|
scoop install extras/everything
|
||||||
|
|
@ -207,7 +212,7 @@ scoop install keyguard/keyguard
|
||||||
|
|
||||||
# PKM
|
# PKM
|
||||||
scoop install extras/obsidian
|
scoop install extras/obsidian
|
||||||
winget install -e --id 9P7HPMXP73K4 # Siyuan
|
winget install -e --id 9P7HPMXP73K4 # Siyuan
|
||||||
scoop install extras/typora
|
scoop install extras/typora
|
||||||
scoop install extras/zotero
|
scoop install extras/zotero
|
||||||
scoop install extras/anki
|
scoop install extras/anki
|
||||||
|
|
@ -215,7 +220,7 @@ scoop install extras/anki
|
||||||
|
|
||||||
# Browser
|
# Browser
|
||||||
# Use Microsoft Edge directly
|
# Use Microsoft Edge directly
|
||||||
# winget install -e --id TheBrowserCompany.Arc
|
# winget install -e --id TheBrowserCompany.Arc
|
||||||
# winget install -e --id Mozilla.Firefox.Nightly # Not working
|
# winget install -e --id Mozilla.Firefox.Nightly # Not working
|
||||||
|
|
||||||
# Programming Languages
|
# Programming Languages
|
||||||
|
|
@ -223,7 +228,7 @@ winget install -e --id Python.Python.3.13
|
||||||
winget install -e --id Anaconda.Miniconda3
|
winget install -e --id Anaconda.Miniconda3
|
||||||
winget install -e --id OpenJS.NodeJS
|
winget install -e --id OpenJS.NodeJS
|
||||||
winget install -e --id Rustlang.Rustup
|
winget install -e --id Rustlang.Rustup
|
||||||
winget install -e --id Microsoft.DotNet.SDK.8
|
winget install -e --id Microsoft.DotNet.SDK.9
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
scoop install extras/docker
|
scoop install extras/docker
|
||||||
|
|
@ -260,4 +265,4 @@ scoop install LXGWWenKaiMono # 霞鹜文楷Mono
|
||||||
|
|
||||||
# WSL
|
# WSL
|
||||||
scoop install archwsl
|
scoop install archwsl
|
||||||
wsl --set-version Arch 1
|
wsl --set-version Arch 1
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
snippet hio "include stdio.h" iA
|
snippet hio "include stdio.h" iA
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet hlib "include stdlib.h" iA
|
snippet hlib "include stdlib.h" iA
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet hmath "include math.h" iA
|
snippet hmath "include math.h" iA
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet hstr "include string.h" iA
|
snippet hstr "include string.h" iA
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
endsnippet
|
endsnippet
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,8 @@
|
||||||
# VSCode HyperSnips Snippets
|
# VSCode HyperSnips Snippets
|
||||||
|
|
||||||
## Navigator
|
## Navigator
|
||||||
|
|
||||||
- [C](./c.hsnips)
|
- [C](./c.hsnips)
|
||||||
- [$\LaTeX$](./latex.hsnips)
|
- [$\LaTeX$](./latex.hsnips)
|
||||||
- [Markdown](./markdown.hsnips)
|
- [Markdown](./markdown.hsnips)
|
||||||
- [Typst](./typst.hsnips)
|
- [Typst](./typst.hsnips)
|
||||||
|
|
@ -1,133 +1,133 @@
|
||||||
snippet mk "inline Math" iwA
|
snippet mk "inline Math" iwA
|
||||||
$${1}$
|
$${1}$
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet dmi "display Math" iwA
|
snippet dmi "display Math" iwA
|
||||||
$ ${1} $
|
$ ${1} $
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet dmm "display Math" iwA
|
snippet dmm "display Math" iwA
|
||||||
$
|
$
|
||||||
${1}
|
${1}
|
||||||
$
|
$
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet pp "parenthesis" iAm
|
snippet pp "parenthesis" iAm
|
||||||
(${1})
|
(${1})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet lim "limit" iAm
|
snippet lim "limit" iAm
|
||||||
lim_(${1:n} -> ${2:oo})
|
lim_(${1:n} -> ${2:oo})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet derive "derive" iAm
|
snippet derive "derive" iAm
|
||||||
derive(${1:f}, ${2:x})
|
derive(${1:f}, ${2:x})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet part "partial" iAm
|
snippet part "partial" iAm
|
||||||
(diff ${1:f})/(diff ${3:x})
|
(diff ${1:f})/(diff ${3:x})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet sb "subscript" iAm
|
snippet sb "subscript" iAm
|
||||||
_(${1:2})
|
_(${1:2})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet sr "square" iAm
|
snippet sr "square" iAm
|
||||||
^2
|
^2
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet pow "to the ... power" iAm
|
snippet pow "to the ... power" iAm
|
||||||
^(${1:3})
|
^(${1:3})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet veps "epsilon.alt" iAm
|
snippet veps "epsilon.alt" iAm
|
||||||
epsilon.alt
|
epsilon.alt
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ;; "\;" iAm
|
snippet ;; "\;" iAm
|
||||||
\;
|
\;
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet ,, "\," iAm
|
snippet ,, "\," iAm
|
||||||
\,
|
\,
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `([A-Za-z\)])(\d)` "auto subscript" iAm
|
snippet `([A-Za-z\)])(\d)` "auto subscript" iAm
|
||||||
`` rv = m[1] + "_" + m[2]``
|
`` rv = m[1] + "_" + m[2]``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm
|
snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm
|
||||||
`` rv = m[1] + "_(" + m[2] + ")" ``
|
`` rv = m[1] + "_(" + m[2] + ")" ``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `(?<![A-Za-z])([A-Za-hk-z])([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript" iAm
|
snippet `(?<![A-Za-z])([A-Za-hk-z])([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript" iAm
|
||||||
`` rv = m[1] + "_" + m[2] ``
|
`` rv = m[1] + "_" + m[2] ``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
# Custom: Add more greek letters
|
# Custom: Add more greek letters
|
||||||
|
|
||||||
snippet `(\)|mu|alpha|sigma|rho|beta|gamma|delta|zeta|eta|varepsilon|epsilon|theta|iota|kappa|vartheta|lambda|nu|pi|rho|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript for greek letter" iAm
|
snippet `(\)|mu|alpha|sigma|rho|beta|gamma|delta|zeta|eta|varepsilon|epsilon|theta|iota|kappa|vartheta|lambda|nu|pi|rho|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript for greek letter" iAm
|
||||||
`` rv = m[1] + "_" + m[2].substring(0, 1) ``
|
`` rv = m[1] + "_" + m[2].substring(0, 1) ``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `(?<![A-Za-z])([A-Za-hk-z01])(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
snippet `(?<![A-Za-z])([A-Za-hk-z01])(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
||||||
``
|
``
|
||||||
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
||||||
rv = (map[m[2]] || m[2]) + "(" + m[1] + ")"
|
rv = (map[m[2]] || m[2]) + "(" + m[1] + ")"
|
||||||
``
|
``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `(mu|alpha|sigma|rho|beta|gamma|delta|zeta|eta|varepsilon|epsilon|theta|iota|kappa|vartheta|lambda|nu|pi|rho|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
snippet `(mu|alpha|sigma|rho|beta|gamma|delta|zeta|eta|varepsilon|epsilon|theta|iota|kappa|vartheta|lambda|nu|pi|rho|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
||||||
``
|
``
|
||||||
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
||||||
rv = (map[m[2]] || m[2]) + "(" + m[1] + ")"
|
rv = (map[m[2]] || m[2]) + "(" + m[1] + ")"
|
||||||
``
|
``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `((grave|acute|hat|tilde|macron|breve|dot|dot\.double|dot\.triple|dot\.quad|diaer|circle|acute\.double|caron|arrow|arrow\.l|upright|italic|bold|sans|frak|mono|bb|cal)\([a-zA-Z\d]+\))(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
snippet `((grave|acute|hat|tilde|macron|breve|dot|dot\.double|dot\.triple|dot\.quad|diaer|circle|acute\.double|caron|arrow|arrow\.l|upright|italic|bold|sans|frak|mono|bb|cal)\([a-zA-Z\d]+\))(grave|acute|hat|tilde|macron|breve|dot|ddot|dddot|ddddot|diaer|circle|caron|vec|upright|italic|b|sans|frak|mono|bb|cal|ov)` "hat" iAm
|
||||||
``
|
``
|
||||||
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
const map = { "ddot": "dot.double", "dddot": "dot.triple", "ddddot": "dot.quad", "vec": "arrow", "b": "bold", "ov": "overline" }
|
||||||
rv = (map[m[3]] || m[3]) + "(" + m[1] + ")"
|
rv = (map[m[3]] || m[3]) + "(" + m[1] + ")"
|
||||||
``
|
``
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet `(?<!\.)alt` "alt" iAm
|
snippet `(?<!\.)alt` "alt" iAm
|
||||||
.alt
|
.alt
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet invs "inverse" iAm
|
snippet invs "inverse" iAm
|
||||||
^(-1)
|
^(-1)
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet xl "vector" iAm
|
snippet xl "vector" iAm
|
||||||
arrow(${1:x})
|
arrow(${1:x})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet @< "angle" iAm
|
snippet @< "angle" iAm
|
||||||
angle.l ${1:x} angle.r
|
angle.l ${1:x} angle.r
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
|
|
||||||
snippet HL "highlight" iA
|
snippet HL "highlight" iA
|
||||||
#highlight[${VISUAL}]
|
#highlight[${VISUAL}]
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet iiint "triple integral" iAm
|
snippet iiint "triple integral" iAm
|
||||||
integral.triple ${1}
|
integral.triple ${1}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet oint "closed line integral" iAm
|
snippet oint "closed line integral" iAm
|
||||||
integral.cont ${1}
|
integral.cont ${1}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet iint "double integral" iAm
|
snippet iint "double integral" iAm
|
||||||
integral.double ${1}
|
integral.double ${1}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet int "integral" iAm
|
snippet int "integral" iAm
|
||||||
integral ${1}
|
integral ${1}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet // "frac" iAm
|
snippet // "frac" iAm
|
||||||
frac(${1:1}, ${2:2})
|
frac(${1:1}, ${2:2})
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
" ~/.config/vscode/vscode.vimrc
|
" ~/.config/vscode/vscode.vimrc
|
||||||
" New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc
|
" New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc
|
||||||
" ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode/vscode.vimrc
|
" ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode/vscode.vimrc
|
||||||
" And go to vscode vim setting:
|
" And go to vscode vim setting:
|
||||||
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",
|
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",
|
||||||
|
|
||||||
" Arrow remap
|
" Arrow remap
|
||||||
noremap n j
|
noremap n j
|
||||||
noremap e k
|
noremap e k
|
||||||
noremap i l
|
noremap i l
|
||||||
|
|
||||||
" Similar position to i
|
" Similar position to i
|
||||||
noremap l i
|
noremap l i
|
||||||
noremap L I
|
noremap L I
|
||||||
" ne[k]st
|
" ne[k]st
|
||||||
noremap k n
|
noremap k n
|
||||||
noremap K N
|
noremap K N
|
||||||
" [j]ump
|
" [j]ump
|
||||||
noremap j e
|
noremap j e
|
||||||
noremap J E
|
noremap J E
|
||||||
|
|
||||||
" Y to yank to end of line
|
" Y to yank to end of line
|
||||||
noremap Y y$
|
noremap Y y$
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
# ~/.wslconfig
|
# ~/.wslconfig
|
||||||
# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig
|
# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig
|
||||||
[wsl2]
|
[wsl2]
|
||||||
networkingMode=mirrored
|
networkingMode=mirrored
|
||||||
dnsTunneling=true
|
dnsTunneling=true
|
||||||
firewall=true
|
firewall=true
|
||||||
autoProxy=true
|
autoProxy=true
|
||||||
|
|
||||||
[experimental]
|
[experimental]
|
||||||
# requires dnsTunneling but are also OPTIONAL
|
# requires dnsTunneling but are also OPTIONAL
|
||||||
bestEffortDnsParsing=true
|
bestEffortDnsParsing=true
|
||||||
hostAddressLoopback=true
|
hostAddressLoopback=true
|
||||||
|
|
@ -39,6 +39,9 @@ function Find-AppPackageListRemote {
|
||||||
winget search $Name
|
winget search $Name
|
||||||
Write-Host "=== choco ==="
|
Write-Host "=== choco ==="
|
||||||
choco search $Name
|
choco search $Name
|
||||||
|
# Too slow!
|
||||||
|
# Write-Host "=== scoop ==="
|
||||||
|
# scoop search $Name
|
||||||
}
|
}
|
||||||
Set-Alias "pkgsearch" "Find-AppPackageListRemote"
|
Set-Alias "pkgsearch" "Find-AppPackageListRemote"
|
||||||
function Get-AppPackageListLocal {
|
function Get-AppPackageListLocal {
|
||||||
|
|
@ -94,3 +97,14 @@ if (-not ($__lastStartup -eq $_currentDate)) {
|
||||||
Remove-Variable SystemlogFilePath
|
Remove-Variable SystemlogFilePath
|
||||||
Remove-Variable __lastStartup
|
Remove-Variable __lastStartup
|
||||||
Remove-Variable _currentDate
|
Remove-Variable _currentDate
|
||||||
|
|
||||||
|
# Use some unix commands
|
||||||
|
${function:tree} = { wsl tree $args}
|
||||||
|
${function:ln} = { coreutils.exe ln $args}
|
||||||
|
${function:la} = { lsd.exe -la $args}
|
||||||
|
|
||||||
|
# Set default applications
|
||||||
|
$Env:PAGER = "less"
|
||||||
|
$Env:EDITOR = "code --wait"
|
||||||
|
$Env:VISUAL = "code --wait"
|
||||||
|
$Env:FILE_MANAGER = "dopus.exe"
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"$help": "https://aka.ms/terminal-documentation",
|
"$help": "https://aka.ms/terminal-documentation",
|
||||||
"$schema": "https://aka.ms/terminal-profiles-schema",
|
"$schema": "https://aka.ms/terminal-profiles-schema",
|
||||||
"actions":
|
"actions":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"command":
|
"command":
|
||||||
{
|
{
|
||||||
"action": "copy",
|
"action": "copy",
|
||||||
"singleLine": false
|
"singleLine": false
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
"keys": "ctrl+shift+f"
|
"keys": "ctrl+shift+f"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command":
|
"command":
|
||||||
{
|
{
|
||||||
"action": "splitPane",
|
"action": "splitPane",
|
||||||
"split": "auto",
|
"split": "auto",
|
||||||
|
|
@ -41,15 +41,15 @@
|
||||||
"focusFollowMouse": false,
|
"focusFollowMouse": false,
|
||||||
"language": "zh-Hans",
|
"language": "zh-Hans",
|
||||||
"minimizeToNotificationArea": false,
|
"minimizeToNotificationArea": false,
|
||||||
"newTabMenu":
|
"newTabMenu":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"type": "remainingProfiles"
|
"type": "remainingProfiles"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"profiles":
|
"profiles":
|
||||||
{
|
{
|
||||||
"defaults":
|
"defaults":
|
||||||
{
|
{
|
||||||
"adjustIndistinguishableColors": "always",
|
"adjustIndistinguishableColors": "always",
|
||||||
"antialiasingMode": "cleartype",
|
"antialiasingMode": "cleartype",
|
||||||
|
|
@ -58,11 +58,11 @@
|
||||||
"colorScheme": "Catppuccin Mocha",
|
"colorScheme": "Catppuccin Mocha",
|
||||||
"compatibility.reloadEnvironmentVariables": false,
|
"compatibility.reloadEnvironmentVariables": false,
|
||||||
"experimental.retroTerminalEffect": false,
|
"experimental.retroTerminalEffect": false,
|
||||||
"font":
|
"font":
|
||||||
{
|
{
|
||||||
"colorGlyphs": true,
|
"colorGlyphs": true,
|
||||||
"face": "CaskaydiaCove Nerd Font",
|
"face": "CaskaydiaCove Nerd Font",
|
||||||
"features":
|
"features":
|
||||||
{
|
{
|
||||||
"rlig": 1
|
"rlig": 1
|
||||||
}
|
}
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
"showMarksOnScrollbar": true,
|
"showMarksOnScrollbar": true,
|
||||||
"useAcrylic": true
|
"useAcrylic": true
|
||||||
},
|
},
|
||||||
"list":
|
"list":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"colorScheme": "Catppuccin Frappe",
|
"colorScheme": "Catppuccin Frappe",
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
{
|
{
|
||||||
"colorScheme": "Ubuntu-ColorScheme",
|
"colorScheme": "Ubuntu-ColorScheme",
|
||||||
"commandline": "C:\\WINDOWS\\system32\\wsl.exe -d Ubuntu-22.04",
|
"commandline": "C:\\WINDOWS\\system32\\wsl.exe -d Ubuntu-22.04",
|
||||||
"font":
|
"font":
|
||||||
{
|
{
|
||||||
"face": "CaskaydiaCove Nerd Font"
|
"face": "CaskaydiaCove Nerd Font"
|
||||||
},
|
},
|
||||||
|
|
@ -118,6 +118,16 @@
|
||||||
"name": "Ubuntu",
|
"name": "Ubuntu",
|
||||||
"startingDirectory": "~"
|
"startingDirectory": "~"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"colorScheme": "Catppuccin Frappe",
|
||||||
|
"commandline": "C:\\Users\\citoy\\AppData\\Local\\Programs\\nu\\bin\\nu.exe",
|
||||||
|
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
|
||||||
|
"hidden": false,
|
||||||
|
"name": "PowerShell",
|
||||||
|
"opacity": 50,
|
||||||
|
"source": "Windows.Terminal.PowershellCore",
|
||||||
|
"tabTitle": "PS"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
|
"guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
|
|
@ -138,7 +148,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"schemes":
|
"schemes":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"background": "#303446",
|
"background": "#303446",
|
||||||
|
|
@ -260,23 +270,23 @@
|
||||||
"startOnUserLogin": true,
|
"startOnUserLogin": true,
|
||||||
"tabWidthMode": "titleLength",
|
"tabWidthMode": "titleLength",
|
||||||
"theme": "Catppuccin Macchiato",
|
"theme": "Catppuccin Macchiato",
|
||||||
"themes":
|
"themes":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "Catppuccin Frappe",
|
"name": "Catppuccin Frappe",
|
||||||
"tab":
|
"tab":
|
||||||
{
|
{
|
||||||
"background": "#303446FF",
|
"background": "#303446FF",
|
||||||
"iconStyle": "default",
|
"iconStyle": "default",
|
||||||
"showCloseButton": "always",
|
"showCloseButton": "always",
|
||||||
"unfocusedBackground": null
|
"unfocusedBackground": null
|
||||||
},
|
},
|
||||||
"tabRow":
|
"tabRow":
|
||||||
{
|
{
|
||||||
"background": "#292C3CFF",
|
"background": "#292C3CFF",
|
||||||
"unfocusedBackground": "#232634FF"
|
"unfocusedBackground": "#232634FF"
|
||||||
},
|
},
|
||||||
"window":
|
"window":
|
||||||
{
|
{
|
||||||
"applicationTheme": "dark",
|
"applicationTheme": "dark",
|
||||||
"experimental.rainbowFrame": false,
|
"experimental.rainbowFrame": false,
|
||||||
|
|
@ -287,19 +297,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Catppuccin Latte",
|
"name": "Catppuccin Latte",
|
||||||
"tab":
|
"tab":
|
||||||
{
|
{
|
||||||
"background": "#EFF1F5FF",
|
"background": "#EFF1F5FF",
|
||||||
"iconStyle": "default",
|
"iconStyle": "default",
|
||||||
"showCloseButton": "always",
|
"showCloseButton": "always",
|
||||||
"unfocusedBackground": null
|
"unfocusedBackground": null
|
||||||
},
|
},
|
||||||
"tabRow":
|
"tabRow":
|
||||||
{
|
{
|
||||||
"background": "#E6E9EFFF",
|
"background": "#E6E9EFFF",
|
||||||
"unfocusedBackground": "#DCE0E8FF"
|
"unfocusedBackground": "#DCE0E8FF"
|
||||||
},
|
},
|
||||||
"window":
|
"window":
|
||||||
{
|
{
|
||||||
"applicationTheme": "light",
|
"applicationTheme": "light",
|
||||||
"experimental.rainbowFrame": false,
|
"experimental.rainbowFrame": false,
|
||||||
|
|
@ -310,19 +320,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Catppuccin Macchiato",
|
"name": "Catppuccin Macchiato",
|
||||||
"tab":
|
"tab":
|
||||||
{
|
{
|
||||||
"background": "#24273AFF",
|
"background": "#24273AFF",
|
||||||
"iconStyle": "default",
|
"iconStyle": "default",
|
||||||
"showCloseButton": "always",
|
"showCloseButton": "always",
|
||||||
"unfocusedBackground": null
|
"unfocusedBackground": null
|
||||||
},
|
},
|
||||||
"tabRow":
|
"tabRow":
|
||||||
{
|
{
|
||||||
"background": "#1E2030FF",
|
"background": "#1E2030FF",
|
||||||
"unfocusedBackground": "#181926FF"
|
"unfocusedBackground": "#181926FF"
|
||||||
},
|
},
|
||||||
"window":
|
"window":
|
||||||
{
|
{
|
||||||
"applicationTheme": "dark",
|
"applicationTheme": "dark",
|
||||||
"experimental.rainbowFrame": false,
|
"experimental.rainbowFrame": false,
|
||||||
|
|
@ -333,19 +343,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Catppuccin Mocha",
|
"name": "Catppuccin Mocha",
|
||||||
"tab":
|
"tab":
|
||||||
{
|
{
|
||||||
"background": "#1E1E2EFF",
|
"background": "#1E1E2EFF",
|
||||||
"iconStyle": "default",
|
"iconStyle": "default",
|
||||||
"showCloseButton": "always",
|
"showCloseButton": "always",
|
||||||
"unfocusedBackground": null
|
"unfocusedBackground": null
|
||||||
},
|
},
|
||||||
"tabRow":
|
"tabRow":
|
||||||
{
|
{
|
||||||
"background": "#181825FF",
|
"background": "#181825FF",
|
||||||
"unfocusedBackground": "#11111BFF"
|
"unfocusedBackground": "#11111BFF"
|
||||||
},
|
},
|
||||||
"window":
|
"window":
|
||||||
{
|
{
|
||||||
"applicationTheme": "dark",
|
"applicationTheme": "dark",
|
||||||
"experimental.rainbowFrame": false,
|
"experimental.rainbowFrame": false,
|
||||||
|
|
@ -356,4 +366,4 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"useAcrylicInTabRow": true
|
"useAcrylicInTabRow": true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
fork = false
|
fork = false
|
||||||
frame = "full"
|
frame = "full"
|
||||||
idle = true
|
idle = true
|
||||||
maximized = false
|
maximized = false
|
||||||
no-multigrid = false
|
no-multigrid = false
|
||||||
srgb = false
|
srgb = false
|
||||||
tabs = true
|
tabs = true
|
||||||
theme = "auto"
|
theme = "auto"
|
||||||
title-hidden = true
|
title-hidden = true
|
||||||
vsync = false
|
vsync = false
|
||||||
wsl = false
|
wsl = true
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||||
size = 14.0
|
size = 14.0
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,50 @@
|
||||||
# Windows dotfiles
|
# Windows dotfiles
|
||||||
|
|
||||||
By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix:
|
By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix:
|
||||||
|
|
||||||
- `%APPDATA%` - `$XDG_CONFIG_HOME` (default: `%USERPROFILE%\AppData\Roaming`)
|
- `%APPDATA%` - `$XDG_CONFIG_HOME` (default: `%USERPROFILE%\AppData\Roaming`)
|
||||||
|
|
||||||
|
|
||||||
## PowerShell Profile
|
## PowerShell Profile
|
||||||
|
|
||||||
This is the *[PowerShell Core](https://github.com/PowerShell/PowerShell)* profile, not the legacy *Windows PowerShell* profile.
|
This is the *[PowerShell Core](https://github.com/PowerShell/PowerShell)* profile, not the legacy *Windows PowerShell* profile.
|
||||||
|
|
||||||
By default, PowerShell profile is stored in `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`.
|
By default, PowerShell profile is stored in `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`.
|
||||||
|
|
||||||
It is convenient to use `$PROFILE` to locate the profile file.
|
It is convenient to use `$PROFILE` to locate the profile file.
|
||||||
|
|
||||||
```pwsh
|
```pwsh
|
||||||
Test-Path $PROFILE
|
Test-Path $PROFILE
|
||||||
```
|
```
|
||||||
|
|
||||||
To link the profile file:
|
To link the profile file:
|
||||||
|
|
||||||
```pwsh
|
```pwsh
|
||||||
New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1" -Force
|
New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1" -Force
|
||||||
```
|
```
|
||||||
|
|
||||||
I use [starship](https://starship.rs/) to customize the prompt, which is located in [`.dotfiles/.config/starship/starship_pwsh.toml`](../.config/starship/starship_pwsh.toml). This prompt config is cross-platform for powershell core, since I use the promp to identify the shell.
|
I use [starship](https://starship.rs/) to customize the prompt, which is located in [`.dotfiles/.config/starship/starship_pwsh.toml`](../.config/starship/starship_pwsh.toml). This prompt config is cross-platform for powershell core, since I use the promp to identify the shell.
|
||||||
|
|
||||||
## `.wslconfig` - WSL Configuration
|
## `.wslconfig` - WSL Configuration
|
||||||
|
|
||||||
`.wslconfig` only supports `~/.wslconfig` as the configuration path
|
`.wslconfig` only supports `~/.wslconfig` as the configuration path
|
||||||
|
|
||||||
```pwsh
|
```pwsh
|
||||||
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Windows Terminal
|
## Windows Terminal
|
||||||
|
|
||||||
Use Hard Link to sync Windows Terminal Settings since it doesn't support symlink.
|
Use Hard Link to sync Windows Terminal Settings since it doesn't support symlink.
|
||||||
|
|
||||||
```pwsh
|
```pwsh
|
||||||
New-Item -ItemType HardLink -Path "$Env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Target "$DOTFILES\win\WindowsTerminal.json" -Force
|
New-Item -ItemType HardLink -Path "$Env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Target "$DOTFILES\win\WindowsTerminal.json" -Force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Neovide
|
## Neovide
|
||||||
|
|
||||||
Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml`
|
Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml`
|
||||||
|
|
||||||
```pwsh
|
```pwsh
|
||||||
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
|
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
|
||||||
```
|
```
|
||||||
18
wsl/.bashrc
Normal file
18
wsl/.bashrc
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Append to original bashrc for minimal setup
|
||||||
|
# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc
|
||||||
|
set -o vi
|
||||||
|
|
||||||
|
bind '"\en": "\C-j"'
|
||||||
|
bind '"\ee": "\C-k"'
|
||||||
|
bind '"\ei": "\C-l"'
|
||||||
|
|
||||||
|
bind '"\el": "\ei"'
|
||||||
|
bind '"\eL": "\eI"'
|
||||||
|
|
||||||
|
bind '"\ek": "\en"'
|
||||||
|
bind '"\eK": "\eN"'
|
||||||
|
|
||||||
|
bind '"\ej": "\ee"'
|
||||||
|
bind '"\eJ": "\eE"'
|
||||||
|
|
||||||
|
bind '"\eY": "\ey$"'
|
||||||
|
|
@ -70,4 +70,11 @@ fi
|
||||||
|
|
||||||
# vcpkg
|
# vcpkg
|
||||||
|
|
||||||
export VCPKG_ROOT=~/vcpkg
|
export VCPKG_ROOT=~/vcpkg
|
||||||
|
|
||||||
|
# Package Manager
|
||||||
|
|
||||||
|
alias pac="sudo pacman"
|
||||||
|
alias paci="sudo pacman -S"
|
||||||
|
alias pacr="sudo pacman -R"
|
||||||
|
alias pacu="sudo pacman -Ss"
|
||||||
|
|
|
||||||
|
|
@ -29,22 +29,22 @@ alias pymkenv="conda create --name"
|
||||||
alias v=nvim
|
alias v=nvim
|
||||||
alias c=code
|
alias c=code
|
||||||
|
|
||||||
# lsd #
|
# lsd #
|
||||||
alias ls='lsd -a'
|
alias ls='lsd -a'
|
||||||
alias l='lsd -lah'
|
alias l='lsd -lah'
|
||||||
# Misc #
|
# Misc #
|
||||||
alias cf=cfiles
|
alias cf=cfiles
|
||||||
|
|
||||||
# Functions #
|
# Functions #
|
||||||
mcd() {
|
mkcd() {
|
||||||
mkdir -p -- "$0" && cd -P -- "$1"
|
mkdir -p -- "$0" && cd -P -- "$1"
|
||||||
}
|
}
|
||||||
cdls(){
|
cdls(){
|
||||||
cd $1 && ls
|
cd $1 && ls
|
||||||
}
|
}
|
||||||
tc(){
|
tc(){
|
||||||
touch $1 && code $1
|
touch $1 && code $1
|
||||||
}
|
}
|
||||||
tv(){
|
tv(){
|
||||||
touch $1 && nvim $1
|
touch $1 && nvim $1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ PAGER="less"
|
||||||
EDITOR="nvim"
|
EDITOR="nvim"
|
||||||
VISUAL="nvim"
|
VISUAL="nvim"
|
||||||
|
|
||||||
# Use XDG Base Directory Specification #
|
# Use XDG Base Directory Specification #
|
||||||
|
|
||||||
# ~/.azure/ -> $XDG_DATA_HOME/azure/
|
# ~/.azure/ -> $XDG_DATA_HOME/azure/
|
||||||
export AZURE_CONFIG_DIR="$XDG_DATA_HOME"/azure
|
export AZURE_CONFIG_DIR="$XDG_DATA_HOME"/azure
|
||||||
|
|
@ -50,7 +50,7 @@ if command -v node > /dev/null; then
|
||||||
export NPM_CONFIG_CACHE="$XDG_CACHE_HOME"/npm
|
export NPM_CONFIG_CACHE="$XDG_CACHE_HOME"/npm
|
||||||
export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR"/npm
|
export NPM_CONFIG_TMP="$XDG_RUNTIME_DIR"/npm
|
||||||
fi
|
fi
|
||||||
# ~/.python_history -> $XDG_DATA_HOME/python/history
|
# ~/.python_history -> $XDG_DATA_HOME/python/history
|
||||||
# Works only with Python 3.13.0a3 and later
|
# Works only with Python 3.13.0a3 and later
|
||||||
export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history
|
export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history
|
||||||
# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr
|
# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr
|
||||||
|
|
@ -67,4 +67,4 @@ export _Z_DATA="$XDG_DATA_HOME/z"
|
||||||
# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump*
|
# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump*
|
||||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||||
# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history
|
# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history
|
||||||
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue