commit cf9d18e9bc77f6d61dd49df768547f285c507ba3 Author: Andrew Gioia Date: Mon Jul 15 21:35:36 2024 -0400 Initial commit after testing new machine setup diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1af14d0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "dotbot"] + path = dotbot + url = https://github.com/anishathalye/dotbot + ignore = dirty diff --git a/dotbot b/dotbot new file mode 160000 index 0000000..7202065 --- /dev/null +++ b/dotbot @@ -0,0 +1 @@ +Subproject commit 720206578a8daf1e7167200e73e314fc4b8af52e diff --git a/editorconfig b/editorconfig new file mode 100644 index 0000000..5b6e115 --- /dev/null +++ b/editorconfig @@ -0,0 +1,19 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +insert_final_newline = false +trim_trailing_whitespace = true + +[*.{json,json5,webmanifest}] +indent_size = 2 + +[*.{yml,yaml}] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/fish/completions/fisher.fish b/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/fish/completions/nvm.fish b/fish/completions/nvm.fish new file mode 100644 index 0000000..c0ab183 --- /dev/null +++ b/fish/completions/nvm.fish @@ -0,0 +1,21 @@ +complete --command nvm --exclusive +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" +complete --command nvm --long silent --description "Suppress standard output" + +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate a version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( + test -e $nvm_data && string split ' ' <$nvm_data/.index +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall a version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( + _nvm_list | string split ' ' | string replace system '' +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( + set --query nvm_default_version && echo default +)" diff --git a/fish/conf.d/nvm.fish b/fish/conf.d/nvm.fish new file mode 100644 index 0000000..8aab50a --- /dev/null +++ b/fish/conf.d/nvm.fish @@ -0,0 +1,28 @@ +function _nvm_install --on-event nvm_install + set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + set --universal nvm_data $XDG_DATA_HOME/nvm + + test ! -d $nvm_data && command mkdir -p $nvm_data + echo "Downloading the Node distribution index..." 2>/dev/null + _nvm_index_update +end + +function _nvm_update --on-event nvm_update + set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist + set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share + set --universal nvm_data $XDG_DATA_HOME/nvm +end + +function _nvm_uninstall --on-event nvm_uninstall + command rm -rf $nvm_data + + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + + set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source + functions --erase (functions --all | string match --entire --regex -- "^_nvm_") +end + +if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version + nvm use --silent $nvm_default_version +end diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..dca3fcc --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,12 @@ +if status is-interactive + # commands to run in interactive sessions can go here + # + + # better file listing + alias ll "ls -lah" + + # set the node version + nvm use latest &> /dev/null +end + +starship init fish | source diff --git a/fish/fish_plugins b/fish/fish_plugins new file mode 100644 index 0000000..9673b42 --- /dev/null +++ b/fish/fish_plugins @@ -0,0 +1,2 @@ +jorgebucaran/fisher +jorgebucaran/nvm.fish diff --git a/fish/fish_variables b/fish/fish_variables new file mode 100644 index 0000000..5ee84d4 --- /dev/null +++ b/fish/fish_variables @@ -0,0 +1,38 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +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\x1ejorgebucaran/nvm\x2efish +SETUVAR _fisher_upgraded_to_4_4:\x1d +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:\x2d\x2dbackground\x3d111 +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_user_paths:/Applications/Sublime\x20Text\x2eapp/Contents/SharedSupport/bin\x1e/usr/local/sbin\x1e/usr/local/bin/sass_embedded +SETUVAR nvm_data:/Users/Andrew/\x2elocal/share/nvm +SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist diff --git a/fish/functions/_nvm_index_update.fish b/fish/functions/_nvm_index_update.fish new file mode 100644 index 0000000..c1bbe28 --- /dev/null +++ b/fish/functions/_nvm_index_update.fish @@ -0,0 +1,20 @@ +function _nvm_index_update + test ! -d $nvm_data && command mkdir -p $nvm_data + + set --local index $nvm_data/.index + + if not command curl --location --silent $nvm_mirror/index.tab >$index.temp + command rm -f $index.temp + echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2 + return 1 + end + + command awk -v OFS=\t ' + /v0.9.12/ { exit } # Unsupported + NR > 1 { + print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "") + } + ' $index.temp >$index + + command rm -f $index.temp +end diff --git a/fish/functions/_nvm_list.fish b/fish/functions/_nvm_list.fish new file mode 100644 index 0000000..fb5ab0e --- /dev/null +++ b/fish/functions/_nvm_list.fish @@ -0,0 +1,11 @@ +function _nvm_list + set --local versions $nvm_data/* + set --query versions[1] && + string match --entire --regex -- (string match --regex -- "v\d.+" $versions | + string escape --style=regex | + string join "|" + ) <$nvm_data/.index + + command --all node | + string match --quiet --invert --regex -- "^$nvm_data" && echo system +end diff --git a/fish/functions/_nvm_version_activate.fish b/fish/functions/_nvm_version_activate.fish new file mode 100644 index 0000000..f7dfef7 --- /dev/null +++ b/fish/functions/_nvm_version_activate.fish @@ -0,0 +1,4 @@ +function _nvm_version_activate --argument-names ver + set --global --export nvm_current_version $ver + set --prepend PATH $nvm_data/$ver/bin +end diff --git a/fish/functions/_nvm_version_deactivate.fish b/fish/functions/_nvm_version_deactivate.fish new file mode 100644 index 0000000..24dd36e --- /dev/null +++ b/fish/functions/_nvm_version_deactivate.fish @@ -0,0 +1,5 @@ +function _nvm_version_deactivate --argument-names ver + test "$nvm_current_version" = "$ver" && set --erase nvm_current_version + set --local index (contains --index -- $nvm_data/$ver/bin $PATH) && + set --erase PATH[$index] +end diff --git a/fish/functions/fisher.fish b/fish/functions/fisher.fish new file mode 100644 index 0000000..c0a86fa --- /dev/null +++ b/fish/functions/fisher.fish @@ -0,0 +1,240 @@ +function fisher --argument-names cmd --description "A plugin manager for Fish" + set --query fisher_path || set --local fisher_path $__fish_config_dir + set --local fisher_version 4.4.3 + set --local fish_plugins $__fish_config_dir/fish_plugins + + switch "$cmd" + case -v --version + echo "fisher, version $fisher_version" + case "" -h --help + echo "Usage: fisher install Install plugins" + echo " fisher remove Remove installed plugins" + echo " fisher update Update installed plugins" + echo " fisher update Update all installed plugins" + echo " fisher list [] List installed plugins matching regex" + echo "Options:" + echo " -v or --version Print version" + 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 + string match --entire --regex -- "$argv[2]" $_fisher_plugins + case install update remove + isatty || read --local --null --array stdin && set --append argv $stdin + + set --local install_plugins + set --local update_plugins + set --local remove_plugins + set --local arg_plugins $argv[2..-1] + set --local old_plugins $_fisher_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 test "$cmd" != update + echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1 + else if ! set --query file_plugins + echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1 + end + set arg_plugins $file_plugins + end + + for plugin in $arg_plugins + set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin) + contains -- "$plugin" $new_plugins || set --append new_plugins $plugin + end + + if set --query argv[2] + for plugin in $new_plugins + if contains -- "$plugin" $old_plugins + test "$cmd" = remove && + set --append remove_plugins $plugin || + set --append update_plugins $plugin + else if test "$cmd" = install + set --append install_plugins $plugin + else + echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1 + end + end + else + for plugin in $new_plugins + contains -- "$plugin" $old_plugins && + set --append update_plugins $plugin || + set --append install_plugins $plugin + end + + for plugin in $old_plugins + contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin + end + end + + set --local pid_list + set --local source_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) + + for plugin in $fetch_plugins + set --local source (command mktemp -d) + set --append source_plugins $source + + command mkdir -p $source/{completions,conf.d,themes,functions} + + $fish_path --command " + if test -e $plugin + command cp -Rf $plugin/* $source + else + set temp (command mktemp -d) + set repo (string split -- \@ $plugin) || set repo[2] HEAD + + 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) + + if curl --silent -L \$url | tar -xzC \$temp -f - 2>/dev/null + command cp -Rf \$temp/*/* $source + else + echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2 + command rm -rf $source + end + + command rm -rf \$temp + end + + set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files + " & + + set --append pid_list (jobs --last --pid) + end + + wait $pid_list 2>/dev/null + + for plugin in $fetch_plugins + if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source + if set --local index (contains --index -- "$plugin" $install_plugins) + set --erase install_plugins[$index] + else + set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)] + end + end + end + + for plugin in $update_plugins $remove_plugins + if set --local index (contains --index -- "$plugin" $_fisher_plugins) + set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files + + if contains -- "$plugin" $remove_plugins + for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var) + emit {$name}_uninstall + end + printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~ + set --erase _fisher_plugins[$index] + end + + command rm -rf (string replace -- \~ ~ $$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) + complete --erase --command $name + end + + set --erase $plugin_files_var + end + end + + if set --query update_plugins[1] || set --query install_plugins[1] + command mkdir -p $fisher_path/{functions,themes,conf.d,completions} + end + + for plugin in $update_plugins $install_plugins + set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] + set --local files $source/{functions,themes,conf.d,completions}/* + + if set --local index (contains --index -- $plugin $install_plugins) + set --local user_files $fisher_path/{functions,themes,conf.d,completions}/* + set --local conflict_files + + for file in (string replace -- $source/ $fisher_path/ $files) + contains -- $file $user_files && set --append conflict_files $file + end + + if set --query conflict_files[1] && set --erase install_plugins[$index] + echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2 + continue + end + end + + for file in (string replace -- $source/ "" $files) + command cp -RLf $source/$file $fisher_path/$file + end + + 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 | string replace -- ~ \~) + + contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin + 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 | string replace -- \~ ~ + + for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~) + source $file + if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file) + emit {$name}_$event + end + end + end + + command rm -rf $source_plugins + + if set --query _fisher_plugins[1] + set --local commit_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 + end + + set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins) + + test "$total" != "0 0 0" && echo (string join ", " ( + test $total[1] = 0 || echo "Installed $total[1]") ( + test $total[2] = 0 || echo "Updated $total[2]") ( + test $total[3] = 0 || echo "Removed $total[3]") + ) plugin/s + case \* + echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1 + end +end + +if ! set --query _fisher_upgraded_to_4_4 + set --universal _fisher_upgraded_to_4_4 + 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 + else + for var in (set --names | string match --entire --regex '^_fisher_.+_files$') + set $var (string replace -- ~ \~ $$var) + end + functions --erase _fisher_fish_postexec + end +end diff --git a/fish/functions/flushdns.fish b/fish/functions/flushdns.fish new file mode 100644 index 0000000..ea34881 --- /dev/null +++ b/fish/functions/flushdns.fish @@ -0,0 +1,3 @@ +function flushdns -d "Flush local DNS cache" + sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder +end diff --git a/fish/functions/ip.fish b/fish/functions/ip.fish new file mode 100644 index 0000000..01d9f56 --- /dev/null +++ b/fish/functions/ip.fish @@ -0,0 +1,3 @@ +function ip -d "Get public IP address" + curl https://ipinfo.io/ip +end diff --git a/fish/functions/nvm.fish b/fish/functions/nvm.fish new file mode 100644 index 0000000..131a030 --- /dev/null +++ b/fish/functions/nvm.fish @@ -0,0 +1,230 @@ +function nvm --description "Node version manager" + 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 Download and activate the specified Node version" + echo " nvm install Install version from nearest .nvmrc file" + echo " nvm use 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 List versions matching a given regular expression" + echo " nvm current Print the currently-active version" + echo " nvm uninstall 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(?\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 diff --git a/fish/functions/p.fish b/fish/functions/p.fish new file mode 100644 index 0000000..715f2a3 --- /dev/null +++ b/fish/functions/p.fish @@ -0,0 +1,3 @@ +function p -d "Move to the Projects directory" + cd ~/Projects +end diff --git a/fish/functions/rt.fish b/fish/functions/rt.fish new file mode 100644 index 0000000..9112dcc --- /dev/null +++ b/fish/functions/rt.fish @@ -0,0 +1,7 @@ +function rt -d "Check a URL's response time" + if count $argv > /dev/null + curl -s -w 'URL response time for: %{url_effective}\n\nLookup time:\t\t%{time_namelookup}\nConnect time:\t\t%{time_connect}\nPre-transfer time:\t%{time_pretransfer}\nStart-transfer time:\t%{time_starttransfer}\n\nTotal time:\t\t%{time_total}\n' -o /dev/null $argv + else + echo "You need to pass in a URL" + end +end diff --git a/fonts/berkeley-mono/BerkeleyMono-Bold.otf b/fonts/berkeley-mono/BerkeleyMono-Bold.otf new file mode 100644 index 0000000..7f58b9b Binary files /dev/null and b/fonts/berkeley-mono/BerkeleyMono-Bold.otf differ diff --git a/fonts/berkeley-mono/BerkeleyMono-BoldItalic.otf b/fonts/berkeley-mono/BerkeleyMono-BoldItalic.otf new file mode 100644 index 0000000..a74a61b Binary files /dev/null and b/fonts/berkeley-mono/BerkeleyMono-BoldItalic.otf differ diff --git a/fonts/berkeley-mono/BerkeleyMono-Italic.otf b/fonts/berkeley-mono/BerkeleyMono-Italic.otf new file mode 100644 index 0000000..d929b00 Binary files /dev/null and b/fonts/berkeley-mono/BerkeleyMono-Italic.otf differ diff --git a/fonts/berkeley-mono/BerkeleyMono-Regular.otf b/fonts/berkeley-mono/BerkeleyMono-Regular.otf new file mode 100644 index 0000000..ac2de11 Binary files /dev/null and b/fonts/berkeley-mono/BerkeleyMono-Regular.otf differ diff --git a/fonts/berkeley-mono/BerkeleyMonoVariable-Italic.ttf b/fonts/berkeley-mono/BerkeleyMonoVariable-Italic.ttf new file mode 100644 index 0000000..04a2b0a Binary files /dev/null and b/fonts/berkeley-mono/BerkeleyMonoVariable-Italic.ttf differ diff --git a/fonts/berkeley-mono/BerkeleyMonoVariable-Regular.ttf b/fonts/berkeley-mono/BerkeleyMonoVariable-Regular.ttf new file mode 100644 index 0000000..2a22ee5 Binary files /dev/null and b/fonts/berkeley-mono/BerkeleyMonoVariable-Regular.ttf differ diff --git a/git/gitconfig b/git/gitconfig new file mode 100644 index 0000000..81e74ca --- /dev/null +++ b/git/gitconfig @@ -0,0 +1,37 @@ +[user] + email = andrew@gioia.email + name = Andrew Gioia +[core] + editor = subl -n -w + excludesfile = /Users/andrew/.config/git/ignore +[color] + ui = true +[diff] + tool = smerge +[difftool] + prompt = true +[difftool "smerge"] + trustExitCode = true + cmd = smerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" +[merge] + tool = smerge +[mergetool] + prompt = true +[mergetool "smerge"] + trustExitCode = true + cmd = smerge mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\" +[credential] + helper = osxkeychain +[credential "https://github.com"] + username = andrewgioia +#[gpg] +# program = gpg2 +[commit] + gpgsign = true +[pull] + rebase = false +[filter "lfs"] + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f diff --git a/git/gitignore b/git/gitignore new file mode 100644 index 0000000..3a4ed89 --- /dev/null +++ b/git/gitignore @@ -0,0 +1,12 @@ +# mac cruft +.DS_Store +._* +.Spotlight-V100 +.Trashes + +# windows cruft +Thumbs.db +Desktop.ini + +# tooling +node_modules diff --git a/install b/install new file mode 100755 index 0000000..5a7e72c --- /dev/null +++ b/install @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -e + +CONFIG="install.conf.yaml" +DOTBOT_DIR="dotbot" + +DOTBOT_BIN="bin/dotbot" +BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +cd "${BASEDIR}" +git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive +git submodule update --init --recursive "${DOTBOT_DIR}" + +"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" diff --git a/install.conf.yaml b/install.conf.yaml new file mode 100644 index 0000000..c1c645b --- /dev/null +++ b/install.conf.yaml @@ -0,0 +1,61 @@ +- clean: ['~'] + +- defaults: + link: + create: true + force: true + relink: true + +- link: + # core + ~/.ssh/config: + path: ssh/config.skyshaper + create: true + if: 'hostname -f | grep skyshaper > /dev/null' + ~/.ssh/config: + path: ssh/config.mirari + create: true + if: 'hostname -f | grep mirari > /dev/null' + + # work + ~/.config/git/config: git/gitconfig + ~/.config/git/ignore: git/gitignore + ~/.editorconfig: editorconfig + ~/.npmrc: npm/npmrc + + # fish shell config files + ~/.config/fish/config.fish: fish/config.fish + ~/.config/fish/fish_plugins: fish/fish_plugins + ~/.config/fish/fish_variables: fish/fish_variables + ~/.config/fish/conf.d: + path: fish/conf.d/*.fish + glob: true + ~/.config/fish/functions: + path: fish/functions/*.fish + glob: true + ~/.config/fish/completions: + path: fish/completions/*.fish + glob: true + + # other shell + ~/.config/starship.toml: starship/starship.toml + + # apps + ~/Library/Application Support/Sublime Text/Packages/User: + path: sublimetext/User/* + glob: true + ~/.config/karabiner/karabiner.json: + path: karabiner/karabiner.json + if: "uname -s | grep --quiet --ignore-case darwin" + +- create: + - ~/.env + - ~/Projects/Design + - ~/Projects/Games + - ~/Projects/Local + - ~/Projects/Web/Source + - ~/Projects/Web/Assets + +- shell: + - command: ./scripts/post.sh + stderr: true diff --git a/iterm/mirari.json b/iterm/mirari.json new file mode 100644 index 0000000..301a07e --- /dev/null +++ b/iterm/mirari.json @@ -0,0 +1,406 @@ +{ + "Ansi 3 Color" : { + "Red Component" : 0.95294123888015747, + "Color Space" : "sRGB", + "Blue Component" : 0.61568623781204224, + "Alpha Component" : 1, + "Green Component" : 0.97647064924240112 + }, + "Tags" : [ + + ], + "Ansi 12 Color" : { + "Red Component" : 0.3411764705882353, + "Color Space" : "sRGB", + "Blue Component" : 0.99607843137254903, + "Alpha Component" : 1, + "Green Component" : 0.7803921568627451 + }, + "Ansi 7 Color" : { + "Red Component" : 0.94509810209274292, + "Color Space" : "sRGB", + "Blue Component" : 0.94117647409439087, + "Alpha Component" : 1, + "Green Component" : 0.94509810209274292 + }, + "Ansi 8 Color" : { + "Red Component" : 0.40784323215484619, + "Color Space" : "sRGB", + "Blue Component" : 0.40784311294555664, + "Alpha Component" : 1, + "Green Component" : 0.40784311294555664 + }, + "Bold Color" : { + "Red Component" : 0.97102361917495728, + "Color Space" : "sRGB", + "Blue Component" : 0.97102349996566772, + "Alpha Component" : 1, + "Green Component" : 0.97102349996566772 + }, + "Ansi 9 Color" : { + "Red Component" : 1, + "Color Space" : "sRGB", + "Blue Component" : 0.34117639064788818, + "Alpha Component" : 1, + "Green Component" : 0.36078426241874695 + }, + "Horizontal Spacing" : 1, + "Right Option Key Sends" : 0, + "Rows" : 25, + "Default Bookmark" : "No", + "Cursor Guide Color" : { + "Red Component" : 0.70213186740875244, + "Color Space" : "sRGB", + "Blue Component" : 1, + "Alpha Component" : 0.25, + "Green Component" : 0.9268307089805603 + }, + "Non-ASCII Anti Aliased" : true, + "Use Bright Bold" : true, + "Ansi 10 Color" : { + "Red Component" : 0.35294127464294434, + "Color Space" : "sRGB", + "Blue Component" : 0.55686265230178833, + "Alpha Component" : 1, + "Green Component" : 0.96862751245498657 + }, + "Ambiguous Double Width" : false, + "Jobs to Ignore" : [ + "rlogin", + "ssh", + "slogin", + "telnet" + ], + "Ansi 15 Color" : { + "Red Component" : 0.94509810209274292, + "Color Space" : "sRGB", + "Blue Component" : 0.94117647409439087, + "Alpha Component" : 1, + "Green Component" : 0.94509810209274292 + }, + "Foreground Color" : { + "Red Component" : 0.93725490570068359, + "Color Space" : "sRGB", + "Blue Component" : 0.92156857252120972, + "Alpha Component" : 1, + "Green Component" : 0.94117647409439087 + }, + "Working Directory" : "\/Users\/Andrew", + "Blinking Cursor" : false, + "Disable Window Resizing" : true, + "Sync Title" : false, + "Prompt Before Closing 2" : false, + "BM Growl" : true, + "Command" : "", + "Description" : "Default", + "Mouse Reporting" : true, + "Screen" : -1, + "Selection Color" : { + "Red Component" : 0.57319694757461548, + "Color Space" : "sRGB", + "Blue Component" : 0.81719964742660522, + "Alpha Component" : 1, + "Green Component" : 0.73586553335189819 + }, + "Columns" : 80, + "Idle Code" : 0, + "Ansi 13 Color" : { + "Red Component" : 1, + "Color Space" : "sRGB", + "Blue Component" : 0.75686269998550415, + "Alpha Component" : 1, + "Green Component" : 0.4156862199306488 + }, + "Custom Command" : "No", + "ASCII Anti Aliased" : true, + "Non Ascii Font" : "Monaco 12", + "Vertical Spacing" : 1, + "Use Bold Font" : true, + "Option Key Sends" : 0, + "Selected Text Color" : { + "Red Component" : 0, + "Color Space" : "sRGB", + "Blue Component" : 0, + "Alpha Component" : 1, + "Green Component" : 0 + }, + "Background Color" : { + "Red Component" : 0.066666666666666666, + "Color Space" : "sRGB", + "Blue Component" : 0.066666666666666666, + "Alpha Component" : 1, + "Green Component" : 0.066666666666666666 + }, + "Character Encoding" : 4, + "Ansi 11 Color" : { + "Red Component" : 0.95294123888015747, + "Color Space" : "sRGB", + "Blue Component" : 0.61568623781204224, + "Alpha Component" : 1, + "Green Component" : 0.97647064924240112 + }, + "Use Italic Font" : true, + "Unlimited Scrollback" : false, + "Keyboard Map" : { + "0xf700-0x260000" : { + "Action" : 10, + "Text" : "[1;6A" + }, + "0x37-0x40000" : { + "Action" : 11, + "Text" : "0x1f" + }, + "0x32-0x40000" : { + "Action" : 11, + "Text" : "0x00" + }, + "0xf709-0x20000" : { + "Action" : 10, + "Text" : "[17;2~" + }, + "0xf70c-0x20000" : { + "Action" : 10, + "Text" : "[20;2~" + }, + "0xf729-0x20000" : { + "Action" : 10, + "Text" : "[1;2H" + }, + "0xf72b-0x40000" : { + "Action" : 10, + "Text" : "[1;5F" + }, + "0xf705-0x20000" : { + "Action" : 10, + "Text" : "[1;2Q" + }, + "0xf703-0x260000" : { + "Action" : 10, + "Text" : "[1;6C" + }, + "0xf700-0x220000" : { + "Action" : 10, + "Text" : "[1;2A" + }, + "0xf701-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x42" + }, + "0x38-0x40000" : { + "Action" : 11, + "Text" : "0x7f" + }, + "0x33-0x40000" : { + "Action" : 11, + "Text" : "0x1b" + }, + "0xf703-0x220000" : { + "Action" : 10, + "Text" : "[1;2C" + }, + "0xf701-0x240000" : { + "Action" : 10, + "Text" : "[1;5B" + }, + "0xf70d-0x20000" : { + "Action" : 10, + "Text" : "[21;2~" + }, + "0xf702-0x260000" : { + "Action" : 10, + "Text" : "[1;6D" + }, + "0xf729-0x40000" : { + "Action" : 10, + "Text" : "[1;5H" + }, + "0xf706-0x20000" : { + "Action" : 10, + "Text" : "[1;2R" + }, + "0x34-0x40000" : { + "Action" : 11, + "Text" : "0x1c" + }, + "0xf700-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x41" + }, + "0x2d-0x40000" : { + "Action" : 11, + "Text" : "0x1f" + }, + "0xf70e-0x20000" : { + "Action" : 10, + "Text" : "[23;2~" + }, + "0xf702-0x220000" : { + "Action" : 10, + "Text" : "[1;2D" + }, + "0xf703-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x43" + }, + "0xf700-0x240000" : { + "Action" : 10, + "Text" : "[1;5A" + }, + "0xf707-0x20000" : { + "Action" : 10, + "Text" : "[1;2S" + }, + "0xf70a-0x20000" : { + "Action" : 10, + "Text" : "[18;2~" + }, + "0x35-0x40000" : { + "Action" : 11, + "Text" : "0x1d" + }, + "0xf70f-0x20000" : { + "Action" : 10, + "Text" : "[24;2~" + }, + "0xf703-0x240000" : { + "Action" : 10, + "Text" : "[1;5C" + }, + "0xf701-0x260000" : { + "Action" : 10, + "Text" : "[1;6B" + }, + "0xf702-0x280000" : { + "Action" : 11, + "Text" : "0x1b 0x1b 0x5b 0x44" + }, + "0xf72b-0x20000" : { + "Action" : 10, + "Text" : "[1;2F" + }, + "0x36-0x40000" : { + "Action" : 11, + "Text" : "0x1e" + }, + "0xf708-0x20000" : { + "Action" : 10, + "Text" : "[15;2~" + }, + "0xf701-0x220000" : { + "Action" : 10, + "Text" : "[1;2B" + }, + "0xf70b-0x20000" : { + "Action" : 10, + "Text" : "[19;2~" + }, + "0xf702-0x240000" : { + "Action" : 10, + "Text" : "[1;5D" + }, + "0xf704-0x20000" : { + "Action" : 10, + "Text" : "[1;2P" + } + }, + "Window Type" : 0, + "Blur Radius" : 6.0697731598984763, + "Cursor Boost" : 0, + "Background Image Location" : "", + "Blur" : true, + "Badge Color" : { + "Red Component" : 1, + "Color Space" : "sRGB", + "Blue Component" : 0, + "Alpha Component" : 0.5, + "Green Component" : 0.1491314172744751 + }, + "Scrollback Lines" : 1000, + "Send Code When Idle" : false, + "Close Sessions On End" : true, + "Terminal Type" : "xterm-256color", + "Visual Bell" : true, + "Flashing Bell" : false, + "Silence Bell" : false, + "Unicode Normalization" : 0, + "Ansi 14 Color" : { + "Red Component" : 0.60392171144485474, + "Color Space" : "sRGB", + "Blue Component" : 0.99607843160629272, + "Alpha Component" : 1, + "Green Component" : 0.92941170930862427 + }, + "Unicode Version" : 9, + "ASCII Ligatures" : false, + "Name" : "Mirari", + "Cursor Text Color" : { + "Red Component" : 0.15686270594596863, + "Color Space" : "sRGB", + "Blue Component" : 0.21176469326019287, + "Alpha Component" : 1, + "Green Component" : 0.16470584273338318 + }, + "Minimum Contrast" : 0.10049715909090909, + "Shortcut" : "", + "Cursor Color" : { + "Red Component" : 0.91646724939346313, + "Color Space" : "sRGB", + "Blue Component" : 0.91647690534591675, + "Alpha Component" : 1, + "Green Component" : 0.91648870706558228 + }, + "Ansi 0 Color" : { + "Red Component" : 0.54074397264048457, + "Color Space" : "sRGB", + "Blue Component" : 0.55346126328673095, + "Alpha Component" : 1, + "Green Component" : 0.563934326171875 + }, + "Ansi 1 Color" : { + "Red Component" : 1, + "Color Space" : "sRGB", + "Blue Component" : 0.34117639064788818, + "Alpha Component" : 1, + "Green Component" : 0.36078426241874695 + }, + "Ansi 2 Color" : { + "Red Component" : 0.35294117647058826, + "Color Space" : "sRGB", + "Blue Component" : 0.55294117647058827, + "Alpha Component" : 1, + "Green Component" : 0.96862745098039216 + }, + "Custom Directory" : "No", + "Ansi 4 Color" : { + "Red Component" : 0.3411764705882353, + "Color Space" : "sRGB", + "Blue Component" : 0.99607843137254903, + "Alpha Component" : 1, + "Green Component" : 0.7803921568627451 + }, + "Ansi 5 Color" : { + "Red Component" : 1, + "Color Space" : "sRGB", + "Blue Component" : 0.75686269998550415, + "Alpha Component" : 1, + "Green Component" : 0.4156862199306488 + }, + "Use Non-ASCII Font" : false, + "Ansi 6 Color" : { + "Red Component" : 0.60392171144485474, + "Color Space" : "sRGB", + "Blue Component" : 0.99607843160629272, + "Alpha Component" : 1, + "Green Component" : 0.92941170930862427 + }, + "Normal Font" : "BerkeleyMono-Regular 14", + "Link Color" : { + "Red Component" : 0.29264676570892334, + "Color Space" : "sRGB", + "Blue Component" : 0.85775750875473022, + "Alpha Component" : 1, + "Green Component" : 0.66938728094100952 + }, + "Transparency" : 0.069152522208121819, + "Guid" : "E7A382B1-6A8B-4321-AB69-BD7A81688A57" +} \ No newline at end of file diff --git a/karabiner/karabiner.json b/karabiner/karabiner.json new file mode 100644 index 0000000..1711b1e --- /dev/null +++ b/karabiner/karabiner.json @@ -0,0 +1,387 @@ +{ + "global": { + "check_for_updates_on_startup": true, + "show_in_menu_bar": true, + "show_profile_name_in_menu_bar": false + }, + "profiles": [ + { + "complex_modifications": { + "parameters": { + "basic.simultaneous_threshold_milliseconds": 50, + "basic.to_delayed_action_delay_milliseconds": 500, + "basic.to_if_alone_timeout_milliseconds": 1000, + "basic.to_if_held_down_threshold_milliseconds": 500, + "mouse_motion_to_scroll.speed": 100 + }, + "rules": [] + }, + "devices": [], + "fn_function_keys": [ + { + "from": { + "key_code": "f1" + }, + "to": [ + { + "consumer_key_code": "display_brightness_decrement" + } + ] + }, + { + "from": { + "key_code": "f2" + }, + "to": [ + { + "consumer_key_code": "display_brightness_increment" + } + ] + }, + { + "from": { + "key_code": "f3" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "mission_control" + } + ] + }, + { + "from": { + "key_code": "f4" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "spotlight" + } + ] + }, + { + "from": { + "key_code": "f5" + }, + "to": [ + { + "consumer_key_code": "dictation" + } + ] + }, + { + "from": { + "key_code": "f6" + }, + "to": [ + { + "key_code": "f6" + } + ] + }, + { + "from": { + "key_code": "f7" + }, + "to": [ + { + "consumer_key_code": "rewind" + } + ] + }, + { + "from": { + "key_code": "f8" + }, + "to": [ + { + "consumer_key_code": "play_or_pause" + } + ] + }, + { + "from": { + "key_code": "f9" + }, + "to": [ + { + "consumer_key_code": "fast_forward" + } + ] + }, + { + "from": { + "key_code": "f10" + }, + "to": [ + { + "consumer_key_code": "mute" + } + ] + }, + { + "from": { + "key_code": "f11" + }, + "to": [ + { + "consumer_key_code": "volume_decrement" + } + ] + }, + { + "from": { + "key_code": "f12" + }, + "to": [ + { + "consumer_key_code": "volume_increment" + } + ] + } + ], + "name": "Default (Laptop)", + "parameters": { + "delay_milliseconds_before_open_device": 1000 + }, + "selected": false, + "simple_modifications": [], + "virtual_hid_keyboard": { + "country_code": 0, + "indicate_sticky_modifier_keys_state": true, + "mouse_key_xy_scale": 100 + } + }, + { + "complex_modifications": { + "parameters": { + "basic.simultaneous_threshold_milliseconds": 50, + "basic.to_delayed_action_delay_milliseconds": 500, + "basic.to_if_alone_timeout_milliseconds": 1000, + "basic.to_if_held_down_threshold_milliseconds": 500, + "mouse_motion_to_scroll.speed": 100 + }, + "rules": [] + }, + "devices": [ + { + "disable_built_in_keyboard_if_exists": false, + "fn_function_keys": [ + { + "from": { + "key_code": "f1" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "brightness_down" + } + ] + }, + { + "from": { + "key_code": "f2" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "brightness_up" + } + ] + }, + { + "from": { + "key_code": "f3" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "mission_control" + } + ] + }, + { + "from": { + "key_code": "f4" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "spotlight" + } + ] + }, + { + "from": { + "key_code": "f5" + }, + "to": [ + { + "apple_vendor_top_case_key_code": "illumination_down" + } + ] + }, + { + "from": { + "key_code": "f6" + }, + "to": [ + { + "apple_vendor_top_case_key_code": "illumination_up" + } + ] + } + ], + "identifiers": { + "is_keyboard": true, + "is_pointing_device": false, + "product_id": 256, + "vendor_id": 13364 + }, + "ignore": false, + "manipulate_caps_lock_led": true, + "simple_modifications": [] + } + ], + "fn_function_keys": [ + { + "from": { + "key_code": "f1" + }, + "to": [ + { + "consumer_key_code": "display_brightness_decrement" + } + ] + }, + { + "from": { + "key_code": "f2" + }, + "to": [ + { + "consumer_key_code": "display_brightness_increment" + } + ] + }, + { + "from": { + "key_code": "f3" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "mission_control" + } + ] + }, + { + "from": { + "key_code": "f4" + }, + "to": [ + { + "apple_vendor_keyboard_key_code": "spotlight" + } + ] + }, + { + "from": { + "key_code": "f5" + }, + "to": [ + { + "apple_vendor_top_case_key_code": "illumination_down" + } + ] + }, + { + "from": { + "key_code": "f6" + }, + "to": [ + { + "apple_vendor_top_case_key_code": "illumination_up" + } + ] + }, + { + "from": { + "key_code": "f7" + }, + "to": [ + { + "consumer_key_code": "rewind" + } + ] + }, + { + "from": { + "key_code": "f8" + }, + "to": [ + { + "consumer_key_code": "play_or_pause" + } + ] + }, + { + "from": { + "key_code": "f9" + }, + "to": [ + { + "consumer_key_code": "fast_forward" + } + ] + }, + { + "from": { + "key_code": "f10" + }, + "to": [ + { + "consumer_key_code": "mute" + } + ] + }, + { + "from": { + "key_code": "f11" + }, + "to": [ + { + "consumer_key_code": "volume_decrement" + } + ] + }, + { + "from": { + "key_code": "f12" + }, + "to": [ + { + "consumer_key_code": "volume_increment" + } + ] + } + ], + "name": "External Keyboard", + "parameters": { + "delay_milliseconds_before_open_device": 1000 + }, + "selected": true, + "simple_modifications": [ + { + "from": { + "key_code": "left_option" + }, + "to": [ + { + "key_code": "left_command" + } + ] + } + ], + "virtual_hid_keyboard": { + "country_code": 0, + "indicate_sticky_modifier_keys_state": true, + "mouse_key_xy_scale": 100 + } + } + ] +} \ No newline at end of file diff --git a/npm/npmrc b/npm/npmrc new file mode 100644 index 0000000..58616ae --- /dev/null +++ b/npm/npmrc @@ -0,0 +1,8 @@ +color=true +init-author-name=Andrew Gioia +init-version=0.0.1 +init-author-email=Andrew@gioia.email +init-license=MIT +init-author-url=https://andrewgioia.com +registry=https://registry.npmjs.org/ +//registry.npmjs.org/:_authToken=${NPM_TOKEN} diff --git a/scripts/post.sh b/scripts/post.sh new file mode 100755 index 0000000..67b8396 --- /dev/null +++ b/scripts/post.sh @@ -0,0 +1,2 @@ +chmod 700 ~/.ssh +chmod 644 ~/.ssh/config diff --git a/ssh/config.mirari b/ssh/config.mirari new file mode 100644 index 0000000..e37c315 --- /dev/null +++ b/ssh/config.mirari @@ -0,0 +1,4 @@ +Host * + AddKeysToAgent yes + UseKeychain yes + IdentityFile ~/.ssh/id_rsa \ No newline at end of file diff --git a/ssh/config.skyshaper b/ssh/config.skyshaper new file mode 100644 index 0000000..cd02a87 --- /dev/null +++ b/ssh/config.skyshaper @@ -0,0 +1,4 @@ +Host * + AddKeysToAgent yes + UseKeychain yes + IdentityFile ~/.ssh/id_ed25519 diff --git a/starship/starship.toml b/starship/starship.toml new file mode 100644 index 0000000..b14e7a8 --- /dev/null +++ b/starship/starship.toml @@ -0,0 +1,47 @@ +command_timeout = 1000 + +[cmd_duration] +style = "yellow" +format = "\\[[$duration]($style)\\]" + +[directory] +style = "white" +format = "[$path]($style)[$read_only]($read_only_style) " + +[git_branch] +symbol = ' ' +style = "purple" + +[git_status] +style = "purple" +modified = '[!](red)' +staged = '[+\($count\)](green)' + +[hostname] +ssh_only = false +format = "[@](black)[$hostname](blue)[:](black)" +trim_at = "." +disabled = false + +[java] +version_format = "${raw}" +format = "[via Java $version](black) " + +[nodejs] +version_format = "${raw}" +format = "[via Node $version](black) " + +[php] +version_format = "${raw}" +format = "[, PHP $version](black) " + +[sudo] +symbol = "🧙 " +disabled = false + +[username] +style_root = "red" +style_user = "cyan" +format = "[$user]($style)" +show_always = true +disabled = false diff --git a/sublimetext/User/.DS_Store b/sublimetext/User/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/sublimetext/User/.DS_Store differ diff --git a/sublimetext/User/Gravity.sublime-theme b/sublimetext/User/Gravity.sublime-theme new file mode 100644 index 0000000..371b9ff --- /dev/null +++ b/sublimetext/User/Gravity.sublime-theme @@ -0,0 +1,29 @@ +// Documentation at https://www.sublimetext.com/docs/themes.html +{ + "variables": + { + "cyan_dark": "rgba(32, 192, 225, 0.8)", + }, + "rules": + [ + // modified files in the folder tree + { + "class": "sidebar_label", + "parents": [{"class": "file_system_entry", "attributes": ["modified"]}], + "color": [155, 237, 254, 0.9] // cyan 90% + //"color": [119, 228, 255, 0.9] // cyan bluer 90% + }, + // modified file badge + { + "class": "vcs_status_badge", + "parents": [{"class": "file_system_entry", "attributes": ["modified"]}], + "layer0.tint": [155, 237, 254, 0.7] // cyan 70% + }, + // adds a cyan option for selected tab + { + "class": "tab_control", + "settings": ["gravity_highlight_color_cyan"], + "attributes": ["selected"], "layer0.tint": "var(cyan_dark)" + }, + ] +} \ No newline at end of file diff --git a/sublimetext/User/One Dark Gravity.sublime-color-scheme b/sublimetext/User/One Dark Gravity.sublime-color-scheme new file mode 100644 index 0000000..1304f51 --- /dev/null +++ b/sublimetext/User/One Dark Gravity.sublime-color-scheme @@ -0,0 +1,42 @@ +// Documentation at https://www.sublimetext.com/docs/color_schemes.html +{ + "variables": + { + "bluegray1": "hsl(240, 2%, 18%)", // interface bg + "bluegray2": "hsl(204, 4%, 23%)", // line number highlight + "bluegray3": "hsl(220, 4%, 28%)", // line highlighting + "bluegray4": "hsl(220, 3%, 40%)", // comments + "bluegray5": "hsl(220, 9%, 75%)", // plaintext + //"pink1": "hsl(357, 61%, 70%)", // html entities + "pink1": "hsl(326, 50%, 67%)", + //"green2": "hsl(150, 37%, 65%)", // json text, css properties + "green1": "hsl(139, 23%, 38%)", // diff added + "green2": "hsl(139, 51%, 65%)", // brighter than above + "purple1": "hsl(287, 60%, 72%)", // bools, operators, hex + "purple2": "hsl(288, 25%, 54%)", // diff error (replaced) + "yellow1": "hsl(54, 63%, 68%)", // css class/id, css values + "yellow3": "hsl(54, 29%, 51%)", // diff modified + "blue2": "hsl(201, 85%, 70%)", + //"blue2": "hsl(190, 100%, 78%)", + "red2": "hsl(2, 46%, 55%)" // diff error + }, + "globals": + { + "line_diff_added": "var(green1)", + "line_diff_modified": "var(yellow3)", + "line_diff_deleted": "var(red2)", + }, + "rules": + [ + // changes opacity on strings + { + "scope": "string", + "foreground": "color(var(green2) alpha(0.95))" + }, + // changes html classes/ids to blue + { + "scope": "entity.other.attribute-name", + "foreground": "var(blue2)" + }, + ] +} diff --git a/sublimetext/User/Preferences.sublime-settings b/sublimetext/User/Preferences.sublime-settings new file mode 100644 index 0000000..96e570e --- /dev/null +++ b/sublimetext/User/Preferences.sublime-settings @@ -0,0 +1,19 @@ +{ + "color_scheme": "One Dark Gravity.sublime-color-scheme", + "font_face": "Berkeley Mono, Menlo, Consolas, DejaVu Sans Mono, monospace", + "font_size": 13, + "gravity_highlight_color_cyan": true, + "gravity_sidebar_header": false, + "gravity_tab_font_small": false, + "gravity_tab_height_short": false, + "gravity_tab_height_tall": false, + "gravity_title_bar": true, + "gravity_org_label_size": false, + "ignored_packages": + [ + "Vintage", + ], + "index_files": false, + "show_git_status": true, + "theme": "Gravity.sublime-theme", +}