Fewer hard-coded paths.

Disable nvm in bashrc for now.
This commit is contained in:
Sage Vaillancourt 2024-07-21 11:49:28 -04:00
parent 5df78e6c8a
commit d70ce29d7d
4 changed files with 18 additions and 38 deletions

View File

@ -142,6 +142,6 @@ ex ()
source ~/.shell_aliases source ~/.shell_aliases
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
export NVM_DIR="$HOME/.nvm" # export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm # [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

View File

@ -1,31 +0,0 @@
--- STEAMODDED HEADER
--- MOD_NAME: Escape Exit Button
--- MOD_ID: EscapeExitButton
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Add an "Exit" button into the "Escape" menu
----------------------------------------------
------------MOD CODE -------------------------
function G.FUNCS.exit_button(arg_736_0)
G.SETTINGS.paused = true
love.event.quit()
end
local createOptionsRef = create_UIBox_options
function create_UIBox_options()
contents = createOptionsRef()
local exit_button = UIBox_button({
minw = 5,
button = "exit_button",
label = {
"Exit Game"
}
})
table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
return contents
end
----------------------------------------------
------------MOD CODE END----------------------

View File

@ -206,7 +206,11 @@ function wf {
if [[ "$@" != "" ]]; then if [[ "$@" != "" ]]; then
local fzf_args="-q $@" local fzf_args="-q $@"
fi fi
echo ~/wiki/"$(rg --with-filename --no-heading . ~/wiki | sed 's@/home/sage/wiki/@@' | fzf -i $fzf_args -1 --preview='bat ~/wiki/$(echo {} | sed "s/:.*//")' | sed 's/:.*//')" local wiki_dir="$HOME/wiki/"
if [[ "$WIKI_DIR" != "" ]]; then
wiki_dir="$WIKI_DIR"
fi
echo $wiki_dir/"$(rg --with-filename --no-heading . "$wiki_dir" | sed "s@$wiki_dir@@" | fzf -i $fzf_args -1 --preview="bat $wiki_dir/\$(echo {} | sed 's/:.*//')" | sed 's/:.*//')"
} }
function ws { function ws {
@ -217,7 +221,11 @@ function ws {
} }
function ww { function ww {
ws $(rg --no-line-number --no-filename . ~/wiki | sed 's/[^a-zA-Z0-9]\+/\n/g' | grep -v "^$" | sort -f | uniq -ci | sort -hr | fzf -i | cut -c 9-) local wiki_dir="$HOME/wiki/"
if [[ "$WIKI_DIR" != "" ]]; then
wiki_dir="$WIKI_DIR"
fi
ws $(rg --no-line-number --no-filename . "$wiki_dir" | sed 's/[^a-zA-Z0-9]\+/\n/g' | grep -v "^$" | sort -f | uniq -ci | sort -hr | fzf -i | cut -c 9-)
} }
if command -v bat &> /dev/null; then if command -v bat &> /dev/null; then

View File

@ -148,15 +148,18 @@ function merge-hist {
} }
function sync-history { function sync-history {
echo "Downloading shared history..."
if ! scp -P 11275 'sage@sagev.space:~/histfile' "$HOME/.tmp/.histfile"; then if ! scp -P 11275 'sage@sagev.space:~/histfile' "$HOME/.tmp/.histfile"; then
echo "Shared history download failed!"
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile' scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
return return
fi fi
fc -W # Write to history file fc -W # Write to history file
merge-hist "$HOME/.histfile" "$HOME/.tmp/.histfile" > "$HOME/.tmp/$(whoami).histfile" merge-hist "$HOME/.histfile" "$HOME/.tmp/.histfile" > "$HOME/.tmp/$(whoami).histfile"
mv "$HOME/.tmp/$(whoami).histfile" "$HOME/.histfile" mv "$HOME/.tmp/$(whoami).histfile" "$HOME/.histfile"
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
fc -R # Read from new history file fc -R # Read from new history file
echo "Uploading new shared history..."
scp -P 11275 "$HOME/.histfile" 'sage@sagev.space:~/histfile'
} }
function install-extension { function install-extension {
@ -294,7 +297,7 @@ test -f "$HOME/.asdf/asdf.sh" && . "$HOME/.asdf/asdf.sh"
test -f ~/.cargo/env && source ~/.cargo/env test -f ~/.cargo/env && source ~/.cargo/env
# bun completions # bun completions
[ -s "/home/sage/.bun/_bun" ] && source "/home/sage/.bun/_bun" [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# bun # bun
export BUN_INSTALL="$HOME/.bun" export BUN_INSTALL="$HOME/.bun"