mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
WSL: Merge
This commit is contained in:
commit
29729674e5
78 changed files with 5817 additions and 4833 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
|
@ -1,10 +1,6 @@
|
|||
<!-- $XDG_CONFIG_HOME/NuGet/NuGet.Config -->
|
||||
<!-- $Env:APPDATA/NuGet/NuGet.Config -->
|
||||
|
||||
<!-- https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file -->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# $XDG_CONFIG_HOME/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
|
||||
# ==================================================================
|
||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
||||
auto_activate_base: false
|
||||
# $XDG_CONFIG_HOME/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
|
||||
# ==================================================================
|
||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
||||
auto_activate_base: false
|
||||
|
|
|
|||
|
|
@ -1,13 +1,20 @@
|
|||
# $XDG_CONFIG_HOME/git/config
|
||||
# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
||||
# New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig"
|
||||
[user]
|
||||
name = js0ny
|
||||
email = json.y@outlook.com
|
||||
[core]
|
||||
editor = vim
|
||||
[filter "lfs"]
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
# $XDG_CONFIG_HOME/git/config
|
||||
# %USERPROFILE%\.gitconfig # No XDG support on Windows
|
||||
# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config
|
||||
# New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig"
|
||||
[user]
|
||||
name = js0ny
|
||||
email = json.y@outlook.com
|
||||
[core]
|
||||
editor = nvim
|
||||
pager = delta
|
||||
[interactive]
|
||||
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
|
||||
|
|
@ -1,152 +1,152 @@
|
|||
"$XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
" New-Item -ItemType SymbolicLink -Path ~\.ideavimrc -Target $DOTFILES\.config\ideavim\ideavimrc.vimrc
|
||||
" ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
""" Basic Configs """
|
||||
let mapleader = " " " set <leader> to <space>
|
||||
|
||||
""" Colemak """
|
||||
" Word wrap
|
||||
noremap n gj
|
||||
noremap e gk
|
||||
noremap i l
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
""" Options """
|
||||
" search for actions: :actionlist <patter>
|
||||
|
||||
"" Vim Compat ""
|
||||
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
|
||||
set gdefault " substitute all occurrences in line per default
|
||||
set history=4096 " keep x lines of command line history
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set incsearch
|
||||
set keymodel=startsel,stopsel
|
||||
set matchpairs+=<:>
|
||||
set showcmd
|
||||
set smartcase " no ignore case when pattern is uppercase
|
||||
set wrapscan " searches wrap around the end of the file
|
||||
|
||||
"" IDE Settings ""
|
||||
set scrolloff=5
|
||||
set sidescrolloff=10
|
||||
|
||||
"" IDE Features ""
|
||||
set relativenumber " Hybrid Line Number shown
|
||||
|
||||
"" IdeaVim Only ""
|
||||
set ideajoin
|
||||
set ideastatusicon=enabled
|
||||
|
||||
""" Plugins """
|
||||
|
||||
Plug 'justinmk/vim-sneak'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
|
||||
""" Keybindings """
|
||||
|
||||
"" edit ideavim config <leader>v + ""
|
||||
nnoremap <leader>vv :e ~/.ideavimrc<CR>
|
||||
nnoremap <leader>vr :source ~/.ideavimrc<CR>
|
||||
|
||||
"" NERDTree ""
|
||||
nnoremap <leader>e :NERDTreeToggle<CR>
|
||||
|
||||
"" EasyMotion ""
|
||||
nmap s <Plug>(easymotion-f)
|
||||
nmap S <Plug>(easymotion-F)
|
||||
|
||||
"" Sneak ""
|
||||
nmap f <Plug>(sneak-s)
|
||||
nmap F <Plug>(sneak-S)
|
||||
|
||||
"" Miscs ""
|
||||
nnoremap <leader>: :action GotoAction<CR>
|
||||
|
||||
"" AI Related <leader>a + ""
|
||||
nnoremap <leader>ac :action copilot.chat.show<CR>
|
||||
nnoremap <leader>ad :action copilot.disableCopilot<CR>
|
||||
nnoremap <leader>ae :action copilot.enableCopilot<CR>
|
||||
nnoremap <leader>ai :action copilot.openCopilot<CR>
|
||||
|
||||
"" Codes Action <leader>c + ""
|
||||
nnoremap <leader>cf :action ReformatCode<CR>
|
||||
nnoremap <leader>cs :action GotoSymbol<CR>
|
||||
nnoremap <leader>c/ :action CommentByLineComment<CR>
|
||||
|
||||
"" Project Action <leader>p + ""
|
||||
nnoremap <leader>pr :action Run<CR>
|
||||
nnoremap <leader>pd :action Debug<CR>
|
||||
nnoremap <leader>pb :action Build<CR>
|
||||
|
||||
"" Files Action <leader>f + ""
|
||||
nnoremap <leader>fe :NERDTreeToggle<CR>
|
||||
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
|
||||
|
||||
"" Tab Actions <leader><tab> + ""
|
||||
nnoremap <leader><tab><tab> :action Switcher<CR>
|
||||
|
||||
"" Collapse and Expand z + ""
|
||||
nnoremap zi :action ExpandCollapseToggleAction<CR>
|
||||
nnoremap zc :action CollapseRegion<CR>
|
||||
nnoremap zC :action CollapseRegionRecursively<CR>
|
||||
nnoremap zM :action CollapseAll<CR>
|
||||
nnoremap zo :action ExpandRegion<CR>
|
||||
nnoremap zO :action ExpandRegionRecursively<CR>
|
||||
nnoremap zR :action ExpandAll<CR>
|
||||
|
||||
"" don't lose selection when indenting ""
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
vnoremap = =gv
|
||||
|
||||
|
||||
nnoremap <leader>a :action FindInPath<CR>
|
||||
nnoremap gd :action GotoDeclaration<CR>
|
||||
nnoremap gtd :action GotoTypeDeclaration<CR>
|
||||
nnoremap gtD :action QuickTypeDefinition<CR>
|
||||
nnoremap gr :action ShowUsages<CR>
|
||||
nnoremap gi :action GotoImplementation<CR>
|
||||
nnoremap gpi :action QuickImplementations<CR>
|
||||
nnoremap gs :action GotoSuperMethod<CR>
|
||||
nnoremap ga :action
|
||||
nnoremap gq :action ShowIntentionActions<CR>
|
||||
nnoremap ge :action GotoNextError<CR>
|
||||
|
||||
nnoremap <C-p> :action ParameterInfo<CR>
|
||||
inoremap <C-p> <C-o>:action ParameterInfo<CR>
|
||||
|
||||
"" Refractor <leader>r + ""
|
||||
|
||||
nnoremap <leader>ri :action Inline<CR>
|
||||
nnoremap <leader>rr :action RenameElement<CR>
|
||||
nnoremap <leader>rev :action IntroduceVariable<CR>
|
||||
vnoremap <leader>rev :action IntroduceVariable<CR>
|
||||
nnoremap <leader>rem :action ExtractMethod<CR>
|
||||
vnoremap <leader>rem :action ExtractMethod<CR>
|
||||
nnoremap <leader>rm :action Move<CR>
|
||||
nnoremap <leader>ro :action OptimizeImports<CR>
|
||||
nnoremap <leader>rG :action Generate<CR>
|
||||
|
||||
""" Handling Ctrls """
|
||||
|
||||
sethandler <C-V> n-v:vim i:ide
|
||||
sethandler <C-.> a:ide
|
||||
"$XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
" New-Item -ItemType SymbolicLink -Path ~\.ideavimrc -Target $DOTFILES\.config\ideavim\ideavimrc.vimrc
|
||||
" ln -sf $DOTFILES/.config/ideavim/ideavimrc.vimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
||||
""" Basic Configs """
|
||||
let mapleader = " " " set <leader> to <space>
|
||||
|
||||
""" Colemak """
|
||||
" Word wrap
|
||||
noremap n gj
|
||||
noremap e gk
|
||||
noremap i l
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
""" Options """
|
||||
" search for actions: :actionlist <patter>
|
||||
|
||||
"" Vim Compat ""
|
||||
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
|
||||
set gdefault " substitute all occurrences in line per default
|
||||
set history=4096 " keep x lines of command line history
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set incsearch
|
||||
set keymodel=startsel,stopsel
|
||||
set matchpairs+=<:>
|
||||
set showcmd
|
||||
set smartcase " no ignore case when pattern is uppercase
|
||||
set wrapscan " searches wrap around the end of the file
|
||||
|
||||
"" IDE Settings ""
|
||||
set scrolloff=5
|
||||
set sidescrolloff=10
|
||||
|
||||
"" IDE Features ""
|
||||
set relativenumber " Hybrid Line Number shown
|
||||
|
||||
"" IdeaVim Only ""
|
||||
set ideajoin
|
||||
set ideastatusicon=enabled
|
||||
|
||||
""" Plugins """
|
||||
|
||||
Plug 'justinmk/vim-sneak'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
|
||||
""" Keybindings """
|
||||
|
||||
"" edit ideavim config <leader>v + ""
|
||||
nnoremap <leader>vv :e ~/.ideavimrc<CR>
|
||||
nnoremap <leader>vr :source ~/.ideavimrc<CR>
|
||||
|
||||
"" NERDTree ""
|
||||
nnoremap <leader>e :NERDTreeToggle<CR>
|
||||
|
||||
"" EasyMotion ""
|
||||
nmap s <Plug>(easymotion-f)
|
||||
nmap S <Plug>(easymotion-F)
|
||||
|
||||
"" Sneak ""
|
||||
nmap f <Plug>(sneak-s)
|
||||
nmap F <Plug>(sneak-S)
|
||||
|
||||
"" Miscs ""
|
||||
nnoremap <leader>: :action GotoAction<CR>
|
||||
|
||||
"" AI Related <leader>a + ""
|
||||
nnoremap <leader>ac :action copilot.chat.show<CR>
|
||||
nnoremap <leader>ad :action copilot.disableCopilot<CR>
|
||||
nnoremap <leader>ae :action copilot.enableCopilot<CR>
|
||||
nnoremap <leader>ai :action copilot.openCopilot<CR>
|
||||
|
||||
"" Codes Action <leader>c + ""
|
||||
nnoremap <leader>cf :action ReformatCode<CR>
|
||||
nnoremap <leader>cs :action GotoSymbol<CR>
|
||||
nnoremap <leader>c/ :action CommentByLineComment<CR>
|
||||
|
||||
"" Project Action <leader>p + ""
|
||||
nnoremap <leader>pr :action Run<CR>
|
||||
nnoremap <leader>pd :action Debug<CR>
|
||||
nnoremap <leader>pb :action Build<CR>
|
||||
|
||||
"" Files Action <leader>f + ""
|
||||
nnoremap <leader>fe :NERDTreeToggle<CR>
|
||||
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
|
||||
|
||||
"" Tab Actions <leader><tab> + ""
|
||||
nnoremap <leader><tab><tab> :action Switcher<CR>
|
||||
|
||||
"" Collapse and Expand z + ""
|
||||
nnoremap zi :action ExpandCollapseToggleAction<CR>
|
||||
nnoremap zc :action CollapseRegion<CR>
|
||||
nnoremap zC :action CollapseRegionRecursively<CR>
|
||||
nnoremap zM :action CollapseAll<CR>
|
||||
nnoremap zo :action ExpandRegion<CR>
|
||||
nnoremap zO :action ExpandRegionRecursively<CR>
|
||||
nnoremap zR :action ExpandAll<CR>
|
||||
|
||||
"" don't lose selection when indenting ""
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
vnoremap = =gv
|
||||
|
||||
|
||||
nnoremap <leader>a :action FindInPath<CR>
|
||||
nnoremap gd :action GotoDeclaration<CR>
|
||||
nnoremap gtd :action GotoTypeDeclaration<CR>
|
||||
nnoremap gtD :action QuickTypeDefinition<CR>
|
||||
nnoremap gr :action ShowUsages<CR>
|
||||
nnoremap gi :action GotoImplementation<CR>
|
||||
nnoremap gpi :action QuickImplementations<CR>
|
||||
nnoremap gs :action GotoSuperMethod<CR>
|
||||
nnoremap ga :action
|
||||
nnoremap gq :action ShowIntentionActions<CR>
|
||||
nnoremap ge :action GotoNextError<CR>
|
||||
|
||||
nnoremap <C-p> :action ParameterInfo<CR>
|
||||
inoremap <C-p> <C-o>:action ParameterInfo<CR>
|
||||
|
||||
"" Refractor <leader>r + ""
|
||||
|
||||
nnoremap <leader>ri :action Inline<CR>
|
||||
nnoremap <leader>rr :action RenameElement<CR>
|
||||
nnoremap <leader>rev :action IntroduceVariable<CR>
|
||||
vnoremap <leader>rev :action IntroduceVariable<CR>
|
||||
nnoremap <leader>rem :action ExtractMethod<CR>
|
||||
vnoremap <leader>rem :action ExtractMethod<CR>
|
||||
nnoremap <leader>rm :action Move<CR>
|
||||
nnoremap <leader>ro :action OptimizeImports<CR>
|
||||
nnoremap <leader>rG :action Generate<CR>
|
||||
|
||||
""" Handling Ctrls """
|
||||
|
||||
sethandler <C-V> n-v:vim i:ide
|
||||
sethandler <C-.> a:ide
|
||||
sethandler <A-<CR>> a:ide
|
||||
|
|
@ -40,4 +40,4 @@ def custom_return(shell):
|
|||
|
||||
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.vi_state import InputMode
|
||||
from prompt_toolkit.filters import Condition
|
||||
from IPython import get_ipython
|
||||
|
||||
ip = get_ipython()
|
||||
key_bindings = KeyBindings()
|
||||
|
||||
@Condition
|
||||
def in_navigation_mode():
|
||||
return ip.pt_app.app.vi_state.input_mode == InputMode.NAVIGATION
|
||||
|
||||
# colemak keymap hnei
|
||||
@key_bindings.add("n", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move cursor down by visual line"
|
||||
event.current_buffer.auto_down(count=event.arg)
|
||||
|
||||
@key_bindings.add("e", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move cursor up by visual line"
|
||||
event.current_buffer.auto_up(count=event.arg)
|
||||
|
||||
@key_bindings.add("i", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move cursor right"
|
||||
event.current_buffer.cursor_right(count=event.arg)
|
||||
|
||||
# Insert with 'l' and 'L'
|
||||
@key_bindings.add("l", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Enter insert mode (similar position to 'i' in Colemak)"
|
||||
event.app.vi_state.input_mode = InputMode.INSERT
|
||||
|
||||
@key_bindings.add("L", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Enter insert mode at the beginning of the line"
|
||||
event.current_buffer.cursor_position += event.current_buffer.document.get_start_of_line_position()
|
||||
|
||||
# Ne[k]st
|
||||
@key_bindings.add("k", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Find next match"
|
||||
event.current_buffer.forward_search()
|
||||
|
||||
@key_bindings.add("K", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Find previous match"
|
||||
event.current_buffer.reverse_search()
|
||||
|
||||
# [J]ump
|
||||
@key_bindings.add("j", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move to end of next word"
|
||||
event.current_buffer.cursor_right_word()
|
||||
|
||||
@key_bindings.add("J", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move to end of next word with capital E"
|
||||
event.current_buffer.cursor_right_word(end=True)
|
||||
|
||||
# Yank to end of line with 'Y'
|
||||
@key_bindings.add("Y", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Yank to the end of the line"
|
||||
text_to_yank = event.current_buffer.document.text_after_cursor
|
||||
event.app.clipboard.set_text(text_to_yank)
|
||||
|
||||
ip.pt_app.key_bindings = key_bindings
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
from prompt_toolkit.key_binding.vi_state import InputMode
|
||||
from prompt_toolkit.filters import Condition
|
||||
from IPython import get_ipython
|
||||
|
||||
ip = get_ipython()
|
||||
key_bindings = KeyBindings()
|
||||
|
||||
@Condition
|
||||
def in_navigation_mode():
|
||||
return ip.pt_app.app.vi_state.input_mode == InputMode.NAVIGATION
|
||||
|
||||
# colemak keymap hnei
|
||||
@key_bindings.add("n", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move cursor down by visual line"
|
||||
event.current_buffer.auto_down(count=event.arg)
|
||||
|
||||
@key_bindings.add("e", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move cursor up by visual line"
|
||||
event.current_buffer.auto_up(count=event.arg)
|
||||
|
||||
@key_bindings.add("i", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move cursor right"
|
||||
event.current_buffer.cursor_right(count=event.arg)
|
||||
|
||||
# Insert with 'l' and 'L'
|
||||
@key_bindings.add("l", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Enter insert mode (similar position to 'i' in Colemak)"
|
||||
event.app.vi_state.input_mode = InputMode.INSERT
|
||||
|
||||
@key_bindings.add("L", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Enter insert mode at the beginning of the line"
|
||||
event.current_buffer.cursor_position += event.current_buffer.document.get_start_of_line_position()
|
||||
|
||||
# Ne[k]st
|
||||
@key_bindings.add("k", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Find next match"
|
||||
event.current_buffer.forward_search()
|
||||
|
||||
@key_bindings.add("K", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Find previous match"
|
||||
event.current_buffer.reverse_search()
|
||||
|
||||
# [J]ump
|
||||
@key_bindings.add("j", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move to end of next word"
|
||||
event.current_buffer.cursor_right_word()
|
||||
|
||||
@key_bindings.add("J", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Move to end of next word with capital E"
|
||||
event.current_buffer.cursor_right_word(end=True)
|
||||
|
||||
# Yank to end of line with 'Y'
|
||||
@key_bindings.add("Y", filter=in_navigation_mode)
|
||||
def _(event):
|
||||
"Yank to the end of the line"
|
||||
text_to_yank = event.current_buffer.document.text_after_cursor
|
||||
event.app.clipboard.set_text(text_to_yank)
|
||||
|
||||
ip.pt_app.key_bindings = key_bindings
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
from IPython.core.magic import register_line_magic
|
||||
|
||||
@register_line_magic
|
||||
def ps(cmd):
|
||||
output = get_ipython().getoutput(f"powershell -Command {cmd}")
|
||||
# If no variable is assigned to the output, print it
|
||||
if get_ipython().last_execution_result is None:
|
||||
print("\n".join(output))
|
||||
else:
|
||||
return "\n".join(output)
|
||||
from IPython.core.magic import register_line_magic
|
||||
|
||||
@register_line_magic
|
||||
def ps(cmd):
|
||||
output = get_ipython().getoutput(f"powershell -Command {cmd}")
|
||||
# If no variable is assigned to the output, print it
|
||||
if get_ipython().last_execution_result is None:
|
||||
print("\n".join(output))
|
||||
else:
|
||||
return "\n".join(output)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
# $XDG_CONFIG_HOME/lesskey -- less options
|
||||
# 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
|
||||
|
||||
# Format: key action
|
||||
|
||||
# Arrow Remap (hnei -> hjkl)
|
||||
n forw-line
|
||||
e back-line
|
||||
|
||||
# search with k : ne[k]st
|
||||
k repeat-search
|
||||
K reverse-search
|
||||
# $XDG_CONFIG_HOME/lesskey -- less options
|
||||
# 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
|
||||
|
||||
# Format: key action
|
||||
|
||||
# Arrow Remap (hnei -> hjkl)
|
||||
n forw-line
|
||||
e back-line
|
||||
|
||||
# search with k : ne[k]st
|
||||
k repeat-search
|
||||
K reverse-search
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"line-length": false,
|
||||
"no-inline-html": false,
|
||||
"no-alt-text": false,
|
||||
"ul-style": { "style": "dash" }
|
||||
{
|
||||
"line-length": false,
|
||||
"no-inline-html": false,
|
||||
"no-alt-text": false,
|
||||
"ul-style": { "style": "dash" }
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# ~/.npmrc
|
||||
# New-Item -ItemType SymbolicLink -Path ~\.npmrc -Target ~\.dotfiles\.npmrc
|
||||
# ln -s $DOTFILES/.npmrc ~/.npmrc
|
||||
# registry=https://registry.npmmirror.com
|
||||
# ~/.npmrc
|
||||
# New-Item -ItemType SymbolicLink -Path ~\.npmrc -Target ~\.dotfiles\.npmrc
|
||||
# ln -s $DOTFILES/.npmrc ~/.npmrc
|
||||
# registry=https://registry.npmmirror.com
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||
# ===========================================================
|
||||
# $XDG_CONFIG_HOME/npm/npmrc
|
||||
# ln -s $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||
# New-Item -ItemType SymbolicLink -Path $env:NPM_CONFIG_USERCONFIG -Value $env:DOTFILES/.config/npm/npmrc
|
||||
# registry=https://registry.npmmirror.com
|
||||
# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||
# ===========================================================
|
||||
# $XDG_CONFIG_HOME/npm/npmrc
|
||||
# ln -s $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||
# New-Item -ItemType SymbolicLink -Path $env:NPM_CONFIG_USERCONFIG -Value $env:DOTFILES/.config/npm/npmrc
|
||||
# registry=https://registry.npmmirror.com
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Colemak *LazyVim*
|
||||
|
||||
- Replace the default `hjkl` movement keys with `hnei`
|
||||
- `j->e`, `k->n`, `h->h`, `l->i`
|
||||
|
||||
```sh
|
||||
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
|
||||
# Colemak *LazyVim*
|
||||
|
||||
- Replace the default `hjkl` movement keys with `hnei`
|
||||
- `j->e`, `k->n`, `h->h`, `l->i`
|
||||
|
||||
```sh
|
||||
ln -sf $DOTFILES/.config/nvim/ $XDG_CONFIG_HOME/nvim
|
||||
```
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
-- 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
|
||||
-- Add any additional autocmds here
|
||||
-- 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
|
||||
-- Add any additional autocmds here
|
||||
|
|
|
|||
|
|
@ -1,146 +1,146 @@
|
|||
-- 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
|
||||
-- Add any additional keymaps here
|
||||
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- ================= GENERAL KEYBINDS =================
|
||||
-- SAVE/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" })
|
||||
--}}}
|
||||
|
||||
-- NVIM CONFIG SHORTCUTS {{{
|
||||
-- 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>rp", "<cmd>e $HOME/.config/nvim/lua/plugins/.<CR>", { desc = "lazy plugins dir" })
|
||||
--}}}
|
||||
|
||||
-- UNDO
|
||||
vim.keymap.set({ "n", "v" }, "l", "u", { desc = "Undo" })
|
||||
|
||||
-- INSERT
|
||||
vim.keymap.set({ "n", "v" }, "l", "i", { desc = "Insert" })
|
||||
vim.keymap.set({ "n", "v" }, "L", "I", { desc = "Insert at line start" })
|
||||
|
||||
-- YANK TO SYSTEM CLIPBOARD
|
||||
vim.keymap.set("v", "Y", '"+y', { desc = "Copy to (System) Clipboard" })
|
||||
|
||||
-- SEARCH {{{
|
||||
vim.keymap.set("n", "<LEADER><CR>", "<CMD>nohlsearch<CR>", { desc = "clear search highlight" })
|
||||
--}}}
|
||||
|
||||
-- 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" })
|
||||
--}}}
|
||||
|
||||
-- MISC {{{
|
||||
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" })
|
||||
--}}}
|
||||
|
||||
-- ================= CURSOR MOVEMENT ===================== {{{
|
||||
-- NEW CURSOR MOVEMENT (ARROW KEY RESIZE WINDOWS)
|
||||
-- ^
|
||||
-- e
|
||||
-- < h i >
|
||||
-- n
|
||||
-- v
|
||||
--
|
||||
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" }, "E", "5k", { desc = "Move 5up K -> U" })
|
||||
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" }, "I", "$", { desc = "Move end of line" })
|
||||
|
||||
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", "\v", "v$h", { desc = "???" })
|
||||
|
||||
-- FASTER IN-LINE NAVIGATION
|
||||
|
||||
-- SET h (SAME AS n, CURSOR LEFT) 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
|
||||
|
||||
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 ⇩" })
|
||||
|
||||
-- INSERT MODE CURSOR MOVEMENT
|
||||
vim.keymap.set("i", "<C-a>", "<ESC>A")
|
||||
|
||||
-- COMMAND MODE CURSOR MOVEMENT
|
||||
vim.keymap.set("c", "<C-a>", "<Home>")
|
||||
vim.keymap.set("c", "<C-e>", "<End>")
|
||||
vim.keymap.set("c", "<C-p>", "<Up>")
|
||||
vim.keymap.set("c", "<C-n>", "<Down>")
|
||||
vim.keymap.set("c", "<C-b>", "<Left>")
|
||||
vim.keymap.set("c", "<C-f>", "<Right>")
|
||||
vim.keymap.set("c", "<M-b>", "<S-Left>")
|
||||
vim.keymap.set("c", "<M-w>", "<S-Right>")
|
||||
--}}}
|
||||
|
||||
-- ================= 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>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>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>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>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-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-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", "<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", "<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>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>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)" })
|
||||
--}}}
|
||||
|
||||
-- TAB MANAGEMENT {{{
|
||||
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>i", "<CMD>+tabnext<CR>", { desc = "Select Tab ⇨" })
|
||||
|
||||
vim.keymap.set("n", "<TAB>H", "<CMD>-tabmove<CR>", { desc = "Tab move ⇦" })
|
||||
vim.keymap.set("n", "<TAB>I", "<CMD>+tabmove<CR>", { desc = "Tab move ⇨" })
|
||||
|
||||
-- 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', '<LEADER>dw', '/\(\<\w\+\>\)\_s*\1', {desc='adjacent duplicate words'})
|
||||
|
||||
--vim.keymap.del("n", "<C-w>j")
|
||||
--vim.keymap.del("n", "<C-w>k")
|
||||
--vim.keymap.del("n", "<C-w>l")
|
||||
-- }}}
|
||||
|
||||
-- =================== TERM BEHAVIORS ====================
|
||||
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: set fdm=marker fdl=0
|
||||
|
||||
-- buffers
|
||||
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||
vim.keymap.set("n", "<S-i>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||
-- 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
|
||||
-- Add any additional keymaps here
|
||||
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- ================= GENERAL KEYBINDS =================
|
||||
-- SAVE/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" })
|
||||
--}}}
|
||||
|
||||
-- NVIM CONFIG SHORTCUTS {{{
|
||||
-- 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>rp", "<cmd>e $HOME/.config/nvim/lua/plugins/.<CR>", { desc = "lazy plugins dir" })
|
||||
--}}}
|
||||
|
||||
-- UNDO
|
||||
vim.keymap.set({ "n", "v" }, "l", "u", { desc = "Undo" })
|
||||
|
||||
-- INSERT
|
||||
vim.keymap.set({ "n", "v" }, "l", "i", { desc = "Insert" })
|
||||
vim.keymap.set({ "n", "v" }, "L", "I", { desc = "Insert at line start" })
|
||||
|
||||
-- YANK TO SYSTEM CLIPBOARD
|
||||
vim.keymap.set("v", "Y", '"+y', { desc = "Copy to (System) Clipboard" })
|
||||
|
||||
-- SEARCH {{{
|
||||
vim.keymap.set("n", "<LEADER><CR>", "<CMD>nohlsearch<CR>", { desc = "clear search highlight" })
|
||||
--}}}
|
||||
|
||||
-- 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" })
|
||||
--}}}
|
||||
|
||||
-- MISC {{{
|
||||
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" })
|
||||
--}}}
|
||||
|
||||
-- ================= CURSOR MOVEMENT ===================== {{{
|
||||
-- NEW CURSOR MOVEMENT (ARROW KEY RESIZE WINDOWS)
|
||||
-- ^
|
||||
-- e
|
||||
-- < h i >
|
||||
-- n
|
||||
-- v
|
||||
--
|
||||
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" }, "E", "5k", { desc = "Move 5up K -> U" })
|
||||
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" }, "I", "$", { desc = "Move end of line" })
|
||||
|
||||
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", "\v", "v$h", { desc = "???" })
|
||||
|
||||
-- FASTER IN-LINE NAVIGATION
|
||||
|
||||
-- SET h (SAME AS n, CURSOR LEFT) 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
|
||||
|
||||
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 ⇩" })
|
||||
|
||||
-- INSERT MODE CURSOR MOVEMENT
|
||||
vim.keymap.set("i", "<C-a>", "<ESC>A")
|
||||
|
||||
-- COMMAND MODE CURSOR MOVEMENT
|
||||
vim.keymap.set("c", "<C-a>", "<Home>")
|
||||
vim.keymap.set("c", "<C-e>", "<End>")
|
||||
vim.keymap.set("c", "<C-p>", "<Up>")
|
||||
vim.keymap.set("c", "<C-n>", "<Down>")
|
||||
vim.keymap.set("c", "<C-b>", "<Left>")
|
||||
vim.keymap.set("c", "<C-f>", "<Right>")
|
||||
vim.keymap.set("c", "<M-b>", "<S-Left>")
|
||||
vim.keymap.set("c", "<M-w>", "<S-Right>")
|
||||
--}}}
|
||||
|
||||
-- ================= 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>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>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>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>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-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-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", "<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", "<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>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>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)" })
|
||||
--}}}
|
||||
|
||||
-- TAB MANAGEMENT {{{
|
||||
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>i", "<CMD>+tabnext<CR>", { desc = "Select Tab ⇨" })
|
||||
|
||||
vim.keymap.set("n", "<TAB>H", "<CMD>-tabmove<CR>", { desc = "Tab move ⇦" })
|
||||
vim.keymap.set("n", "<TAB>I", "<CMD>+tabmove<CR>", { desc = "Tab move ⇨" })
|
||||
|
||||
-- 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', '<LEADER>dw', '/\(\<\w\+\>\)\_s*\1', {desc='adjacent duplicate words'})
|
||||
|
||||
--vim.keymap.del("n", "<C-w>j")
|
||||
--vim.keymap.del("n", "<C-w>k")
|
||||
--vim.keymap.del("n", "<C-w>l")
|
||||
-- }}}
|
||||
|
||||
-- =================== TERM BEHAVIORS ====================
|
||||
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: set fdm=marker fdl=0
|
||||
|
||||
-- buffers
|
||||
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev 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"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- 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.
|
||||
lazy = false,
|
||||
-- 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.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- 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.
|
||||
lazy = false,
|
||||
-- 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.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
-- 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
|
||||
-- Add any additional options here
|
||||
-- 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
|
||||
-- Add any additional options here
|
||||
|
|
|
|||
|
|
@ -1,54 +1,54 @@
|
|||
return {
|
||||
"catppuccin/nvim",
|
||||
lazy = true,
|
||||
name = "catppuccin",
|
||||
opts = {
|
||||
integrations = {
|
||||
aerial = true,
|
||||
alpha = true,
|
||||
cmp = true,
|
||||
dashboard = true,
|
||||
flash = true,
|
||||
grug_far = true,
|
||||
gitsigns = true,
|
||||
headlines = true,
|
||||
illuminate = true,
|
||||
indent_blankline = { enabled = true },
|
||||
leap = true,
|
||||
lsp_trouble = true,
|
||||
mason = true,
|
||||
markdown = true,
|
||||
mini = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
underlines = {
|
||||
errors = { "undercurl" },
|
||||
hints = { "undercurl" },
|
||||
warnings = { "undercurl" },
|
||||
information = { "undercurl" },
|
||||
},
|
||||
},
|
||||
navic = { enabled = true, custom_bg = "lualine" },
|
||||
neotest = true,
|
||||
neotree = true,
|
||||
noice = true,
|
||||
notify = true,
|
||||
semantic_tokens = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
treesitter_context = true,
|
||||
which_key = true,
|
||||
},
|
||||
},
|
||||
specs = {
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
if (vim.g.colors_name or ""):find("catppuccin") then
|
||||
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
lazy = true,
|
||||
name = "catppuccin",
|
||||
opts = {
|
||||
integrations = {
|
||||
aerial = true,
|
||||
alpha = true,
|
||||
cmp = true,
|
||||
dashboard = true,
|
||||
flash = true,
|
||||
grug_far = true,
|
||||
gitsigns = true,
|
||||
headlines = true,
|
||||
illuminate = true,
|
||||
indent_blankline = { enabled = true },
|
||||
leap = true,
|
||||
lsp_trouble = true,
|
||||
mason = true,
|
||||
markdown = true,
|
||||
mini = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
underlines = {
|
||||
errors = { "undercurl" },
|
||||
hints = { "undercurl" },
|
||||
warnings = { "undercurl" },
|
||||
information = { "undercurl" },
|
||||
},
|
||||
},
|
||||
navic = { enabled = true, custom_bg = "lualine" },
|
||||
neotest = true,
|
||||
neotree = true,
|
||||
noice = true,
|
||||
notify = true,
|
||||
semantic_tokens = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
treesitter_context = true,
|
||||
which_key = true,
|
||||
},
|
||||
},
|
||||
specs = {
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
if (vim.g.colors_name or ""):find("catppuccin") then
|
||||
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
}
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,197 +1,197 @@
|
|||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,127 +1,127 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
cmd = "Neotree",
|
||||
keys = {
|
||||
{
|
||||
"<leader>fe",
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (Root Dir)",
|
||||
},
|
||||
{
|
||||
"<leader>fE",
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (cwd)",
|
||||
},
|
||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||
{
|
||||
"<leader>ge",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||
end,
|
||||
desc = "Git Explorer",
|
||||
},
|
||||
{
|
||||
"<leader>be",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||
end,
|
||||
desc = "Buffer Explorer",
|
||||
},
|
||||
},
|
||||
deactivate = function()
|
||||
vim.cmd([[Neotree close]])
|
||||
end,
|
||||
init = function()
|
||||
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
||||
-- because `cwd` is not set up properly.
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||
desc = "Start Neo-tree with directory",
|
||||
once = true,
|
||||
callback = function()
|
||||
if package.loaded["neo-tree"] then
|
||||
return
|
||||
else
|
||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||
if stats and stats.type == "directory" then
|
||||
require("neo-tree")
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
sources = { "filesystem", "buffers", "git_status" },
|
||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
follow_current_file = { enabled = true },
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
-- MARKED
|
||||
["i"] = "open",
|
||||
-- MARKED
|
||||
["e"] = "noop",
|
||||
["h"] = "close_node",
|
||||
["<space>"] = "none",
|
||||
["Y"] = {
|
||||
function(state)
|
||||
local node = state.tree:get_node()
|
||||
local path = node:get_id()
|
||||
vim.fn.setreg("+", path, "c")
|
||||
end,
|
||||
desc = "Copy Path to Clipboard",
|
||||
},
|
||||
["O"] = {
|
||||
function(state)
|
||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||
end,
|
||||
desc = "Open with System Application",
|
||||
},
|
||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local function on_move(data)
|
||||
LazyVim.lsp.on_rename(data.source, data.destination)
|
||||
end
|
||||
|
||||
local events = require("neo-tree.events")
|
||||
opts.event_handlers = opts.event_handlers or {}
|
||||
vim.list_extend(opts.event_handlers, {
|
||||
{ event = events.FILE_MOVED, handler = on_move },
|
||||
{ event = events.FILE_RENAMED, handler = on_move },
|
||||
})
|
||||
require("neo-tree").setup(opts)
|
||||
vim.api.nvim_create_autocmd("TermClose", {
|
||||
pattern = "*lazygit",
|
||||
callback = function()
|
||||
if package.loaded["neo-tree.sources.git_status"] then
|
||||
require("neo-tree.sources.git_status").refresh()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
cmd = "Neotree",
|
||||
keys = {
|
||||
{
|
||||
"<leader>fe",
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (Root Dir)",
|
||||
},
|
||||
{
|
||||
"<leader>fE",
|
||||
function()
|
||||
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||
end,
|
||||
desc = "Explorer NeoTree (cwd)",
|
||||
},
|
||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||
{
|
||||
"<leader>ge",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||
end,
|
||||
desc = "Git Explorer",
|
||||
},
|
||||
{
|
||||
"<leader>be",
|
||||
function()
|
||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||
end,
|
||||
desc = "Buffer Explorer",
|
||||
},
|
||||
},
|
||||
deactivate = function()
|
||||
vim.cmd([[Neotree close]])
|
||||
end,
|
||||
init = function()
|
||||
-- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it,
|
||||
-- because `cwd` is not set up properly.
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }),
|
||||
desc = "Start Neo-tree with directory",
|
||||
once = true,
|
||||
callback = function()
|
||||
if package.loaded["neo-tree"] then
|
||||
return
|
||||
else
|
||||
local stats = vim.uv.fs_stat(vim.fn.argv(0))
|
||||
if stats and stats.type == "directory" then
|
||||
require("neo-tree")
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
sources = { "filesystem", "buffers", "git_status" },
|
||||
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||
filesystem = {
|
||||
bind_to_cwd = false,
|
||||
follow_current_file = { enabled = true },
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
-- MARKED
|
||||
["i"] = "open",
|
||||
-- MARKED
|
||||
["e"] = "noop",
|
||||
["h"] = "close_node",
|
||||
["<space>"] = "none",
|
||||
["Y"] = {
|
||||
function(state)
|
||||
local node = state.tree:get_node()
|
||||
local path = node:get_id()
|
||||
vim.fn.setreg("+", path, "c")
|
||||
end,
|
||||
desc = "Copy Path to Clipboard",
|
||||
},
|
||||
["O"] = {
|
||||
function(state)
|
||||
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||
end,
|
||||
desc = "Open with System Application",
|
||||
},
|
||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local function on_move(data)
|
||||
LazyVim.lsp.on_rename(data.source, data.destination)
|
||||
end
|
||||
|
||||
local events = require("neo-tree.events")
|
||||
opts.event_handlers = opts.event_handlers or {}
|
||||
vim.list_extend(opts.event_handlers, {
|
||||
{ event = events.FILE_MOVED, handler = on_move },
|
||||
{ event = events.FILE_RENAMED, handler = on_move },
|
||||
})
|
||||
require("neo-tree").setup(opts)
|
||||
vim.api.nvim_create_autocmd("TermClose", {
|
||||
pattern = "*lazygit",
|
||||
callback = function()
|
||||
if package.loaded["neo-tree.sources.git_status"] then
|
||||
require("neo-tree.sources.git_status").refresh()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
return {
|
||||
{ 'wakatime/vim-wakatime', lazy = false },
|
||||
return {
|
||||
{ 'wakatime/vim-wakatime', lazy = false },
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
# $XDG_CONFIG_HOME/pip/pip.conf
|
||||
# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
||||
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf
|
||||
[global]
|
||||
# $XDG_CONFIG_HOME/pip/pip.conf
|
||||
# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
||||
# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf
|
||||
[global]
|
||||
# index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
|
@ -1,202 +1,202 @@
|
|||
# starship.toml
|
||||
# ~/.config/starship.toml
|
||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||
|
||||
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 = ' '
|
||||
|
||||
[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 = " "
|
||||
# starship.toml
|
||||
# ~/.config/starship.toml
|
||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||
|
||||
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 = ' '
|
||||
|
||||
[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 = " "
|
||||
|
|
|
|||
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
|
||||
# ~/.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 = ' '
|
||||
|
||||
[character]
|
||||
success_symbol = "[PS > ](bold green)"
|
||||
error_symbol = "[PS > ](bold red)"
|
||||
vimcmd_symbol = "[Vi < ](bold green)"
|
||||
|
||||
[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 = " "
|
||||
# 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 = ' '
|
||||
|
||||
[character]
|
||||
success_symbol = "[PS > ](bold green)"
|
||||
error_symbol = "[PS > ](bold red)"
|
||||
vimcmd_symbol = "[Vi < ](bold green)"
|
||||
|
||||
[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
|
||||
# ~/.config/starship.toml
|
||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||
continuation_prompt = "[r % ](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 = ' '
|
||||
|
||||
[character]
|
||||
success_symbol = "[z % ](bold green)"
|
||||
error_symbol = "[z % ](bold red)"
|
||||
vimcmd_symbol = "[v ! ](bold green)"
|
||||
|
||||
[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 = " "
|
||||
# starship.toml
|
||||
# ~/.config/starship.toml
|
||||
format = '''$os$time $username @ $hostname $directory $all$character'''
|
||||
continuation_prompt = "[r % ](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 = ' '
|
||||
|
||||
[character]
|
||||
success_symbol = "[z % ](bold green)"
|
||||
error_symbol = "[z % ](bold red)"
|
||||
vimcmd_symbol = "[v ! ](bold green)"
|
||||
|
||||
[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 = " "
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
noremap n j
|
||||
noremap e k
|
||||
noremap i l
|
||||
noremap N J
|
||||
noremap E K
|
||||
noremap I L
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
|
|
@ -15,7 +18,7 @@ noremap L I
|
|||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
// ~/.config/zellij/config.kdl
|
||||
// ln -sf $DOTFILES/.config/zellij/config.kdl ~.config/zellij/config.kdl
|
||||
// https://zellij.dev/documentation/configuration
|
||||
keybinds {
|
||||
// keybinds are divided into modes
|
||||
normal {
|
||||
// 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 "Ctrl g" { SwitchToMode "locked"; }
|
||||
bind "Ctrl p" { SwitchToMode "pane"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||
}
|
||||
pane {
|
||||
bind "h" "Left" { MoveFocus "Left"; }
|
||||
bind "i" "Right" { MoveFocus "Right"; }
|
||||
bind "n" "Down" { MoveFocus "Down"; }
|
||||
bind "e" "Up" { MoveFocus "Up"; }
|
||||
bind "p" { SwitchFocus; }
|
||||
}
|
||||
locked {
|
||||
bind "Ctrl g" { SwitchToMode "normal"; }
|
||||
}
|
||||
}
|
||||
// ~/.config/zellij/config.kdl
|
||||
// ln -sf $DOTFILES/.config/zellij/config.kdl ~.config/zellij/config.kdl
|
||||
// https://zellij.dev/documentation/configuration
|
||||
keybinds {
|
||||
// keybinds are divided into modes
|
||||
normal {
|
||||
// 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 "Ctrl g" { SwitchToMode "locked"; }
|
||||
bind "Ctrl p" { SwitchToMode "pane"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||
}
|
||||
pane {
|
||||
bind "h" "Left" { MoveFocus "Left"; }
|
||||
bind "i" "Right" { MoveFocus "Right"; }
|
||||
bind "n" "Down" { MoveFocus "Down"; }
|
||||
bind "e" "Up" { MoveFocus "Up"; }
|
||||
bind "p" { SwitchFocus; }
|
||||
}
|
||||
locked {
|
||||
bind "Ctrl g" { SwitchToMode "normal"; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
20
.editorconfig
Normal file
20
.editorconfig
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# $DOTFILES/.editorconfig
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{json,toml,js,lua,yaml,yml}]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
41
.gitignore
vendored
41
.gitignore
vendored
|
|
@ -1,11 +1,28 @@
|
|||
.DS_Store
|
||||
# Private Files
|
||||
*private*
|
||||
.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/log
|
||||
.config/ipython/profile_default/pid
|
||||
.config/ipython/profile_default/security
|
||||
.config/ipython/profile_default/history.sqlite
|
||||
|
||||
# nvim config cache
|
||||
.config/nvim/tt.*
|
||||
.config/nvim/.tests
|
||||
.config/nvim/doc/tags
|
||||
|
|
@ -17,15 +34,17 @@
|
|||
.config/nvim/lazy-lock.json
|
||||
.config/nvim/lazyvim.json
|
||||
.config/nvim/lua/plugins/obsidian.lua
|
||||
test/
|
||||
test.*
|
||||
*.gz
|
||||
*.tar
|
||||
*.zip
|
||||
*.tgz
|
||||
# WindowsTerminal.json
|
||||
|
||||
# Undone
|
||||
# Windows PowerToys
|
||||
PowerToys/
|
||||
xdg-ninja/
|
||||
.DS_Store
|
||||
# Just Script
|
||||
Justfile
|
||||
# Nushell
|
||||
.config/nushell/
|
||||
# VSCode Neovim
|
||||
vscode/
|
||||
.vscode/
|
||||
.vscode/
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
|
|
|
|||
118
.obsidian.vimrc
118
.obsidian.vimrc
|
|
@ -1,59 +1,59 @@
|
|||
" Put this in OBSIDIAN_VAULT/.obsidian.vimrc
|
||||
set clipboard=unnamed " Sync with System Clipboard
|
||||
|
||||
" Word wrap
|
||||
noremap n gj
|
||||
noremap e gk
|
||||
noremap i l
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
""" Visual mode surrounding
|
||||
exmap addbold obcommand editor:toogle-bold
|
||||
exmap additalic obcommand editor:toogle-italic
|
||||
exmap addhighlight obcommand editor:toogle-highlight
|
||||
exmap addcode obcommand editor:toogle-code
|
||||
exmap adddel obcommand editor:toogle-strikethrough
|
||||
vnoremap ~ :adddel<CR> " Add delete to selection
|
||||
vnoremap ` c`<C-r>"`<Esc> " editor:toogle-code is buggy
|
||||
vnoremap * :addbold<CR> " Add bold to selection
|
||||
vnoremap _ :additalic<CR> " Add italic to selection
|
||||
vnoremap = :addhighlight " Add highlight to selection
|
||||
|
||||
exmap prevtab obcommand workspace:previous-tab
|
||||
exmap nexttab obcommand workspace:next-tab
|
||||
nnoremap H :prevtab<CR>
|
||||
nnoremap I :nexttab<CR>
|
||||
|
||||
exmap reload :source .obsidian.vimrc<CR>
|
||||
|
||||
unmap <Space>
|
||||
exmap vsplit obcommand workspace:split-vertical
|
||||
exmap hsplit obcommand workspace:split-horizontal
|
||||
map <Space>| :vsplit<CR>
|
||||
map <Space>- :hsplit<CR>
|
||||
" map <Space>bd
|
||||
|
||||
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
||||
map <Space>ai :chat<CR>
|
||||
|
||||
exmap omnisearch obcommand omnisearch:show-modal
|
||||
map <Space><Space> :omnisearch<CR>
|
||||
|
||||
exmap command-palette obcommand command-palette:open
|
||||
map <Space>: :command-palette<CR>
|
||||
|
||||
""" g-commands
|
||||
exmap tsource obcommand editor:toggle-source
|
||||
nnoremap gs :tsource<CR>
|
||||
" Put this in OBSIDIAN_VAULT/.obsidian.vimrc
|
||||
set clipboard=unnamed " Sync with System Clipboard
|
||||
|
||||
" Word wrap
|
||||
noremap n gj
|
||||
noremap e gk
|
||||
noremap i l
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
||||
""" Visual mode surrounding
|
||||
exmap addbold obcommand editor:toogle-bold
|
||||
exmap additalic obcommand editor:toogle-italic
|
||||
exmap addhighlight obcommand editor:toogle-highlight
|
||||
exmap addcode obcommand editor:toogle-code
|
||||
exmap adddel obcommand editor:toogle-strikethrough
|
||||
vnoremap ~ :adddel<CR> " Add delete to selection
|
||||
vnoremap ` c`<C-r>"`<Esc> " editor:toogle-code is buggy
|
||||
vnoremap * :addbold<CR> " Add bold to selection
|
||||
vnoremap _ :additalic<CR> " Add italic to selection
|
||||
vnoremap = :addhighlight " Add highlight to selection
|
||||
|
||||
exmap prevtab obcommand workspace:previous-tab
|
||||
exmap nexttab obcommand workspace:next-tab
|
||||
nnoremap H :prevtab<CR>
|
||||
nnoremap I :nexttab<CR>
|
||||
|
||||
exmap reload :source .obsidian.vimrc<CR>
|
||||
|
||||
unmap <Space>
|
||||
exmap vsplit obcommand workspace:split-vertical
|
||||
exmap hsplit obcommand workspace:split-horizontal
|
||||
map <Space>| :vsplit<CR>
|
||||
map <Space>- :hsplit<CR>
|
||||
" map <Space>bd
|
||||
|
||||
exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt
|
||||
map <Space>ai :chat<CR>
|
||||
|
||||
exmap omnisearch obcommand omnisearch:show-modal
|
||||
map <Space><Space> :omnisearch<CR>
|
||||
|
||||
exmap command-palette obcommand command-palette:open
|
||||
map <Space>: :command-palette<CR>
|
||||
|
||||
""" g-commands
|
||||
exmap tsource obcommand editor:toggle-source
|
||||
nnoremap gs :tsource<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
|
||||
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:
|
||||
Preamble
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
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
|
||||
// or use:
|
||||
// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/browser/surfingkeys.js
|
||||
|
||||
/** Examples
|
||||
|
||||
// an example to create a new mapping `ctrl-y`
|
||||
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).');
|
||||
});
|
||||
|
||||
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
|
||||
api.map('gt', 'T');
|
||||
|
||||
|
||||
// an example to remove mapkey `Ctrl-i`
|
||||
api.unmap('<ctrl-i>');
|
||||
|
||||
*/
|
||||
// Settings
|
||||
settings.language = "zh-CN" ;
|
||||
settings.showModeStatus = false;
|
||||
// Keymap, reference https://github.com/texiwustion/colemak_config_for_surfingkeys/tree/main
|
||||
const forward = {
|
||||
add: function (key) { // 转发即将被 unmap 的键
|
||||
return api.map(`for${key}`, key)
|
||||
},
|
||||
cancel: function (key) { // 删除转发生成的键
|
||||
api.unmap(`for${key}`)
|
||||
api.unmap(key)
|
||||
},
|
||||
use: function (key) {
|
||||
return `for${key}`
|
||||
}
|
||||
}
|
||||
|
||||
const colemak = {
|
||||
forward: function (key) { // 转发即将被 unmap 的键
|
||||
api.map(key, `col${key}`)
|
||||
api.unmap(`col${key}`)
|
||||
|
||||
},
|
||||
use: function (key) {
|
||||
return `col${key}`
|
||||
},
|
||||
map: function (a, b) {
|
||||
api.map(colemak.use(a), forward.use(b))
|
||||
}
|
||||
}
|
||||
|
||||
const forwardFactory = {
|
||||
push: function (mapLists) { // forward original keys
|
||||
for (let key in mapLists) {
|
||||
forward.add(mapLists[key])
|
||||
}
|
||||
},
|
||||
map: function (mapLists) {
|
||||
for (let key in mapLists) {
|
||||
colemak.map(key, mapLists[key])
|
||||
}
|
||||
},
|
||||
pull: function (mapLists) {
|
||||
for (let key in mapLists) {
|
||||
forward.cancel(mapLists[key])
|
||||
}
|
||||
for (let key in mapLists) {
|
||||
colemak.forward(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const mapLists = {
|
||||
/// scroll page
|
||||
// Arrow
|
||||
'n': 'j',
|
||||
'e': 'k',
|
||||
'i': 'l',
|
||||
// l <-> i
|
||||
'l': 'i',
|
||||
'L': 'I',
|
||||
// k <-> n
|
||||
'k': 'n',
|
||||
'K': 'N',
|
||||
// j <-> e
|
||||
'j': 'e',
|
||||
'J': 'E',
|
||||
// 缩放
|
||||
'zu': 'zi',
|
||||
'zo': 'ze',
|
||||
'zz': 'zr',
|
||||
}
|
||||
|
||||
forwardFactory.push(mapLists)
|
||||
api.unmap('t')
|
||||
forwardFactory.map(mapLists)
|
||||
// 鼠标点击
|
||||
api.unmap('gi')
|
||||
api.unmap('[[')
|
||||
api.unmap(']]')
|
||||
api.unmap(';m')
|
||||
api.unmap(';fs')
|
||||
api.unmap('O')
|
||||
api.unmap('C')
|
||||
forwardFactory.pull(mapLists)
|
||||
|
||||
|
||||
// Search Alias
|
||||
api.addSearchAlias('f', 'Felo', 'https://felo.ai/search?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function(r){
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('p', 'Perplexity', 'https://www.perplexity.ai/?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function(r){
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('r', 'Raindrop', 'https://app.raindrop.io/my/0/', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function(r){
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 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 !important; padding: 1px !important; color: #E5E9F0 !important; background: #3B4252 !important;", "text");
|
||||
api.Visual.style('marks', 'background-color: #A3BE8C99;');
|
||||
api.Visual.style('cursor', 'background-color: #88C0D0;');
|
||||
settings.theme = `
|
||||
fg: #E5E9F0;
|
||||
bg: #3B4252;
|
||||
bg-dark: #2E3440;
|
||||
border: #4C566A;
|
||||
main-fg: #88C0D0;
|
||||
accent-fg: #A3BE8C;
|
||||
info-fg: #5E81AC;
|
||||
select: #4C566A;
|
||||
/* ---------- Generic ---------- */
|
||||
.sk_theme {
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
background-color: var(--bg);
|
||||
border-color: var(--border);
|
||||
font-family: var(--font);
|
||||
font-size: var(--font-size);
|
||||
font-weight: var(--font-weight);
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: var(--font);
|
||||
font-weight: var(--font-weight);
|
||||
}
|
||||
|
||||
.sk_theme tbody {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sk_theme input {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
/* Hints */
|
||||
#sk_hints .begin {
|
||||
color: var(--accent-fg) !important;
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab {
|
||||
background: var(--bg-dark);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab_title {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab_url {
|
||||
color: var(--main-fg);
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab_hint {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme #sk_frame {
|
||||
background: var(--bg);
|
||||
opacity: 0.2;
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
/* ---------- Omnibar ---------- */
|
||||
/* Uncomment this and use settings.omnibarPosition = 'bottom' for Pentadactyl/Tridactyl style bottom bar */
|
||||
/* .sk_theme#sk_omnibar {
|
||||
width: 100%;
|
||||
left: 0;
|
||||
} */
|
||||
|
||||
.sk_theme .title {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme .url {
|
||||
color: var(--main-fg);
|
||||
}
|
||||
|
||||
.sk_theme .annotation {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme .omnibar_highlight {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme .omnibar_timestamp {
|
||||
color: var(--info-fg);
|
||||
}
|
||||
|
||||
.sk_theme .omnibar_visitcount {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
|
||||
background: var(--bg-dark);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchResult ul li.focused {
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchArea {
|
||||
border-top-color: var(--border);
|
||||
border-bottom-color: var(--border);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchArea input,
|
||||
.sk_theme #sk_omnibarSearchArea span {
|
||||
font-size: var(--font-size);
|
||||
}
|
||||
|
||||
.sk_theme .separator {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
/* ---------- Popup Notification Banner ---------- */
|
||||
#sk_banner {
|
||||
font-family: var(--font);
|
||||
font-size: var(--font-size);
|
||||
font-weight: var(--font-weight);
|
||||
background: var(--bg);
|
||||
border-color: var(--border);
|
||||
color: var(--fg);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* ---------- Popup Keys ---------- */
|
||||
#sk_keystroke {
|
||||
background-color: var(--bg);
|
||||
}
|
||||
|
||||
.sk_theme kbd .candidates {
|
||||
color: var(--info-fg);
|
||||
}
|
||||
|
||||
.sk_theme span.annotation {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
/* ---------- Popup Translation Bubble ---------- */
|
||||
#sk_bubble {
|
||||
background-color: var(--bg) !important;
|
||||
color: var(--fg) !important;
|
||||
border-color: var(--border) !important;
|
||||
}
|
||||
|
||||
#sk_bubble * {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
#sk_bubble div.sk_arrow div:nth-of-type(1) {
|
||||
border-top-color: var(--border) !important;
|
||||
border-bottom-color: var(--border) !important;
|
||||
}
|
||||
|
||||
#sk_bubble div.sk_arrow div:nth-of-type(2) {
|
||||
border-top-color: var(--bg) !important;
|
||||
border-bottom-color: var(--bg) !important;
|
||||
}
|
||||
|
||||
/* ---------- Search ---------- */
|
||||
#sk_status,
|
||||
#sk_find {
|
||||
font-size: var(--font-size);
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.sk_theme kbd {
|
||||
background: var(--bg-dark);
|
||||
border-color: var(--border);
|
||||
box-shadow: none;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sk_theme .feature_name span {
|
||||
color: var(--main-fg);
|
||||
}
|
||||
|
||||
/* ---------- ACE Editor ---------- */
|
||||
#sk_editor {
|
||||
background: var(--bg-dark) !important;
|
||||
height: 50% !important;
|
||||
/* Remove this to restore the default editor size */
|
||||
}
|
||||
|
||||
.ace_dialog-bottom {
|
||||
border-top: 1px solid var(--bg) !important;
|
||||
}
|
||||
|
||||
.ace-chrome .ace_print-margin,
|
||||
.ace_gutter,
|
||||
.ace_gutter-cell,
|
||||
.ace_dialog {
|
||||
background: var(--bg) !important;
|
||||
}
|
||||
|
||||
.ace-chrome {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
.ace_gutter,
|
||||
.ace_dialog {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
.ace_cursor {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
.normal-mode .ace_cursor {
|
||||
background-color: var(--fg) !important;
|
||||
border: var(--fg) !important;
|
||||
opacity: 0.7 !important;
|
||||
}
|
||||
|
||||
.ace_marker-layer .ace_selection {
|
||||
background: var(--select) !important;
|
||||
}
|
||||
|
||||
.ace_editor,
|
||||
.ace_dialog span,
|
||||
.ace_dialog input {
|
||||
font-family: var(--font);
|
||||
font-size: var(--font-size);
|
||||
font-weight: var(--font-weight);
|
||||
}`;
|
||||
// Paste this into surfingkeys advanced settings
|
||||
// or use:
|
||||
// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/browser/surfingkeys.js
|
||||
|
||||
/** Examples
|
||||
|
||||
// an example to create a new mapping `ctrl-y`
|
||||
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).');
|
||||
});
|
||||
|
||||
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
|
||||
api.map('gt', 'T');
|
||||
|
||||
|
||||
// an example to remove mapkey `Ctrl-i`
|
||||
api.unmap('<ctrl-i>');
|
||||
|
||||
*/
|
||||
// Settings
|
||||
settings.language = "zh-CN" ;
|
||||
settings.showModeStatus = false;
|
||||
// Keymap, reference https://github.com/texiwustion/colemak_config_for_surfingkeys/tree/main
|
||||
const forward = {
|
||||
add: function (key) { // 转发即将被 unmap 的键
|
||||
return api.map(`for${key}`, key)
|
||||
},
|
||||
cancel: function (key) { // 删除转发生成的键
|
||||
api.unmap(`for${key}`)
|
||||
api.unmap(key)
|
||||
},
|
||||
use: function (key) {
|
||||
return `for${key}`
|
||||
}
|
||||
}
|
||||
|
||||
const colemak = {
|
||||
forward: function (key) { // 转发即将被 unmap 的键
|
||||
api.map(key, `col${key}`)
|
||||
api.unmap(`col${key}`)
|
||||
|
||||
},
|
||||
use: function (key) {
|
||||
return `col${key}`
|
||||
},
|
||||
map: function (a, b) {
|
||||
api.map(colemak.use(a), forward.use(b))
|
||||
}
|
||||
}
|
||||
|
||||
const forwardFactory = {
|
||||
push: function (mapLists) { // forward original keys
|
||||
for (let key in mapLists) {
|
||||
forward.add(mapLists[key])
|
||||
}
|
||||
},
|
||||
map: function (mapLists) {
|
||||
for (let key in mapLists) {
|
||||
colemak.map(key, mapLists[key])
|
||||
}
|
||||
},
|
||||
pull: function (mapLists) {
|
||||
for (let key in mapLists) {
|
||||
forward.cancel(mapLists[key])
|
||||
}
|
||||
for (let key in mapLists) {
|
||||
colemak.forward(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const mapLists = {
|
||||
/// scroll page
|
||||
// Arrow
|
||||
'n': 'j',
|
||||
'e': 'k',
|
||||
'i': 'l',
|
||||
// l <-> i
|
||||
'l': 'i',
|
||||
'L': 'I',
|
||||
// k <-> n
|
||||
'k': 'n',
|
||||
'K': 'N',
|
||||
// j <-> e
|
||||
'j': 'e',
|
||||
'J': 'E',
|
||||
// 缩放
|
||||
'zu': 'zi',
|
||||
'zo': 'ze',
|
||||
'zz': 'zr',
|
||||
}
|
||||
|
||||
forwardFactory.push(mapLists)
|
||||
api.unmap('t')
|
||||
forwardFactory.map(mapLists)
|
||||
// 鼠标点击
|
||||
api.unmap('gi')
|
||||
api.unmap('[[')
|
||||
api.unmap(']]')
|
||||
api.unmap(';m')
|
||||
api.unmap(';fs')
|
||||
api.unmap('O')
|
||||
api.unmap('C')
|
||||
forwardFactory.pull(mapLists)
|
||||
|
||||
|
||||
// Search Alias
|
||||
api.addSearchAlias('f', 'Felo', 'https://felo.ai/search?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function(r){
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('p', 'Perplexity', 'https://www.perplexity.ai/?q=', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function(r){
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
api.addSearchAlias('r', 'Raindrop', 'https://app.raindrop.io/my/0/', 's', 'https://duckduckgo.com/ac/?q=', function(response) {
|
||||
var res = JSON.parse(response.text);
|
||||
return res.map(function(r){
|
||||
return r.phrase;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 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 !important; padding: 1px !important; color: #E5E9F0 !important; background: #3B4252 !important;", "text");
|
||||
api.Visual.style('marks', 'background-color: #A3BE8C99;');
|
||||
api.Visual.style('cursor', 'background-color: #88C0D0;');
|
||||
settings.theme = `
|
||||
fg: #E5E9F0;
|
||||
bg: #3B4252;
|
||||
bg-dark: #2E3440;
|
||||
border: #4C566A;
|
||||
main-fg: #88C0D0;
|
||||
accent-fg: #A3BE8C;
|
||||
info-fg: #5E81AC;
|
||||
select: #4C566A;
|
||||
/* ---------- Generic ---------- */
|
||||
.sk_theme {
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
background-color: var(--bg);
|
||||
border-color: var(--border);
|
||||
font-family: var(--font);
|
||||
font-size: var(--font-size);
|
||||
font-weight: var(--font-weight);
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: var(--font);
|
||||
font-weight: var(--font-weight);
|
||||
}
|
||||
|
||||
.sk_theme tbody {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sk_theme input {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
/* Hints */
|
||||
#sk_hints .begin {
|
||||
color: var(--accent-fg) !important;
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab {
|
||||
background: var(--bg-dark);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab_title {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab_url {
|
||||
color: var(--main-fg);
|
||||
}
|
||||
|
||||
#sk_tabs .sk_tab_hint {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme #sk_frame {
|
||||
background: var(--bg);
|
||||
opacity: 0.2;
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
/* ---------- Omnibar ---------- */
|
||||
/* Uncomment this and use settings.omnibarPosition = 'bottom' for Pentadactyl/Tridactyl style bottom bar */
|
||||
/* .sk_theme#sk_omnibar {
|
||||
width: 100%;
|
||||
left: 0;
|
||||
} */
|
||||
|
||||
.sk_theme .title {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme .url {
|
||||
color: var(--main-fg);
|
||||
}
|
||||
|
||||
.sk_theme .annotation {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme .omnibar_highlight {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme .omnibar_timestamp {
|
||||
color: var(--info-fg);
|
||||
}
|
||||
|
||||
.sk_theme .omnibar_visitcount {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
|
||||
background: var(--bg-dark);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchResult ul li.focused {
|
||||
background: var(--border);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchArea {
|
||||
border-top-color: var(--border);
|
||||
border-bottom-color: var(--border);
|
||||
}
|
||||
|
||||
.sk_theme #sk_omnibarSearchArea input,
|
||||
.sk_theme #sk_omnibarSearchArea span {
|
||||
font-size: var(--font-size);
|
||||
}
|
||||
|
||||
.sk_theme .separator {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
/* ---------- Popup Notification Banner ---------- */
|
||||
#sk_banner {
|
||||
font-family: var(--font);
|
||||
font-size: var(--font-size);
|
||||
font-weight: var(--font-weight);
|
||||
background: var(--bg);
|
||||
border-color: var(--border);
|
||||
color: var(--fg);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* ---------- Popup Keys ---------- */
|
||||
#sk_keystroke {
|
||||
background-color: var(--bg);
|
||||
}
|
||||
|
||||
.sk_theme kbd .candidates {
|
||||
color: var(--info-fg);
|
||||
}
|
||||
|
||||
.sk_theme span.annotation {
|
||||
color: var(--accent-fg);
|
||||
}
|
||||
|
||||
/* ---------- Popup Translation Bubble ---------- */
|
||||
#sk_bubble {
|
||||
background-color: var(--bg) !important;
|
||||
color: var(--fg) !important;
|
||||
border-color: var(--border) !important;
|
||||
}
|
||||
|
||||
#sk_bubble * {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
#sk_bubble div.sk_arrow div:nth-of-type(1) {
|
||||
border-top-color: var(--border) !important;
|
||||
border-bottom-color: var(--border) !important;
|
||||
}
|
||||
|
||||
#sk_bubble div.sk_arrow div:nth-of-type(2) {
|
||||
border-top-color: var(--bg) !important;
|
||||
border-bottom-color: var(--bg) !important;
|
||||
}
|
||||
|
||||
/* ---------- Search ---------- */
|
||||
#sk_status,
|
||||
#sk_find {
|
||||
font-size: var(--font-size);
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.sk_theme kbd {
|
||||
background: var(--bg-dark);
|
||||
border-color: var(--border);
|
||||
box-shadow: none;
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.sk_theme .feature_name span {
|
||||
color: var(--main-fg);
|
||||
}
|
||||
|
||||
/* ---------- ACE Editor ---------- */
|
||||
#sk_editor {
|
||||
background: var(--bg-dark) !important;
|
||||
height: 50% !important;
|
||||
/* Remove this to restore the default editor size */
|
||||
}
|
||||
|
||||
.ace_dialog-bottom {
|
||||
border-top: 1px solid var(--bg) !important;
|
||||
}
|
||||
|
||||
.ace-chrome .ace_print-margin,
|
||||
.ace_gutter,
|
||||
.ace_gutter-cell,
|
||||
.ace_dialog {
|
||||
background: var(--bg) !important;
|
||||
}
|
||||
|
||||
.ace-chrome {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
.ace_gutter,
|
||||
.ace_dialog {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
.ace_cursor {
|
||||
color: var(--fg) !important;
|
||||
}
|
||||
|
||||
.normal-mode .ace_cursor {
|
||||
background-color: var(--fg) !important;
|
||||
border: var(--fg) !important;
|
||||
opacity: 0.7 !important;
|
||||
}
|
||||
|
||||
.ace_marker-layer .ace_selection {
|
||||
background: var(--select) !important;
|
||||
}
|
||||
|
||||
.ace_editor,
|
||||
.ace_dialog span,
|
||||
.ace_dialog input {
|
||||
font-family: var(--font);
|
||||
font-size: var(--font-size);
|
||||
font-weight: var(--font-weight);
|
||||
}`;
|
||||
// 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]
|
||||
IconResource=D:\Assets\Folder11-Ico\ico\bash.ico,0
|
||||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=Documents
|
||||
[.ShellClassInfo]
|
||||
IconResource=D:\Assets\Folder11-Ico\ico\bash.ico,0
|
||||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=Documents
|
||||
|
|
|
|||
88
mac/.zshrc
88
mac/.zshrc
|
|
@ -1,44 +1,44 @@
|
|||
# $XDG_CONFIG_HOME/zsh/.zshrc
|
||||
# ln -s $DOTFILES/mac/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc
|
||||
### Variables ###
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH
|
||||
for file in $DOTFILES/zsh/*.zsh; do
|
||||
source $file
|
||||
done
|
||||
export ARCHFLAGS="-arch arm64"
|
||||
|
||||
### Navigation ###
|
||||
# Absolute navigation
|
||||
alias doku="cd ~/doku && ls"
|
||||
alias dotfiles="cd $DOTFILES && ls"
|
||||
alias docs="cd ~/Documents"
|
||||
alias dt="cd ~/Desktop"
|
||||
alias down="cd ~/Downloads"
|
||||
alias one="cd ~/OneDrive"
|
||||
alias gdrive="cd ~/Google\ Drive"
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
|
||||
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# >>> juliaup initialize >>>
|
||||
|
||||
# !! Contents within this block are managed by juliaup !!
|
||||
|
||||
path=('$HOME/.juliaup/bin' $path)
|
||||
export PATH
|
||||
|
||||
# <<< juliaup initialize <<<
|
||||
# $XDG_CONFIG_HOME/zsh/.zshrc
|
||||
# ln -s $DOTFILES/mac/.zshrc $XDG_CONFIG_HOME/zsh/.zshrc
|
||||
### Variables ###
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH
|
||||
for file in $DOTFILES/zsh/*.zsh; do
|
||||
source $file
|
||||
done
|
||||
export ARCHFLAGS="-arch arm64"
|
||||
|
||||
### Navigation ###
|
||||
# Absolute navigation
|
||||
alias doku="cd ~/doku && ls"
|
||||
alias dotfiles="cd $DOTFILES && ls"
|
||||
alias docs="cd ~/Documents"
|
||||
alias dt="cd ~/Desktop"
|
||||
alias down="cd ~/Downloads"
|
||||
alias one="cd ~/OneDrive"
|
||||
alias gdrive="cd ~/Google\ Drive"
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
|
||||
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# >>> juliaup initialize >>>
|
||||
|
||||
# !! Contents within this block are managed by juliaup !!
|
||||
|
||||
path=('$HOME/.juliaup/bin' $path)
|
||||
export PATH
|
||||
|
||||
# <<< juliaup initialize <<<
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
$DOTFILES = "$HOME/.dotfiles"
|
||||
|
||||
### Load Configs ###
|
||||
### Load Configs ###
|
||||
|
||||
Get-ChildItem -Path $DOTFILES/powershell -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 #
|
||||
|
||||
${function:zshcfg} = { nvim ~/.zshrc }
|
||||
${function:bashcfg} = { nvim ~/.bashrc }
|
||||
${function:bashcfg} = { nvim ~/.bashrc }
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
{
|
||||
"description": "CapsLock to ESC (alone) or LCommand (withKeys)",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "caps_lock",
|
||||
"modifiers": {
|
||||
"optional": [
|
||||
"any"
|
||||
]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"key_code": "left_command"
|
||||
}
|
||||
],
|
||||
"to_if_alone": [
|
||||
{
|
||||
"key_code": "escape"
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
{
|
||||
"description": "CapsLock to ESC (alone) or LCommand (withKeys)",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "caps_lock",
|
||||
"modifiers": {
|
||||
"optional": [
|
||||
"any"
|
||||
]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"key_code": "left_command"
|
||||
}
|
||||
],
|
||||
"to_if_alone": [
|
||||
{
|
||||
"key_code": "escape"
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,24 +1,24 @@
|
|||
{
|
||||
"description": "Map fn+tab to cmd+tab",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "tab",
|
||||
"modifiers": {
|
||||
"mandatory": [
|
||||
"fn"
|
||||
]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"key_code": "tab",
|
||||
"modifiers": [
|
||||
"left_command"
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
{
|
||||
"description": "Map fn+tab to cmd+tab",
|
||||
"manipulators": [
|
||||
{
|
||||
"from": {
|
||||
"key_code": "tab",
|
||||
"modifiers": {
|
||||
"mandatory": [
|
||||
"fn"
|
||||
]
|
||||
}
|
||||
},
|
||||
"to": [
|
||||
{
|
||||
"key_code": "tab",
|
||||
"modifiers": [
|
||||
"left_command"
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
# $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)
|
||||
# https://neovide.dev/config-file.html?highlight=toml#config-file
|
||||
fork = false
|
||||
frame = "full"
|
||||
idle = true
|
||||
maximized = false
|
||||
neovim-bin = "/opt/homebrew/bin/nvim"
|
||||
no-multigrid = false
|
||||
srgb = false
|
||||
tabs = true
|
||||
theme = "auto"
|
||||
title-hidden = true
|
||||
vsync = true
|
||||
wsl = false
|
||||
|
||||
[font]
|
||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
|
||||
# $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)
|
||||
# https://neovide.dev/config-file.html?highlight=toml#config-file
|
||||
fork = false
|
||||
frame = "full"
|
||||
idle = true
|
||||
maximized = false
|
||||
neovim-bin = "/opt/homebrew/bin/nvim"
|
||||
no-multigrid = false
|
||||
srgb = false
|
||||
tabs = true
|
||||
theme = "auto"
|
||||
title-hidden = true
|
||||
vsync = true
|
||||
wsl = false
|
||||
|
||||
[font]
|
||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +1,33 @@
|
|||
# pip
|
||||
alias pip=pip3
|
||||
alias python=python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
|
||||
|
||||
|
||||
# Homebrew
|
||||
# 手动设置
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
|
||||
# 注:自 brew 4.0 起,大部分 Homebrew 用户无需设置 homebrew/core 和 homebrew/cask 镜像,只需设置 HOMEBREW_API_DOMAIN 即可。
|
||||
# 如果需要使用 Homebrew 的开发命令 (如 `brew cat <formula>`),则仍然需要设置 homebrew/core 和 homebrew/cask 镜像。
|
||||
# 请按需执行如下两行命令:
|
||||
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
|
||||
|
||||
# 除 homebrew/core 和 homebrew/cask 仓库外的 tap 仓库仍然需要设置镜像
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask-fonts https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask-versions https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-versions.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 update
|
||||
|
||||
# 或使用下面的几行命令自动设置
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
for tap in core cask{,-fonts,-versions} command-not-found services; do
|
||||
brew tap --custom-remote --force-auto-update "homebrew/${tap}" "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-${tap}.git"
|
||||
done
|
||||
brew update
|
||||
# pip
|
||||
alias pip=pip3
|
||||
alias python=python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
|
||||
|
||||
|
||||
# Homebrew
|
||||
# 手动设置
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
|
||||
# 注:自 brew 4.0 起,大部分 Homebrew 用户无需设置 homebrew/core 和 homebrew/cask 镜像,只需设置 HOMEBREW_API_DOMAIN 即可。
|
||||
# 如果需要使用 Homebrew 的开发命令 (如 `brew cat <formula>`),则仍然需要设置 homebrew/core 和 homebrew/cask 镜像。
|
||||
# 请按需执行如下两行命令:
|
||||
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
|
||||
|
||||
# 除 homebrew/core 和 homebrew/cask 仓库外的 tap 仓库仍然需要设置镜像
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask-fonts https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
|
||||
brew tap --custom-remote --force-auto-update homebrew/cask-versions https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-versions.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 update
|
||||
|
||||
# 或使用下面的几行命令自动设置
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
for tap in core cask{,-fonts,-versions} command-not-found services; do
|
||||
brew tap --custom-remote --force-auto-update "homebrew/${tap}" "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-${tap}.git"
|
||||
done
|
||||
brew update
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
tell application "Finder"
|
||||
activate
|
||||
make new Finder window
|
||||
end tell
|
||||
tell application "Finder"
|
||||
activate
|
||||
make new Finder window
|
||||
end tell
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# pip
|
||||
Set-Alias pip pip3
|
||||
Set-Alias python python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
# pip
|
||||
Set-Alias pip pip3
|
||||
Set-Alias python python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
|
|
@ -1,22 +1,22 @@
|
|||
# pip
|
||||
alias pip=pip3
|
||||
alias python=python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
|
||||
|
||||
|
||||
# Linuxbrew
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
|
||||
# 注:自 brew 4.0 起,使用默认 prefix (即 "/home/linuxbrew/.linuxbrew") 的大部分 Homebrew 用户无需设置 homebrew/core 镜像,只需设置 HOMEBREW_API_DOMAIN 即可。
|
||||
# 如果不是默认 prefix 或者需要使用 Homebrew 的开发命令 (如 `brew cat <formula>`),则仍然需要设置 homebrew/core 镜像。
|
||||
# 请按需执行如下命令:
|
||||
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
||||
|
||||
# 除 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/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git
|
||||
# pip
|
||||
alias pip=pip3
|
||||
alias python=python3
|
||||
python -m pip install --upgrade pip
|
||||
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# npm
|
||||
npm config set registry https://registry.npmmirror.com
|
||||
|
||||
|
||||
|
||||
# Linuxbrew
|
||||
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
|
||||
|
||||
# 注:自 brew 4.0 起,使用默认 prefix (即 "/home/linuxbrew/.linuxbrew") 的大部分 Homebrew 用户无需设置 homebrew/core 镜像,只需设置 HOMEBREW_API_DOMAIN 即可。
|
||||
# 如果不是默认 prefix 或者需要使用 Homebrew 的开发命令 (如 `brew cat <formula>`),则仍然需要设置 homebrew/core 镜像。
|
||||
# 请按需执行如下命令:
|
||||
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
|
||||
|
||||
# 除 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/services https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-services.git
|
||||
brew update
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
||||
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 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-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-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
|
||||
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
|
||||
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 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-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-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-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
|
||||
|
|
@ -1,37 +1,37 @@
|
|||
### VARIABLES ###
|
||||
$EDITOR = "code"
|
||||
# Shell Equivalents #
|
||||
Set-Alias "touch" "New-Item"
|
||||
${function:ll} = { Get-ChildItem -Force }
|
||||
|
||||
# Shell Configurations #
|
||||
${function:shcfg} = { code $PROFILE }
|
||||
Set-Alias "pwshcfg" "shcfg"
|
||||
${function:reload} = { . $PROFILE }
|
||||
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
||||
|
||||
# Editors #
|
||||
Set-Alias "v" "nvim"
|
||||
Set-Alias "c" "code"
|
||||
Set-Alias "gvi" "neovide"
|
||||
|
||||
# File Creation #
|
||||
function mkcd { param ( [string] $dirname) mkdir $dirname && Set-Location $dirname }
|
||||
function tc { param ( [string] $filename) New-Item $filename && code $filename }
|
||||
function tv { param ( [string] $filename) New-Item $filename && nvim $filename }
|
||||
function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem }
|
||||
|
||||
### Dev ###
|
||||
|
||||
# .NET #
|
||||
${function:csi} = { dotnet repl --default-kernel csharp}
|
||||
${function:fsi} = { dotnet repl --default-kernel fsharp}
|
||||
|
||||
# Python & Conda #
|
||||
Set-Alias "py" "python"
|
||||
Set-Alias "ipy" "ipython"
|
||||
${function:pyact} = { conda activate $args[0] }
|
||||
${function:pydact} = { conda deactivate }
|
||||
${function:pylsenvs} = { conda env list }
|
||||
${function:pymkenv} = { conda create --name $args[0] }
|
||||
### VARIABLES ###
|
||||
$EDITOR = "code"
|
||||
# Shell Equivalents #
|
||||
Set-Alias "touch" "New-Item"
|
||||
${function:ll} = { Get-ChildItem -Force }
|
||||
|
||||
# Shell Configurations #
|
||||
${function:shcfg} = { code $PROFILE }
|
||||
Set-Alias "pwshcfg" "shcfg"
|
||||
${function:reload} = { . $PROFILE }
|
||||
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
||||
|
||||
# Editors #
|
||||
Set-Alias "v" "nvim"
|
||||
Set-Alias "c" "code"
|
||||
Set-Alias "gvi" "neovide"
|
||||
|
||||
# File Creation #
|
||||
function mkcd { param ( [string] $dirname) mkdir $dirname && Set-Location $dirname }
|
||||
function tc { param ( [string] $filename) New-Item $filename && code $filename }
|
||||
function tv { param ( [string] $filename) New-Item $filename && nvim $filename }
|
||||
function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem }
|
||||
|
||||
### Dev ###
|
||||
|
||||
# .NET #
|
||||
${function:csi} = { dotnet repl --default-kernel csharp}
|
||||
${function:fsi} = { dotnet repl --default-kernel fsharp}
|
||||
|
||||
# Python & Conda #
|
||||
Set-Alias "py" "python"
|
||||
Set-Alias "ipy" "ipython"
|
||||
${function:pyact} = { conda activate $args[0] }
|
||||
${function:pydact} = { conda deactivate }
|
||||
${function:pylsenvs} = { conda env list }
|
||||
${function:pymkenv} = { conda create --name $args[0] }
|
||||
${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
|
||||
|
||||
# wget
|
||||
${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args}
|
||||
|
||||
# yarn v1
|
||||
# Use XDG Base Directory Specification and its similar structure for Windows
|
||||
|
||||
# wget
|
||||
${function:wget} = {wget --hsts-file $XDG_CACHE_HOME/wget-hsts $args}
|
||||
|
||||
# yarn v1
|
||||
${function:yarn} = {yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config.yaml $args}
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
# aka PSReadLine
|
||||
# PSReadLineOptions
|
||||
Set-PSReadLineOption -EditMode Vi # Vi Keybindings
|
||||
Set-PSReadLineOption -PredictionViewStyle ListView
|
||||
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
||||
# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead
|
||||
# PSReadLineKeyHandlers
|
||||
## Colemak hnei
|
||||
Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command
|
||||
## Similar position to [i] in QWERTY
|
||||
Set-PSReadLineKeyHandler -Chord "l" -Function ViInsertMode -ViMode Command
|
||||
Set-PSReadlineKeyHandler -Chord "L" -Function ViInsertAtBegining -ViMode Command
|
||||
## Ne{[k]s}t
|
||||
Set-PSReadLineKeyHandler -Chord "k" -Function RepeatSearch -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "K" -Function RepeatSearchBackward -ViMode Command
|
||||
## [j]ump
|
||||
Set-PSReadLineKeyHandler -Chord "j" -Function NextWordEnd -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "J" -Function ViEndOfGlob -ViMode Command
|
||||
## Use N to Join
|
||||
Set-PSReadLineKeyHandler -Chord "N" -Function ViJoinLines -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape
|
||||
Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine
|
||||
# aka PSReadLine
|
||||
# PSReadLineOptions
|
||||
Set-PSReadLineOption -EditMode Vi # Vi Keybindings
|
||||
Set-PSReadLineOption -PredictionViewStyle ListView
|
||||
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
||||
# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead
|
||||
# PSReadLineKeyHandlers
|
||||
## Colemak hnei
|
||||
Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command
|
||||
## Similar position to [i] in QWERTY
|
||||
Set-PSReadLineKeyHandler -Chord "l" -Function ViInsertMode -ViMode Command
|
||||
Set-PSReadlineKeyHandler -Chord "L" -Function ViInsertAtBegining -ViMode Command
|
||||
## Ne{[k]s}t
|
||||
Set-PSReadLineKeyHandler -Chord "k" -Function RepeatSearch -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "K" -Function RepeatSearchBackward -ViMode Command
|
||||
## [j]ump
|
||||
Set-PSReadLineKeyHandler -Chord "j" -Function NextWordEnd -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "J" -Function ViEndOfGlob -ViMode Command
|
||||
## Use N to Join
|
||||
Set-PSReadLineKeyHandler -Chord "N" -Function ViJoinLines -ViMode Command
|
||||
Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape
|
||||
Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine
|
||||
Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
Import-Module -Name Terminal-Icons
|
||||
Import-Module -Name CompletionPredictor
|
||||
if ($IsWindows) {
|
||||
# Chocolatey
|
||||
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" }
|
||||
# WinGet
|
||||
Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58
|
||||
Import-Module -Name Terminal-Icons
|
||||
Import-Module -Name CompletionPredictor
|
||||
if ($IsWindows) {
|
||||
# Chocolatey
|
||||
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||
if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" }
|
||||
# WinGet
|
||||
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 ..\.. }
|
||||
${function:....} = { Set-Location -Path ..\..\.. }
|
||||
${function:.....} = { Set-Location -Path ..\..\..\.. }
|
||||
${function:......} = { Set-Location -Path ..\..\..\..\.. }
|
||||
|
||||
# Absolute navigation
|
||||
${function:docs} = { Set-Location -Path ~/Documents }
|
||||
${function:down} = { Set-Location -Path ~/Downloads }
|
||||
${function:dt} = { Set-Location -Path ~/Desktop }
|
||||
${function:mytmp} = { Set-Location -Path ~/Temp }
|
||||
${function:one} = { Set-Location -Path ~/OneDrive }
|
||||
${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem }
|
||||
|
||||
# ${function:~} = { Set-Location -Path ~ } cd is better
|
||||
${function:...} = { Set-Location -Path ..\.. }
|
||||
${function:....} = { Set-Location -Path ..\..\.. }
|
||||
${function:.....} = { Set-Location -Path ..\..\..\.. }
|
||||
${function:......} = { Set-Location -Path ..\..\..\..\.. }
|
||||
|
||||
# Absolute navigation
|
||||
${function:docs} = { Set-Location -Path ~/Documents }
|
||||
${function:down} = { Set-Location -Path ~/Downloads }
|
||||
${function:dt} = { Set-Location -Path ~/Desktop }
|
||||
${function:mytmp} = { Set-Location -Path ~/Temp }
|
||||
${function:one} = { Set-Location -Path ~/OneDrive }
|
||||
${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem }
|
||||
|
||||
Invoke-Expression (& { (zoxide init powershell | Out-String) })
|
||||
|
|
@ -1,92 +1,92 @@
|
|||
# Use starship to set prompt
|
||||
$ENV:STARSHIP_CONFIG = "$DOTFILES/.config/starship/starship_pwsh.toml"
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
# Below is the backup of original prompt function
|
||||
# $promptTime = $true
|
||||
# # $promptWeather = $false
|
||||
|
||||
# function prompt {
|
||||
# $prompt = "`e[35m"
|
||||
# # Time
|
||||
# if ($promptTime) {
|
||||
# $promptTime = Get-Date -Format HH:mm
|
||||
# $prompt += "`[$promptTime]"
|
||||
# }
|
||||
# # UserInfo
|
||||
# $prompt += " $Env:Username @ $Env:Userdomain"
|
||||
# # Directory
|
||||
# $promptCurrentDirectory = $(PWD).Path
|
||||
# $promptCurrentDirectory = $promptCurrentDirectory.Replace("$HOME", "~")
|
||||
# $prompt += "`e[0m in `e[33m$promptCurrentDirectory "
|
||||
# # Git
|
||||
# if ($(git rev-parse --is-inside-work-tree 2> $null) -eq "true") {
|
||||
# $prompt += "`e[32m`u{e702} $(git branch --show-current)"
|
||||
# }
|
||||
# # Conda
|
||||
# if ( $Env:CONDA_PROMPT_MODIFIER ) {
|
||||
# $promptConda = $Env:CONDA_PROMPT_MODIFIER.Replace("`(","").Replace(")","")
|
||||
# $pythonVersion = $(python --version).Split(" ")[1]
|
||||
# $prompt += " `e[33m`u{e73c} $promptConda $pythonVersion"
|
||||
# }
|
||||
# # Programming Language (by Get-ChildItem)
|
||||
# ## Python
|
||||
# if (Test-Path -Path "$PWD\pyproject.toml") {
|
||||
# $pythonVersion = $(python --version).Split(" ")[1]
|
||||
# $prompt += " `e[33m`u{e73c} $pythonVersion"
|
||||
# }
|
||||
# ## Node.js
|
||||
# if (Test-Path -Path "$PWD\package.json") {
|
||||
# $nodeVersion = $(node --version)
|
||||
# $prompt += " `e[32m`u{e3a0} $nodeVersion"
|
||||
# # Locked
|
||||
# if (Test-Path -Path "$PWD\yarn.lock" || Test-Path -Path "$PWD\package-lock.json") {
|
||||
# $prompt += "`u{f023}"
|
||||
# }
|
||||
# }
|
||||
# ## .NET
|
||||
# ### C Sharp
|
||||
# if (Test-Path -Path "$PWD\*.csproj") {
|
||||
# $dotnetVersion = $(dotnet --version)
|
||||
# $prompt += " `e[34m`u{e648} $dotnetVersion"
|
||||
# }
|
||||
# ### F Sharp
|
||||
# if (Test-Path -Path "$PWD\*.fsproj") {
|
||||
# $dotnetVersion = $(dotnet --version)
|
||||
# $prompt += " `e[35m`u{e65a} $dotnetVersion"
|
||||
# }
|
||||
# ## Rust
|
||||
# if (Test-Path -Path "$PWD\Cargo.toml") {
|
||||
# $rustVersion = $(cargo --version).Split(" ")[1]
|
||||
# $prompt += " `e[31m`u{e7a8} $rustVersion"
|
||||
# }
|
||||
# ## Java
|
||||
# if (Test-Path -Path "$PWD\pom.xml" || Test-Path -Path "$PWD\build.gradle") {
|
||||
# $javaVersion = $(java --version).Split(" ")[1]
|
||||
# $prompt += " `e[31m`u{e738} $javaVersion"
|
||||
# }
|
||||
# ## Makefile
|
||||
# if (Test-Path -Path "$PWD\Makefile") {
|
||||
# $prompt += " `e[32m`u{e673}"
|
||||
# }
|
||||
# if (Test-Path -Path "$PWD\CMakeLists.txt") {
|
||||
# $prompt += " `e[32m `u{e61d}"
|
||||
# }
|
||||
# # Docker
|
||||
# if (Test-Path -Path "$PWD\Dockerfile" || Test-Path -Path "$PWD\docker-compose.yml") {
|
||||
# $prompt += " `e[33m`u{f21f}"
|
||||
# }
|
||||
# # Weather
|
||||
# # if ( $global:promptWeather ) {
|
||||
# # $prompt += $(Write-WeatherCurrent -City "Edinburgh" -Country "UK" -Unit "metric" -Inline -Apikey $Env:WEATHER_API_KEY)
|
||||
# # }
|
||||
# # Error on last command
|
||||
# ## TODO: Seems does not work
|
||||
# if ($?) {
|
||||
# $prompt += "`n`e[32m PS > `e[0m"
|
||||
# } else {
|
||||
# $prompt += "`n`e[31m PS > `e[0m"
|
||||
# }
|
||||
# return $prompt
|
||||
# Use starship to set prompt
|
||||
$ENV:STARSHIP_CONFIG = "$DOTFILES/.config/starship/starship_pwsh.toml"
|
||||
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
# Below is the backup of original prompt function
|
||||
# $promptTime = $true
|
||||
# # $promptWeather = $false
|
||||
|
||||
# function prompt {
|
||||
# $prompt = "`e[35m"
|
||||
# # Time
|
||||
# if ($promptTime) {
|
||||
# $promptTime = Get-Date -Format HH:mm
|
||||
# $prompt += "`[$promptTime]"
|
||||
# }
|
||||
# # UserInfo
|
||||
# $prompt += " $Env:Username @ $Env:Userdomain"
|
||||
# # Directory
|
||||
# $promptCurrentDirectory = $(PWD).Path
|
||||
# $promptCurrentDirectory = $promptCurrentDirectory.Replace("$HOME", "~")
|
||||
# $prompt += "`e[0m in `e[33m$promptCurrentDirectory "
|
||||
# # Git
|
||||
# if ($(git rev-parse --is-inside-work-tree 2> $null) -eq "true") {
|
||||
# $prompt += "`e[32m`u{e702} $(git branch --show-current)"
|
||||
# }
|
||||
# # Conda
|
||||
# if ( $Env:CONDA_PROMPT_MODIFIER ) {
|
||||
# $promptConda = $Env:CONDA_PROMPT_MODIFIER.Replace("`(","").Replace(")","")
|
||||
# $pythonVersion = $(python --version).Split(" ")[1]
|
||||
# $prompt += " `e[33m`u{e73c} $promptConda $pythonVersion"
|
||||
# }
|
||||
# # Programming Language (by Get-ChildItem)
|
||||
# ## Python
|
||||
# if (Test-Path -Path "$PWD\pyproject.toml") {
|
||||
# $pythonVersion = $(python --version).Split(" ")[1]
|
||||
# $prompt += " `e[33m`u{e73c} $pythonVersion"
|
||||
# }
|
||||
# ## Node.js
|
||||
# if (Test-Path -Path "$PWD\package.json") {
|
||||
# $nodeVersion = $(node --version)
|
||||
# $prompt += " `e[32m`u{e3a0} $nodeVersion"
|
||||
# # Locked
|
||||
# if (Test-Path -Path "$PWD\yarn.lock" || Test-Path -Path "$PWD\package-lock.json") {
|
||||
# $prompt += "`u{f023}"
|
||||
# }
|
||||
# }
|
||||
# ## .NET
|
||||
# ### C Sharp
|
||||
# if (Test-Path -Path "$PWD\*.csproj") {
|
||||
# $dotnetVersion = $(dotnet --version)
|
||||
# $prompt += " `e[34m`u{e648} $dotnetVersion"
|
||||
# }
|
||||
# ### F Sharp
|
||||
# if (Test-Path -Path "$PWD\*.fsproj") {
|
||||
# $dotnetVersion = $(dotnet --version)
|
||||
# $prompt += " `e[35m`u{e65a} $dotnetVersion"
|
||||
# }
|
||||
# ## Rust
|
||||
# if (Test-Path -Path "$PWD\Cargo.toml") {
|
||||
# $rustVersion = $(cargo --version).Split(" ")[1]
|
||||
# $prompt += " `e[31m`u{e7a8} $rustVersion"
|
||||
# }
|
||||
# ## Java
|
||||
# if (Test-Path -Path "$PWD\pom.xml" || Test-Path -Path "$PWD\build.gradle") {
|
||||
# $javaVersion = $(java --version).Split(" ")[1]
|
||||
# $prompt += " `e[31m`u{e738} $javaVersion"
|
||||
# }
|
||||
# ## Makefile
|
||||
# if (Test-Path -Path "$PWD\Makefile") {
|
||||
# $prompt += " `e[32m`u{e673}"
|
||||
# }
|
||||
# if (Test-Path -Path "$PWD\CMakeLists.txt") {
|
||||
# $prompt += " `e[32m `u{e61d}"
|
||||
# }
|
||||
# # Docker
|
||||
# if (Test-Path -Path "$PWD\Dockerfile" || Test-Path -Path "$PWD\docker-compose.yml") {
|
||||
# $prompt += " `e[33m`u{f21f}"
|
||||
# }
|
||||
# # Weather
|
||||
# # if ( $global:promptWeather ) {
|
||||
# # $prompt += $(Write-WeatherCurrent -City "Edinburgh" -Country "UK" -Unit "metric" -Inline -Apikey $Env:WEATHER_API_KEY)
|
||||
# # }
|
||||
# # Error on last command
|
||||
# ## TODO: Seems does not work
|
||||
# if ($?) {
|
||||
# $prompt += "`n`e[32m PS > `e[0m"
|
||||
# } else {
|
||||
# $prompt += "`n`e[31m PS > `e[0m"
|
||||
# }
|
||||
# return $prompt
|
||||
# }
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
function CsvToMarkdown {
|
||||
param( [string]$csv)
|
||||
$counter = 0
|
||||
$column = $csv.Split("`n")[0].Split(",").Length
|
||||
$aHeader = " --- |"
|
||||
$header = "|" + $aHeader * $column
|
||||
$csv.replace(",", " | ").Split("`n") | ForEach-Object {
|
||||
if ($counter -eq 0) {
|
||||
Write-Output "| $_ |"
|
||||
$counter++
|
||||
Write-Output $header
|
||||
}
|
||||
else {
|
||||
Write-Output "| $_ |"
|
||||
}
|
||||
}
|
||||
function CsvToMarkdown {
|
||||
param( [string]$csv)
|
||||
$counter = 0
|
||||
$column = $csv.Split("`n")[0].Split(",").Length
|
||||
$aHeader = " --- |"
|
||||
$header = "|" + $aHeader * $column
|
||||
$csv.replace(",", " | ").Split("`n") | ForEach-Object {
|
||||
if ($counter -eq 0) {
|
||||
Write-Output "| $_ |"
|
||||
$counter++
|
||||
Write-Output $header
|
||||
}
|
||||
else {
|
||||
Write-Output "| $_ |"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
# PowerShell Profile
|
||||
|
||||
This is the cross-platform PowerShell profile for PowerShell Core
|
||||
|
||||
```text
|
||||
.
|
||||
├── Aliases.ps1
|
||||
├── Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak
|
||||
├── Modules.ps1
|
||||
├── Navigation.ps1
|
||||
├── Prompt.ps1
|
||||
├── readme.md
|
||||
└── Scripts.ps1
|
||||
|
||||
1 directory, 7 files
|
||||
```
|
||||
|
||||
| Keymap | Action | Mode |
|
||||
| --- | --- | --- |
|
||||
| `^a` | To Beginning of Line | All |
|
||||
| `^e` | To End of Line | All |
|
||||
| `^[` | To Normal Mode | Insert |
|
||||
|
||||
# PowerShell Profile
|
||||
|
||||
This is the cross-platform PowerShell profile for PowerShell Core
|
||||
|
||||
```text
|
||||
.
|
||||
├── Aliases.ps1
|
||||
├── Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak
|
||||
├── Modules.ps1
|
||||
├── Navigation.ps1
|
||||
├── Prompt.ps1
|
||||
├── readme.md
|
||||
└── Scripts.ps1
|
||||
|
||||
1 directory, 7 files
|
||||
```
|
||||
|
||||
| Keymap | Action | Mode |
|
||||
| --- | --- | --- |
|
||||
| `^a` | To Beginning of Line | All |
|
||||
| `^e` | To End of Line | All |
|
||||
| `^[` | To Normal Mode | Insert |
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# .dotfiles
|
||||
|
||||
Moving to *Colemak*
|
||||
|
||||
# .dotfiles
|
||||
|
||||
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
|
||||
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 $WAKATIME_HOME
|
||||
mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view
|
||||
# $DOTFILES/.config
|
||||
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/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/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||
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/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/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
|
||||
ln -sf $DOTFILES/.config/zellij/config.kdl ~/.config/zellij/config.kdl
|
||||
ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
||||
# $DOTFILES/vscode
|
||||
ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc
|
||||
# $DOTFILES root
|
||||
#! /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 ~/.config/zellij # Not support XDG_CONFIG_HOME but same directory
|
||||
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
|
||||
# $DOTFILES/.config
|
||||
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/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/npm/npmrc $NPM_CONFIG_USERCONFIG
|
||||
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/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/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
|
||||
ln -sf $DOTFILES/.config/zellij/config.kdl ~/.config/zellij/config.kdl
|
||||
ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey
|
||||
# $DOTFILES/vscode
|
||||
ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode.vimrc
|
||||
# $DOTFILES root
|
||||
ln -sf $DOTFILES/.haskeline ~/.haskeline
|
||||
|
|
@ -16,7 +16,9 @@ Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
|
|||
# Set Environment Variables
|
||||
# Use %PATH_EXT% to prevent PATH from being too long
|
||||
[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")
|
||||
$currentPath = [System.Environment]::GetEnvironmentVariable("Path", "User")
|
||||
if ($currentPath -notlike "*%PATH_EXT%*") {
|
||||
|
|
@ -59,7 +61,7 @@ New-Item -ItemType Directory -Path "$Env:AppData\aws" -Force
|
|||
# ~\.dotnet -> %LocalAppData%\dotNET :: .NET Core
|
||||
[System.Environment]::SetEnvironmentVariable("DOTNET_CLI_HOME", "$Env:LocalAppData\dotNET", "User")
|
||||
# ~\.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
|
||||
[System.Environment]::SetEnvironmentVariable("GOPATH", "$Env:LocalAppData\GO", "User")
|
||||
# ~\.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 "$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
|
||||
# Hide dotfiles
|
||||
Get-ChildItem -Force -Filter .* -Path $HOME | ForEach-Object { $_.Attributes += "Hidden" }
|
||||
# Hide dotfiles
|
||||
Get-ChildItem -Force -Filter .* -Path $HOME | ForEach-Object { $_.Attributes += "Hidden" }
|
||||
@(
|
||||
Join-Path $HOME '.config'
|
||||
Join-Path $HOME '.dotfiles'
|
||||
) | ForEach-Object {
|
||||
) | ForEach-Object {
|
||||
$_.Attributes -band -bnot [System.IO.FileAttributes]::Hidden
|
||||
}
|
||||
}
|
||||
Set-Location $HOME\Documents
|
||||
# Match WindowsPowerShell and PowerShell
|
||||
Get-ChildItem -Force -Filter *owerShell | ForEach-Object { $_.Attributes += "Hidden" }
|
||||
|
|
@ -167,9 +169,12 @@ scoop install main/ripgrep
|
|||
scoop install main/wget
|
||||
scoop install main/wget2
|
||||
scoop install main/cmake
|
||||
scoop install main/bat
|
||||
scoop install main/zoxide
|
||||
scoop install main/dos2unix
|
||||
scoop install main/bat # modern cat
|
||||
scoop install main/zoxide # Directory Jump
|
||||
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
|
||||
scoop install extras/everything
|
||||
|
|
@ -207,7 +212,7 @@ scoop install keyguard/keyguard
|
|||
|
||||
# PKM
|
||||
scoop install extras/obsidian
|
||||
winget install -e --id 9P7HPMXP73K4 # Siyuan
|
||||
winget install -e --id 9P7HPMXP73K4 # Siyuan
|
||||
scoop install extras/typora
|
||||
scoop install extras/zotero
|
||||
scoop install extras/anki
|
||||
|
|
@ -215,7 +220,7 @@ scoop install extras/anki
|
|||
|
||||
# Browser
|
||||
# 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
|
||||
|
||||
# Programming Languages
|
||||
|
|
@ -223,7 +228,7 @@ winget install -e --id Python.Python.3.13
|
|||
winget install -e --id Anaconda.Miniconda3
|
||||
winget install -e --id OpenJS.NodeJS
|
||||
winget install -e --id Rustlang.Rustup
|
||||
winget install -e --id Microsoft.DotNet.SDK.8
|
||||
winget install -e --id Microsoft.DotNet.SDK.9
|
||||
|
||||
# Dev
|
||||
scoop install extras/docker
|
||||
|
|
@ -260,4 +265,4 @@ scoop install LXGWWenKaiMono # 霞鹜文楷Mono
|
|||
|
||||
# WSL
|
||||
scoop install archwsl
|
||||
wsl --set-version Arch 1
|
||||
wsl --set-version Arch 1
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
snippet hio "include stdio.h" iA
|
||||
#include <stdio.h>
|
||||
endsnippet
|
||||
|
||||
snippet hlib "include stdlib.h" iA
|
||||
#include <stdlib.h>
|
||||
endsnippet
|
||||
|
||||
snippet hmath "include math.h" iA
|
||||
#include <math.h>
|
||||
endsnippet
|
||||
|
||||
snippet hstr "include string.h" iA
|
||||
#include <string.h>
|
||||
snippet hio "include stdio.h" iA
|
||||
#include <stdio.h>
|
||||
endsnippet
|
||||
|
||||
snippet hlib "include stdlib.h" iA
|
||||
#include <stdlib.h>
|
||||
endsnippet
|
||||
|
||||
snippet hmath "include math.h" iA
|
||||
#include <math.h>
|
||||
endsnippet
|
||||
|
||||
snippet hstr "include string.h" iA
|
||||
#include <string.h>
|
||||
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
|
||||
|
||||
## Navigator
|
||||
|
||||
- [C](./c.hsnips)
|
||||
- [$\LaTeX$](./latex.hsnips)
|
||||
- [Markdown](./markdown.hsnips)
|
||||
# VSCode HyperSnips Snippets
|
||||
|
||||
## Navigator
|
||||
|
||||
- [C](./c.hsnips)
|
||||
- [$\LaTeX$](./latex.hsnips)
|
||||
- [Markdown](./markdown.hsnips)
|
||||
- [Typst](./typst.hsnips)
|
||||
|
|
@ -1,133 +1,133 @@
|
|||
snippet mk "inline Math" iwA
|
||||
$${1}$
|
||||
endsnippet
|
||||
|
||||
snippet dmi "display Math" iwA
|
||||
$ ${1} $
|
||||
endsnippet
|
||||
|
||||
snippet dmm "display Math" iwA
|
||||
$
|
||||
${1}
|
||||
$
|
||||
endsnippet
|
||||
|
||||
snippet pp "parenthesis" iAm
|
||||
(${1})
|
||||
endsnippet
|
||||
|
||||
snippet lim "limit" iAm
|
||||
lim_(${1:n} -> ${2:oo})
|
||||
endsnippet
|
||||
|
||||
snippet derive "derive" iAm
|
||||
derive(${1:f}, ${2:x})
|
||||
endsnippet
|
||||
|
||||
snippet part "partial" iAm
|
||||
(diff ${1:f})/(diff ${3:x})
|
||||
endsnippet
|
||||
|
||||
snippet sb "subscript" iAm
|
||||
_(${1:2})
|
||||
endsnippet
|
||||
|
||||
snippet sr "square" iAm
|
||||
^2
|
||||
endsnippet
|
||||
|
||||
snippet pow "to the ... power" iAm
|
||||
^(${1:3})
|
||||
endsnippet
|
||||
|
||||
snippet veps "epsilon.alt" iAm
|
||||
epsilon.alt
|
||||
endsnippet
|
||||
|
||||
snippet ;; "\;" iAm
|
||||
\;
|
||||
endsnippet
|
||||
|
||||
snippet ,, "\," iAm
|
||||
\,
|
||||
endsnippet
|
||||
|
||||
snippet `([A-Za-z\)])(\d)` "auto subscript" iAm
|
||||
`` rv = m[1] + "_" + m[2]``
|
||||
endsnippet
|
||||
|
||||
snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm
|
||||
`` rv = m[1] + "_(" + m[2] + ")" ``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<![A-Za-z])([A-Za-hk-z])([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript" iAm
|
||||
`` rv = m[1] + "_" + m[2] ``
|
||||
endsnippet
|
||||
|
||||
# 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
|
||||
`` rv = m[1] + "_" + m[2].substring(0, 1) ``
|
||||
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
|
||||
``
|
||||
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] + ")"
|
||||
``
|
||||
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
|
||||
``
|
||||
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] + ")"
|
||||
``
|
||||
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
|
||||
``
|
||||
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] + ")"
|
||||
``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<!\.)alt` "alt" iAm
|
||||
.alt
|
||||
endsnippet
|
||||
|
||||
snippet invs "inverse" iAm
|
||||
^(-1)
|
||||
endsnippet
|
||||
|
||||
snippet xl "vector" iAm
|
||||
arrow(${1:x})
|
||||
endsnippet
|
||||
|
||||
snippet @< "angle" iAm
|
||||
angle.l ${1:x} angle.r
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet HL "highlight" iA
|
||||
#highlight[${VISUAL}]
|
||||
endsnippet
|
||||
|
||||
snippet iiint "triple integral" iAm
|
||||
integral.triple ${1}
|
||||
endsnippet
|
||||
|
||||
snippet oint "closed line integral" iAm
|
||||
integral.cont ${1}
|
||||
endsnippet
|
||||
|
||||
snippet iint "double integral" iAm
|
||||
integral.double ${1}
|
||||
endsnippet
|
||||
|
||||
snippet int "integral" iAm
|
||||
integral ${1}
|
||||
endsnippet
|
||||
|
||||
snippet // "frac" iAm
|
||||
frac(${1:1}, ${2:2})
|
||||
snippet mk "inline Math" iwA
|
||||
$${1}$
|
||||
endsnippet
|
||||
|
||||
snippet dmi "display Math" iwA
|
||||
$ ${1} $
|
||||
endsnippet
|
||||
|
||||
snippet dmm "display Math" iwA
|
||||
$
|
||||
${1}
|
||||
$
|
||||
endsnippet
|
||||
|
||||
snippet pp "parenthesis" iAm
|
||||
(${1})
|
||||
endsnippet
|
||||
|
||||
snippet lim "limit" iAm
|
||||
lim_(${1:n} -> ${2:oo})
|
||||
endsnippet
|
||||
|
||||
snippet derive "derive" iAm
|
||||
derive(${1:f}, ${2:x})
|
||||
endsnippet
|
||||
|
||||
snippet part "partial" iAm
|
||||
(diff ${1:f})/(diff ${3:x})
|
||||
endsnippet
|
||||
|
||||
snippet sb "subscript" iAm
|
||||
_(${1:2})
|
||||
endsnippet
|
||||
|
||||
snippet sr "square" iAm
|
||||
^2
|
||||
endsnippet
|
||||
|
||||
snippet pow "to the ... power" iAm
|
||||
^(${1:3})
|
||||
endsnippet
|
||||
|
||||
snippet veps "epsilon.alt" iAm
|
||||
epsilon.alt
|
||||
endsnippet
|
||||
|
||||
snippet ;; "\;" iAm
|
||||
\;
|
||||
endsnippet
|
||||
|
||||
snippet ,, "\," iAm
|
||||
\,
|
||||
endsnippet
|
||||
|
||||
snippet `([A-Za-z\)])(\d)` "auto subscript" iAm
|
||||
`` rv = m[1] + "_" + m[2]``
|
||||
endsnippet
|
||||
|
||||
snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm
|
||||
`` rv = m[1] + "_(" + m[2] + ")" ``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<![A-Za-z])([A-Za-hk-z])([acdijkmnpqrstABCDIJKMNPQRST])\2` "auto subscript" iAm
|
||||
`` rv = m[1] + "_" + m[2] ``
|
||||
endsnippet
|
||||
|
||||
# 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
|
||||
`` rv = m[1] + "_" + m[2].substring(0, 1) ``
|
||||
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
|
||||
``
|
||||
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] + ")"
|
||||
``
|
||||
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
|
||||
``
|
||||
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] + ")"
|
||||
``
|
||||
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
|
||||
``
|
||||
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] + ")"
|
||||
``
|
||||
endsnippet
|
||||
|
||||
snippet `(?<!\.)alt` "alt" iAm
|
||||
.alt
|
||||
endsnippet
|
||||
|
||||
snippet invs "inverse" iAm
|
||||
^(-1)
|
||||
endsnippet
|
||||
|
||||
snippet xl "vector" iAm
|
||||
arrow(${1:x})
|
||||
endsnippet
|
||||
|
||||
snippet @< "angle" iAm
|
||||
angle.l ${1:x} angle.r
|
||||
endsnippet
|
||||
|
||||
|
||||
snippet HL "highlight" iA
|
||||
#highlight[${VISUAL}]
|
||||
endsnippet
|
||||
|
||||
snippet iiint "triple integral" iAm
|
||||
integral.triple ${1}
|
||||
endsnippet
|
||||
|
||||
snippet oint "closed line integral" iAm
|
||||
integral.cont ${1}
|
||||
endsnippet
|
||||
|
||||
snippet iint "double integral" iAm
|
||||
integral.double ${1}
|
||||
endsnippet
|
||||
|
||||
snippet int "integral" iAm
|
||||
integral ${1}
|
||||
endsnippet
|
||||
|
||||
snippet // "frac" iAm
|
||||
frac(${1:1}, ${2:2})
|
||||
endsnippet
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
" ~/.config/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
|
||||
" And go to vscode vim setting:
|
||||
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",
|
||||
|
||||
" Arrow remap
|
||||
noremap n j
|
||||
noremap e k
|
||||
noremap i l
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
" ~/.config/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
|
||||
" And go to vscode vim setting:
|
||||
"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc",
|
||||
|
||||
" Arrow remap
|
||||
noremap n j
|
||||
noremap e k
|
||||
noremap i l
|
||||
|
||||
" Similar position to i
|
||||
noremap l i
|
||||
noremap L I
|
||||
" ne[k]st
|
||||
noremap k n
|
||||
noremap K N
|
||||
" [j]ump
|
||||
noremap j e
|
||||
noremap J E
|
||||
|
||||
" Y to yank to end of line
|
||||
noremap Y y$
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
# ~/.wslconfig
|
||||
# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig
|
||||
[wsl2]
|
||||
networkingMode=mirrored
|
||||
dnsTunneling=true
|
||||
firewall=true
|
||||
autoProxy=true
|
||||
|
||||
[experimental]
|
||||
# requires dnsTunneling but are also OPTIONAL
|
||||
bestEffortDnsParsing=true
|
||||
# ~/.wslconfig
|
||||
# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig
|
||||
[wsl2]
|
||||
networkingMode=mirrored
|
||||
dnsTunneling=true
|
||||
firewall=true
|
||||
autoProxy=true
|
||||
|
||||
[experimental]
|
||||
# requires dnsTunneling but are also OPTIONAL
|
||||
bestEffortDnsParsing=true
|
||||
hostAddressLoopback=true
|
||||
|
|
@ -39,6 +39,9 @@ function Find-AppPackageListRemote {
|
|||
winget search $Name
|
||||
Write-Host "=== choco ==="
|
||||
choco search $Name
|
||||
# Too slow!
|
||||
# Write-Host "=== scoop ==="
|
||||
# scoop search $Name
|
||||
}
|
||||
Set-Alias "pkgsearch" "Find-AppPackageListRemote"
|
||||
function Get-AppPackageListLocal {
|
||||
|
|
@ -94,3 +97,14 @@ if (-not ($__lastStartup -eq $_currentDate)) {
|
|||
Remove-Variable SystemlogFilePath
|
||||
Remove-Variable __lastStartup
|
||||
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",
|
||||
"$schema": "https://aka.ms/terminal-profiles-schema",
|
||||
"actions":
|
||||
"actions":
|
||||
[
|
||||
{
|
||||
"command":
|
||||
"command":
|
||||
{
|
||||
"action": "copy",
|
||||
"singleLine": false
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
"keys": "ctrl+shift+f"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
"command":
|
||||
{
|
||||
"action": "splitPane",
|
||||
"split": "auto",
|
||||
|
|
@ -41,15 +41,15 @@
|
|||
"focusFollowMouse": false,
|
||||
"language": "zh-Hans",
|
||||
"minimizeToNotificationArea": false,
|
||||
"newTabMenu":
|
||||
"newTabMenu":
|
||||
[
|
||||
{
|
||||
"type": "remainingProfiles"
|
||||
}
|
||||
],
|
||||
"profiles":
|
||||
"profiles":
|
||||
{
|
||||
"defaults":
|
||||
"defaults":
|
||||
{
|
||||
"adjustIndistinguishableColors": "always",
|
||||
"antialiasingMode": "cleartype",
|
||||
|
|
@ -58,11 +58,11 @@
|
|||
"colorScheme": "Catppuccin Mocha",
|
||||
"compatibility.reloadEnvironmentVariables": false,
|
||||
"experimental.retroTerminalEffect": false,
|
||||
"font":
|
||||
"font":
|
||||
{
|
||||
"colorGlyphs": true,
|
||||
"face": "CaskaydiaCove Nerd Font",
|
||||
"features":
|
||||
"features":
|
||||
{
|
||||
"rlig": 1
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
"showMarksOnScrollbar": true,
|
||||
"useAcrylic": true
|
||||
},
|
||||
"list":
|
||||
"list":
|
||||
[
|
||||
{
|
||||
"colorScheme": "Catppuccin Frappe",
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
{
|
||||
"colorScheme": "Ubuntu-ColorScheme",
|
||||
"commandline": "C:\\WINDOWS\\system32\\wsl.exe -d Ubuntu-22.04",
|
||||
"font":
|
||||
"font":
|
||||
{
|
||||
"face": "CaskaydiaCove Nerd Font"
|
||||
},
|
||||
|
|
@ -118,6 +118,16 @@
|
|||
"name": "Ubuntu",
|
||||
"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}",
|
||||
"hidden": false,
|
||||
|
|
@ -138,7 +148,7 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"schemes":
|
||||
"schemes":
|
||||
[
|
||||
{
|
||||
"background": "#303446",
|
||||
|
|
@ -260,23 +270,23 @@
|
|||
"startOnUserLogin": true,
|
||||
"tabWidthMode": "titleLength",
|
||||
"theme": "Catppuccin Macchiato",
|
||||
"themes":
|
||||
"themes":
|
||||
[
|
||||
{
|
||||
"name": "Catppuccin Frappe",
|
||||
"tab":
|
||||
"tab":
|
||||
{
|
||||
"background": "#303446FF",
|
||||
"iconStyle": "default",
|
||||
"showCloseButton": "always",
|
||||
"unfocusedBackground": null
|
||||
},
|
||||
"tabRow":
|
||||
"tabRow":
|
||||
{
|
||||
"background": "#292C3CFF",
|
||||
"unfocusedBackground": "#232634FF"
|
||||
},
|
||||
"window":
|
||||
"window":
|
||||
{
|
||||
"applicationTheme": "dark",
|
||||
"experimental.rainbowFrame": false,
|
||||
|
|
@ -287,19 +297,19 @@
|
|||
},
|
||||
{
|
||||
"name": "Catppuccin Latte",
|
||||
"tab":
|
||||
"tab":
|
||||
{
|
||||
"background": "#EFF1F5FF",
|
||||
"iconStyle": "default",
|
||||
"showCloseButton": "always",
|
||||
"unfocusedBackground": null
|
||||
},
|
||||
"tabRow":
|
||||
"tabRow":
|
||||
{
|
||||
"background": "#E6E9EFFF",
|
||||
"unfocusedBackground": "#DCE0E8FF"
|
||||
},
|
||||
"window":
|
||||
"window":
|
||||
{
|
||||
"applicationTheme": "light",
|
||||
"experimental.rainbowFrame": false,
|
||||
|
|
@ -310,19 +320,19 @@
|
|||
},
|
||||
{
|
||||
"name": "Catppuccin Macchiato",
|
||||
"tab":
|
||||
"tab":
|
||||
{
|
||||
"background": "#24273AFF",
|
||||
"iconStyle": "default",
|
||||
"showCloseButton": "always",
|
||||
"unfocusedBackground": null
|
||||
},
|
||||
"tabRow":
|
||||
"tabRow":
|
||||
{
|
||||
"background": "#1E2030FF",
|
||||
"unfocusedBackground": "#181926FF"
|
||||
},
|
||||
"window":
|
||||
"window":
|
||||
{
|
||||
"applicationTheme": "dark",
|
||||
"experimental.rainbowFrame": false,
|
||||
|
|
@ -333,19 +343,19 @@
|
|||
},
|
||||
{
|
||||
"name": "Catppuccin Mocha",
|
||||
"tab":
|
||||
"tab":
|
||||
{
|
||||
"background": "#1E1E2EFF",
|
||||
"iconStyle": "default",
|
||||
"showCloseButton": "always",
|
||||
"unfocusedBackground": null
|
||||
},
|
||||
"tabRow":
|
||||
"tabRow":
|
||||
{
|
||||
"background": "#181825FF",
|
||||
"unfocusedBackground": "#11111BFF"
|
||||
},
|
||||
"window":
|
||||
"window":
|
||||
{
|
||||
"applicationTheme": "dark",
|
||||
"experimental.rainbowFrame": false,
|
||||
|
|
@ -356,4 +366,4 @@
|
|||
}
|
||||
],
|
||||
"useAcrylicInTabRow": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
fork = false
|
||||
frame = "full"
|
||||
idle = true
|
||||
maximized = false
|
||||
no-multigrid = false
|
||||
srgb = false
|
||||
tabs = true
|
||||
theme = "auto"
|
||||
title-hidden = true
|
||||
vsync = false
|
||||
wsl = false
|
||||
|
||||
[font]
|
||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
fork = false
|
||||
frame = "full"
|
||||
idle = true
|
||||
maximized = false
|
||||
no-multigrid = false
|
||||
srgb = false
|
||||
tabs = true
|
||||
theme = "auto"
|
||||
title-hidden = true
|
||||
vsync = false
|
||||
wsl = true
|
||||
|
||||
[font]
|
||||
normal = ["CaskaydiaCove Nerd Font"] # Will use the bundled Fira Code Nerd Font by default
|
||||
size = 14.0
|
||||
|
|
|
|||
|
|
@ -1,50 +1,50 @@
|
|||
# Windows dotfiles
|
||||
|
||||
By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix:
|
||||
|
||||
- `%APPDATA%` - `$XDG_CONFIG_HOME` (default: `%USERPROFILE%\AppData\Roaming`)
|
||||
|
||||
|
||||
## 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`.
|
||||
|
||||
It is convenient to use `$PROFILE` to locate the profile file.
|
||||
|
||||
```pwsh
|
||||
Test-Path $PROFILE
|
||||
```
|
||||
|
||||
To link the profile file:
|
||||
|
||||
```pwsh
|
||||
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.
|
||||
|
||||
## `.wslconfig` - WSL Configuration
|
||||
|
||||
`.wslconfig` only supports `~/.wslconfig` as the configuration path
|
||||
|
||||
```pwsh
|
||||
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
||||
```
|
||||
|
||||
## Windows Terminal
|
||||
|
||||
Use Hard Link to sync Windows Terminal Settings since it doesn't support symlink.
|
||||
|
||||
```pwsh
|
||||
New-Item -ItemType HardLink -Path "$Env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Target "$DOTFILES\win\WindowsTerminal.json" -Force
|
||||
```
|
||||
|
||||
## Neovide
|
||||
|
||||
Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml`
|
||||
|
||||
```pwsh
|
||||
New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force
|
||||
# Windows dotfiles
|
||||
|
||||
By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix:
|
||||
|
||||
- `%APPDATA%` - `$XDG_CONFIG_HOME` (default: `%USERPROFILE%\AppData\Roaming`)
|
||||
|
||||
|
||||
## 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`.
|
||||
|
||||
It is convenient to use `$PROFILE` to locate the profile file.
|
||||
|
||||
```pwsh
|
||||
Test-Path $PROFILE
|
||||
```
|
||||
|
||||
To link the profile file:
|
||||
|
||||
```pwsh
|
||||
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.
|
||||
|
||||
## `.wslconfig` - WSL Configuration
|
||||
|
||||
`.wslconfig` only supports `~/.wslconfig` as the configuration path
|
||||
|
||||
```pwsh
|
||||
New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force
|
||||
```
|
||||
|
||||
## Windows Terminal
|
||||
|
||||
Use Hard Link to sync Windows Terminal Settings since it doesn't support symlink.
|
||||
|
||||
```pwsh
|
||||
New-Item -ItemType HardLink -Path "$Env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" -Target "$DOTFILES\win\WindowsTerminal.json" -Force
|
||||
```
|
||||
|
||||
## Neovide
|
||||
|
||||
Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml`
|
||||
|
||||
```pwsh
|
||||
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$"'
|
||||
|
|
@ -77,4 +77,4 @@ export VCPKG_ROOT=~/vcpkg
|
|||
alias pac="sudo pacman"
|
||||
alias paci="sudo pacman -S"
|
||||
alias pacr="sudo pacman -R"
|
||||
alias pacu="sudo pacman -Ss"
|
||||
alias pacu="sudo pacman -Ss"
|
||||
|
|
|
|||
40
zsh/.zshenv
40
zsh/.zshenv
|
|
@ -1,20 +1,20 @@
|
|||
# ~/.zshenv
|
||||
# ln -s $DOTFILES/zsh/.zshenv $ZDOTDIR/.zshenv
|
||||
# This file is sourced by all zsh sessions upon startup.
|
||||
|
||||
# Use XDG Base Directory Specification
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||
# Disable shell sessions on macOS when using default terminal
|
||||
SHELL_SESSIONS_DISABLE=1
|
||||
|
||||
# Zsh
|
||||
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
||||
|
||||
# Also put in /etc/zsh/zshenv
|
||||
# or /etc/zshenv in macOS
|
||||
# sudo cp $DOTFILES/zsh/.zshenv /etc/zsh/zshenv
|
||||
# sudo cp $DOTFILES/zsh/.zshenv /etc/zshenv
|
||||
# ~/.zshenv
|
||||
# ln -s $DOTFILES/zsh/.zshenv $ZDOTDIR/.zshenv
|
||||
# This file is sourced by all zsh sessions upon startup.
|
||||
|
||||
# Use XDG Base Directory Specification
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||
# Disable shell sessions on macOS when using default terminal
|
||||
SHELL_SESSIONS_DISABLE=1
|
||||
|
||||
# Zsh
|
||||
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
|
||||
|
||||
# Also put in /etc/zsh/zshenv
|
||||
# or /etc/zshenv in macOS
|
||||
# sudo cp $DOTFILES/zsh/.zshenv /etc/zsh/zshenv
|
||||
# sudo cp $DOTFILES/zsh/.zshenv /etc/zshenv
|
||||
|
|
|
|||
|
|
@ -29,22 +29,22 @@ alias pymkenv="conda create --name"
|
|||
alias v=nvim
|
||||
alias c=code
|
||||
|
||||
# lsd #
|
||||
# lsd #
|
||||
alias ls='lsd -a'
|
||||
alias l='lsd -lah'
|
||||
# Misc #
|
||||
alias cf=cfiles
|
||||
|
||||
# Functions #
|
||||
mcd() {
|
||||
mkcd() {
|
||||
mkdir -p -- "$0" && cd -P -- "$1"
|
||||
}
|
||||
cdls(){
|
||||
cd $1 && ls
|
||||
cd $1 && ls
|
||||
}
|
||||
tc(){
|
||||
touch $1 && code $1
|
||||
}
|
||||
tv(){
|
||||
touch $1 && nvim $1
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ PAGER="less"
|
|||
EDITOR="nvim"
|
||||
VISUAL="nvim"
|
||||
|
||||
# Use XDG Base Directory Specification #
|
||||
# Use XDG Base Directory Specification #
|
||||
|
||||
# ~/.azure/ -> $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_TMP="$XDG_RUNTIME_DIR"/npm
|
||||
fi
|
||||
# ~/.python_history -> $XDG_DATA_HOME/python/history
|
||||
# ~/.python_history -> $XDG_DATA_HOME/python/history
|
||||
# Works only with Python 3.13.0a3 and later
|
||||
export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history
|
||||
# ~/.tldrc/ -> $XDG_CACHE_HOME/tldr
|
||||
|
|
@ -67,4 +67,4 @@ export _Z_DATA="$XDG_DATA_HOME/z"
|
|||
# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump*
|
||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||
# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history
|
||||
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
||||
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
# $DOTFILES/keymap.zsh
|
||||
bindkey -v # Vi Keybindings
|
||||
|
||||
# Colemak hnei
|
||||
# bindkey -M vicmd 'h' vi-backward-char # No change
|
||||
bindkey -M vicmd 'n' down-line-or-history
|
||||
bindkey -M vicmd 'e' up-line-or-history
|
||||
bindkey -M vicmd 'i' vi-forward-char
|
||||
|
||||
# Similar position to [i] in QWERTY
|
||||
bindkey -M vicmd 'l' vi-insert
|
||||
bindkey -M vicmd 'L' vi-insert-bol
|
||||
# Ne{[k]s}t
|
||||
bindkey -M vicmd 'k' vi-repeat-search
|
||||
bindkey -M vicmd 'K' vi-rev-repeat-search
|
||||
# [J]ump
|
||||
bindkey -M vicmd 'j' vi-forward-word-end
|
||||
bindkey -M vicmd 'J' vi-forward-blank-word-end
|
||||
# Use N to Join
|
||||
# $DOTFILES/keymap.zsh
|
||||
bindkey -v # Vi Keybindings
|
||||
|
||||
# Colemak hnei
|
||||
# bindkey -M vicmd 'h' vi-backward-char # No change
|
||||
bindkey -M vicmd 'n' down-line-or-history
|
||||
bindkey -M vicmd 'e' up-line-or-history
|
||||
bindkey -M vicmd 'i' vi-forward-char
|
||||
|
||||
# Similar position to [i] in QWERTY
|
||||
bindkey -M vicmd 'l' vi-insert
|
||||
bindkey -M vicmd 'L' vi-insert-bol
|
||||
# Ne{[k]s}t
|
||||
bindkey -M vicmd 'k' vi-repeat-search
|
||||
bindkey -M vicmd 'K' vi-rev-repeat-search
|
||||
# [J]ump
|
||||
bindkey -M vicmd 'j' vi-forward-word-end
|
||||
bindkey -M vicmd 'J' vi-forward-blank-word-end
|
||||
# Use N to Join
|
||||
bindkey -M vicmd 'N' vi-join
|
||||
16
zsh/navi.zsh
16
zsh/navi.zsh
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
# Relative navigation
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias .....="cd ../../../.."
|
||||
alias ......="cd ../../../../.."
|
||||
|
||||
|
||||
# Relative navigation
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias .....="cd ../../../.."
|
||||
alias ......="cd ../../../../.."
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue