updated configs

This commit is contained in:
2024-01-26 10:28:54 +01:00
parent 0d0ec5aedb
commit ba4ec367ab
14 changed files with 395 additions and 106 deletions

View File

@@ -1,12 +1,9 @@
dl ~/Downloads dl ~/Downloads
dotfiles ~/dotfiles dotfiles ~/dotfiles
Downloads ~/Downloads Downloads ~/Downloads
root ~/ root ~
tm ~/Documents/workspace_tm tm ~/Documents/workspace_tm
obc ~/Documents/workspace_tm/obc obc ~/Documents/workspace_tm/obc
private ~/Documents/workspace_private private ~/Documents/workspace_private
tix ~/Documents/workspace_tm/amadeus_api
dropbox ~/Dropbox
active ~/Documents/workspace_active
archive ~/Documents/workspace_archive archive ~/Documents/workspace_archive
active ~/Documents/workspace_active

View File

@@ -1,4 +1,4 @@
{ {
"optOut": false, "optOut": false,
"lastUpdateCheck": 1634293619280 "lastUpdateCheck": 1697703361839
} }

View File

@@ -1,4 +1,10 @@
{ {
"optOut": false, "optOut": false,
"lastUpdateCheck": 1634547408915 "lastUpdateCheck": 1663659196272,
"update": {
"latest": "8.19.2",
"current": "6.14.17",
"type": "major",
"name": "npm"
}
} }

View File

@@ -1,6 +1,10 @@
# setting defualt editor # setting defualt editor
set EDITOR vim set EDITOR vim
# add brew binaried
fish_add_path /opt/homebrew/opt/postgresql@11/bin
fish_add_path /opt/homebrew/bin
# setting PATH for rbenv # setting PATH for rbenv
# set PATH /usr/local/var/rbenv/shims $PATH # set PATH /usr/local/var/rbenv/shims $PATH
status --is-interactive; and source (rbenv init -|psub) status --is-interactive; and source (rbenv init -|psub)
@@ -30,12 +34,16 @@ set -x -U GOPATH $HOME/Documents/workspace_go
# definde Android SDK # definde Android SDK
set -x -U ANDROID_SDK_ROOT $HOME/Library/Android/sdk set -x -U ANDROID_SDK_ROOT $HOME/Library/Android/sdk
set -x -U ANDROID_HOME $HOME/Library/Android/sdk
# set -x -U JAVA_HOME /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home # set -x -U JAVA_HOME /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
# set -x -U JAVA_HOME /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home set -x -U JAVA_HOME /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/
# setting GPG # setting GPG
set GPG_TTY /dev/ttys001 set GPG_TTY /dev/ttys001
# set home
set -q XDG_CONFIG_HOME || set -U XDG_CONFIG_HOME $HOME/.config
# set abbveriations # set abbveriations
if status --is-interactive if status --is-interactive
set -g fish_user_abbreviations set -g fish_user_abbreviations
@@ -78,3 +86,4 @@ set -g fish_user_paths "/usr/local/sbin" $fish_user_paths
# kitty + complete setup fish | source # kitty + complete setup fish | source
set -g fish_user_paths "/usr/local/opt/postgresql@11/bin" $fish_user_paths set -g fish_user_paths "/usr/local/opt/postgresql@11/bin" $fish_user_paths
set -g fish_user_paths "/usr/local/opt/imagemagick@6/bin" $fish_user_paths set -g fish_user_paths "/usr/local/opt/imagemagick@6/bin" $fish_user_paths

View File

@@ -1 +1,3 @@
jorgebucaran/fisher jorgebucaran/fisher
edc/bass
jorgebucaran/nvm.fish

View File

@@ -1,16 +1,18 @@
# This file contains fish universal variable definitions. # This file contains fish universal variable definitions.
# VERSION: 3.0 # VERSION: 3.0
SETUVAR --export ANDROID_SDK_ROOT:/Users/michi/Library/Android/sdk SETUVAR --export ANDROID_HOME:/Users/admin/Library/Android/sdk
SETUVAR --export ANDROID_SDK_ROOT:/Users/admin/Library/Android/sdk
SETUVAR EDITOR:vim SETUVAR EDITOR:vim
SETUVAR --export --path GOPATH:/Users/michi/Documents/workspace_go SETUVAR --export --path GOPATH:/Users/admin/Documents/workspace_go
SETUVAR --export JAVA_HOME:/Library/Internet\x20Plug\x2dIns/JavaAppletPlugin\x2eplugin/Contents/Home SETUVAR --export JAVA_HOME:/Library/Java/JavaVirtualMachines/jdk\x2d11\x2ejdk/Contents/Home/
SETUVAR --export LANG:en_US\x2eUTF\x2d8 SETUVAR --export LANG:en_US\x2eUTF\x2d8
SETUVAR --export LC_ALL:en_US\x2eUTF\x2d8 SETUVAR --export LC_ALL:en_US\x2eUTF\x2d8
SETUVAR XDG_CONFIG_HOME:/Users/admin/\x2econfig
SETUVAR __fish_classic_git_prompt_initialized:\x1d SETUVAR __fish_classic_git_prompt_initialized:\x1d
SETUVAR __fish_init_2_39_8:\x1d SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d SETUVAR __fish_init_3_x:\x1d
SETUVAR __fish_initialized:3100 SETUVAR __fish_initialized:3400
SETUVAR _fish_abbr_bb:brew\x20update\x3b\x20and\x20brew\x20outdated SETUVAR _fish_abbr_bb:brew\x20update\x3b\x20and\x20brew\x20outdated
SETUVAR _fish_abbr_bx:bundle\x20exec SETUVAR _fish_abbr_bx:bundle\x20exec
SETUVAR _fish_abbr_bxrc:bundle\x20exec\x20rails\x20c SETUVAR _fish_abbr_bxrc:bundle\x20exec\x20rails\x20c
@@ -38,8 +40,11 @@ SETUVAR _fish_abbr_pg__stop:pg_ctl\x20\x2dD\x20/usr/local/var/postgresql\x4011\x
SETUVAR _fish_abbr_tix:cd\x20\x7e/Documents/workspace_tm/amadeus_api/ SETUVAR _fish_abbr_tix:cd\x20\x7e/Documents/workspace_tm/amadeus_api/
SETUVAR _fish_abbr_wgo:cd\x20\x7e/Documents/workspace_go/src SETUVAR _fish_abbr_wgo:cd\x20\x7e/Documents/workspace_go/src
SETUVAR _fish_abbr_wtm:cd\x20\x7e/Documents/workspace_tm SETUVAR _fish_abbr_wtm:cd\x20\x7e/Documents/workspace_tm
SETUVAR _fisher_jorgebucaran_2F_fisher_files:/Users/michi/\x2econfig/fish/functions/fisher\x2efish\x1e/Users/michi/\x2econfig/fish/completions/fisher\x2efish SETUVAR _fisher_edc_2F_bass_files:\x7e/\x2econfig/fish/functions/__bass\x2epy\x1e\x7e/\x2econfig/fish/functions/bass\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:\x7e/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_list\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e\x7e/\x2econfig/fish/functions/nvm\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e\x7e/\x2econfig/fish/completions/nvm\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1eedc/bass\x1ejorgebucaran/nvm\x2efish
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR fish_color_autosuggestion:93a1a1 SETUVAR fish_color_autosuggestion:93a1a1
SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:586e75 SETUVAR fish_color_command:586e75
@@ -69,5 +74,8 @@ SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_abbreviations:\x1d SETUVAR fish_user_abbreviations:\x1d
SETUVAR fish_user_paths:/usr/local/opt/postgresql\x409\x2e5/bin\x1e/usr/local/sbin\x1e/Users/michi/\x2efzf/bin SETUVAR fish_user_paths:/opt/homebrew/opt/postgresql\x4011/bin\x1e/usr/local/opt/imagemagick\x406/bin\x1e/usr/local/opt/postgresql\x4011/bin\x1e/usr/local/sbin\x1e/opt/homebrew/bin\x1e/usr/local/opt/postgresql\x409\x2e5/bin\x1e/Users/michi/\x2efzf/bin\x1e/opt/homebrew/opt/fzf/bin\x1e/Users/admin/\x2efzf/bin
SETUVAR nvm_data:/Users/admin/\x2elocal/share/nvm
SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist

View File

@@ -1,6 +1,6 @@
function fisher --argument-names cmd --description "A plugin manager for Fish" function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.3.0 set --local fisher_version 4.4.3
set --local fish_plugins $__fish_config_dir/fish_plugins set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd" switch "$cmd"
@@ -15,6 +15,8 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
echo "Options:" echo "Options:"
echo " -v or --version Print version" echo " -v or --version Print version"
echo " -h or --help Print this help message" echo " -h or --help Print this help message"
echo "Variables:"
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
case ls list case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove case install update remove
@@ -27,17 +29,19 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
set --local old_plugins $_fisher_plugins set --local old_plugins $_fisher_plugins
set --local new_plugins set --local new_plugins
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
if ! set --query argv[2] if ! set --query argv[2]
if test "$cmd" != update if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if test ! -e $fish_plugins else if ! set --query file_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end end
set arg_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins) set arg_plugins $file_plugins
end end
for plugin in $arg_plugins for plugin in $arg_plugins
test -e "$plugin" && set plugin (realpath $plugin) set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
end end
@@ -68,30 +72,39 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
set --local pid_list set --local pid_list
set --local source_plugins set --local source_plugins
set --local fetch_plugins $update_plugins $install_plugins set --local fetch_plugins $update_plugins $install_plugins
set --local fish_path (status fish-path)
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal) echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
for plugin in $fetch_plugins for plugin in $fetch_plugins
set --local source (command mktemp -d) set --local source (command mktemp -d)
set --append source_plugins $source set --append source_plugins $source
command mkdir -p $source/{completions,conf.d,functions} command mkdir -p $source/{completions,conf.d,themes,functions}
fish --command " $fish_path --command "
if test -e $plugin if test -e $plugin
command cp -Rf $plugin/* $source command cp -Rf $plugin/* $source
else else
set temp (command mktemp -d) set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD set repo (string split -- \@ $plugin) || set repo[2] HEAD
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
set name (string split -- / \$path)[-1]
set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
else
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
end
echo Fetching (set_color --underline)\$url(set_color normal) echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent \$url | tar -xzC \$temp -f - 2>/dev/null if curl --silent -L \$url | tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source command cp -Rf \$temp/*/* $source
else else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source command rm -rf $source
end end
command rm -rf \$temp command rm -rf \$temp
end end
@@ -121,31 +134,32 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
emit {$name}_uninstall emit {$name}_uninstall
end end
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
set --erase _fisher_plugins[$index]
end end
command rm -rf $$plugin_files_var command rm -rf (string replace -- \~ ~ $$plugin_files_var)
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var) functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var) for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
complete --erase --command $name complete --erase --command $name
end end
set --erase _fisher_plugins[$index]
set --erase $plugin_files_var set --erase $plugin_files_var
end end
end end
if set --query update_plugins[1] || set --query install_plugins[1] if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,conf.d,completions} command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
end end
for plugin in $update_plugins $install_plugins for plugin in $update_plugins $install_plugins
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set --local files $source/{functions,conf.d,completions}/* set --local files $source/{functions,themes,conf.d,completions}/*
if set --local index (contains --index -- $plugin $install_plugins) if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,conf.d,completions}/* set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
set --local conflict_files set --local conflict_files
for file in (string replace -- $source/ $fisher_path/ $files) for file in (string replace -- $source/ $fisher_path/ $files)
@@ -159,18 +173,19 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
end end
for file in (string replace -- $source/ "" $files) for file in (string replace -- $source/ "" $files)
command cp -Rf $source/$file $fisher_path/$file command cp -RLf $source/$file $fisher_path/$file
end end
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files)
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
contains -- $plugin $install_plugins && set --local event install || set --local event update contains -- $plugin $install_plugins && set --local event install || set --local event update
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var) for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
source $file source $file
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
emit {$name}_$event emit {$name}_$event
@@ -180,12 +195,25 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
command rm -rf $source_plugins command rm -rf $source_plugins
set --query _fisher_plugins[1] || set --erase _fisher_plugins if set --query _fisher_plugins[1]
set --query _fisher_plugins && set --local commit_plugins
printf "%s\n" $_fisher_plugins >$fish_plugins ||
for plugin in $file_plugins
contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
end
for plugin in $_fisher_plugins
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
end
printf "%s\n" $commit_plugins >$fish_plugins
else
set --erase _fisher_plugins
command rm -f $fish_plugins command rm -f $fish_plugins
end
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " ( test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "Installed $total[1]") ( test $total[1] = 0 || echo "Installed $total[1]") (
test $total[2] = 0 || echo "Updated $total[2]") ( test $total[2] = 0 || echo "Updated $total[2]") (
@@ -196,14 +224,17 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
end end
end end
## Migrations ## if ! set --query _fisher_upgraded_to_4_4
function _fisher_fish_postexec --on-event fish_postexec set --universal _fisher_upgraded_to_4_4
if functions --query _fisher_list if functions --query _fisher_list
set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_{list,plugin_parse}
fisher update >/dev/null 2>/dev/null fisher update >/dev/null 2>/dev/null
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share else
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
functions --erase _fisher_list _fisher_plugin_parse set $var (string replace -- ~ \~ $$var)
set --erase fisher_data end
functions --erase _fisher_fish_postexec
end end
functions --erase _fisher_fish_postexec
end end

View File

@@ -1 +1 @@
/Users/michi/.fzf/shell/key-bindings.fish /opt/homebrew/opt/fzf/shell/key-bindings.fish

View File

@@ -1,3 +1,11 @@
function kc --description 'switch context to dev, int or prod' function kc --description 'switch context to dev, int or prod'
kubectl config use-context aks-$argv if test "$argv" = "dev"
kubectl config use-context tm-dev-aks-02
else if test "$argv" = "int"
kubectl config use-context tm-int-aks-02
else if test "$argv" = "prod"
kubectl config use-context tm-prd-aks-02
else
kubectl config use-context aks-prod
end
end end

View File

@@ -1,3 +1,230 @@
function nvm function nvm --description "Node version manager"
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv for silent in --silent -s
if set --local index (contains --index -- $silent $argv)
set --erase argv[$index] && break
end
set --erase silent
end
set --local cmd $argv[1]
set --local ver $argv[2]
if set --query silent && ! set --query cmd[1]
echo "nvm: Version number not specified (see nvm -h for usage)" >&2
return 1
end
if ! set --query ver[1] && contains -- "$cmd" install use
for file in .nvmrc .node-version
set file (_nvm_find_up $PWD $file) && read ver <$file && break
end
if ! set --query ver[1]
echo "nvm: Invalid version or missing \".nvmrc\" file" >&2
return 1
end
end
set --local their_version $ver
switch "$cmd"
case -v --version
echo "nvm, version 2.2.11"
case "" -h --help
echo "Usage: nvm install <version> Download and activate the specified Node version"
echo " nvm install Install version from nearest .nvmrc file"
echo " nvm use <version> Activate a version in the current shell"
echo " nvm use Activate version from nearest .nvmrc file"
echo " nvm list List installed versions"
echo " nvm list-remote List versions available to install"
echo " nvm list-remote <regex> List versions matching a given regular expression"
echo " nvm current Print the currently-active version"
echo " nvm uninstall <version> Uninstall a version"
echo "Options:"
echo " -s or --silent Suppress standard output"
echo " -v or --version Print version"
echo " -h or --help Print this help message"
echo "Variables:"
echo " nvm_arch Override architecture, e.g. x64-musl"
echo " nvm_mirror Use a mirror of the Node binaries"
echo " nvm_default_version Set the default version for new shells"
echo " nvm_default_packages Install a list of packages every time you install a Node version"
case install
_nvm_index_update
string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias
if ! set --query ver[1]
echo "nvm: Invalid version number or alias: \"$their_version\"" >&2
return 1
end
if test ! -e $nvm_data/$ver
set --local os (command uname -s | string lower)
set --local ext tar.gz
set --local arch (command uname -m)
switch $os
case aix
set arch ppc64
case sunos
case linux
case darwin
case {MSYS_NT,MINGW\*_NT}\*
set os win
set ext zip
case \*
echo "nvm: Unsupported operating system: \"$os\"" >&2
return 1
end
switch $arch
case i\*86
set arch x86
case x86_64
set arch x64
case arm64
string match --regex --quiet "v(?<major>\d+)" $ver
if test "$os" = darwin -a $major -lt 16
set arch x64
end
case armv6 armv6l
set arch armv6l
case armv7 armv7l
set arch armv7l
case armv8 armv8l aarch64
set arch arm64
end
set --query nvm_arch && set arch $nvm_arch
set --local dir "node-$ver-$os-$arch"
set --local url $nvm_mirror/$ver/$dir.$ext
command mkdir -p $nvm_data/$ver
if ! set --query silent
echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias"
echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m"
end
if ! command curl $silent --progress-bar --location $url |
command tar --extract --gzip --directory $nvm_data/$ver 2>/dev/null
command rm -rf $nvm_data/$ver
echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2
return 1
end
set --query silent || echo -en "\033[F\33[2K\x1b[0m"
if test "$os" = win
command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin
else
command mv $nvm_data/$ver/$dir/* $nvm_data/$ver
command rm -rf $nvm_data/$ver/$dir
end
end
if test $ver != "$nvm_current_version"
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
_nvm_version_activate $ver
set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages
end
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
case use
test $ver = default && set ver $nvm_default_version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
if ! set --query ver[1]
echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2
return 1
end
if test $ver != "$nvm_current_version"
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
test $ver != system && _nvm_version_activate $ver
end
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
case uninstall
if test -z "$ver"
echo "nvm: Not enough arguments for command: \"$cmd\"" >&2
return 1
end
test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
if ! set -q ver[1]
echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2
return 1
end
set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node")
_nvm_version_deactivate $ver
command rm -rf $nvm_data/$ver
case current
_nvm_current
case ls list
_nvm_list | _nvm_list_format (_nvm_current) $argv[2]
case lsr {ls,list}-remote
_nvm_index_update || return
_nvm_list | command awk '
FILENAME == "-" && (is_local[$1] = FNR == NR) { next } {
print $0 (is_local[$1] ? " ✓" : "")
}
' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2]
case \*
echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2
return 1
end
end
function _nvm_find_up --argument-names path file
test -e "$path/$file" && echo $path/$file || begin
test ! -z "$path" || return
_nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file
end
end
function _nvm_version_match --argument-names ver
string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver |
string replace --filter --regex -- '^v?(\d+)' 'v$1' |
string escape --style=regex ||
string lower '\b'$ver'(?:/\w+)?$'
end
function _nvm_list_format --argument-names current regex
command awk -v current="$current" -v regex="$regex" '
$0 ~ regex {
aliases[versions[i++] = $1] = $2 " " $3
pad = (n = length($1)) > pad ? n : pad
}
END {
if (!i) exit 1
while (i--)
printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n",
versions[i], aliases[versions[i]])
}
'
end
function _nvm_current
command --search --quiet node || return
set --query nvm_current_version && echo $nvm_current_version || echo system
end
function _nvm_node_info
set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm)))
test -f $npm_path/package.json || set --local npm_version_default (command npm --version)
command node --eval "
console.log(process.version)
console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version)
console.log(process.execPath.replace(require('os').homedir(), '~'))
"
end end

View File

@@ -30,3 +30,5 @@
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
[init]
defaultBranch = main

View File

@@ -3,8 +3,8 @@
# some variables # some variables
_fish_shell="/usr/local/bin/fish" _fish_shell="/usr/local/bin/fish"
_homebrew=`which brew` _homebrew=`which brew`
_to_install="the_silver_searcher imagemagick postgresql pgcli rbenv redis ruby-build tmux yasm youtube-dl elixir \ _to_install="the_silver_searcher imagemagick postgresql@11 pgcli rbenv redis ruby-build tmux yasm youtube-dl elixir \
git git-flow vim fish yarn azure-cli lens openssl fzf kubectl" git git-flow vim fish yarn azure-cli openssl fzf kubectl typst"
# Generate symlinks for files # Generate symlinks for files
for i in gemrc gitconfig gitmessage gitignore gvimrc irbrc NERDTreeBookmarks rspec screenrc tmux.conf vimrc rubocop.yml prettierrc for i in gemrc gitconfig gitmessage gitignore gvimrc irbrc NERDTreeBookmarks rspec screenrc tmux.conf vimrc rubocop.yml prettierrc

View File

@@ -1,56 +1,55 @@
{ {
"go.formatTool": "goimports", "go.formatTool": "goimports",
"go.useLanguageServer": true, "go.useLanguageServer": true,
"editor.fontSize": 16, "editor.fontSize": 16,
"editor.fontFamily": "\"cascadia code\"", "editor.fontFamily": "\"cascadia code\"",
"git.autofetch": true, "git.autofetch": true,
"git.autofetchPeriod": 3600, "git.autofetchPeriod": 3600,
"git.autoStash": true, "git.autoStash": true,
"git.enableCommitSigning": true, "git.enableCommitSigning": true,
"ruby.format": "rubocop", "ruby.format": "rubocop",
"ruby.useBundler": true, "ruby.useBundler": true,
"workbench.enableExperiments": false, "workbench.enableExperiments": false,
"update.showReleaseNotes": false, "update.showReleaseNotes": false,
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,
"extensions.ignoreRecommendations": false, "extensions.ignoreRecommendations": false,
"explorer.confirmDragAndDrop": false, "explorer.confirmDragAndDrop": false,
"editor.tabSize": 2, "editor.tabSize": 2,
"javascript.updateImportsOnFileMove.enabled": "always", "javascript.updateImportsOnFileMove.enabled": "always",
"scm.defaultViewMode": "tree", "scm.defaultViewMode": "tree",
"todo-tree.general.tags": [ "typescript.updateImportsOnFileMove.enabled": "always",
"BUG", "workbench.editor.untitled.hint": "hidden",
"HACK", "explorer.confirmDelete": false,
"FIXME", "editor.suggestSelection": "first",
"TODO", "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"XXX", "auto-close-tag.disableOnLanguage": ["typescript"],
"[ ]", "workbench.colorTheme": "One Dark Pro Flat",
"[x]" "editor.fontLigatures": true,
], "window.title": "${activeEditorMedium}${separator}${rootName}",
"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS)", "editor.minimap.enabled": false,
"typescript.updateImportsOnFileMove.enabled": "always", "telemetry.telemetryLevel": "off",
"workbench.editor.untitled.hint": "hidden", "terminal.integrated.defaultProfile.osx": "fish",
"explorer.confirmDelete": false, "workbench.sideBar.location": "right",
"editor.suggestSelection": "first", "prettier.useTabs": true,
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", "editor.scrollBeyondLastLine": false,
"editor.formatOnSave": true, "editor.smoothScrolling": true,
"auto-close-tag.disableOnLanguage": [ "[typescript]": {
"typescript" "editor.defaultFormatter": "vscode.typescript-language-features"
], },
"workbench.colorTheme": "One Dark Pro", "[json]": {
"editor.fontLigatures": true, "editor.defaultFormatter": "vscode.json-language-features"
"window.title": "${activeEditorMedium}${separator}${rootName}", },
"editor.minimap.enabled": false, "[c]": {
"telemetry.telemetryLevel": "off", "editor.formatOnSave": false
"terminal.integrated.defaultProfile.osx": "fish", },
"breadcrumbs.enabled": false, "[ruby]": {
"workbench.sideBar.location": "right", "editor.defaultFormatter": "misogi.ruby-rubocop"
"prettier.useTabs": true, },
"editor.scrollBeyondLastLine": false, "workbench.startupEditor": "none",
"editor.smoothScrolling": true, "editor.formatOnSave": true,
"[typescript]": { "[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "vscode.html-language-features"
}, },
"[json]": { "editor.accessibilitySupport": "off",
"editor.defaultFormatter": "esbenp.prettier-vscode" "npm.keybindingsChangedWarningShown": true
} }
}

2
vimrc
View File

@@ -60,12 +60,12 @@ Plug 'altercation/vim-colors-solarized'
Plug 'pangloss/vim-javascript' Plug 'pangloss/vim-javascript'
Plug 'leafgarland/typescript-vim' Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript' Plug 'peitalin/vim-jsx-typescript'
Plug 'Quramy/vim-js-pretty-template'
" Autocompletion " Autocompletion
Plug 'Shougo/deoplete.nvim' Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp' Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc' Plug 'roxma/vim-hug-neovim-rpc'
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
" Initialize plugin system " Initialize plugin system
call plug#end() call plug#end()