Skip to content

Commit

Permalink
Fix npx command
Browse files Browse the repository at this point in the history
  • Loading branch information
serverwentdown committed Feb 15, 2024
1 parent 46695be commit f4f7335
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
7 changes: 6 additions & 1 deletion .config/sway/config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term kitty --single-instance -d ~
#set $term kitty --single-instance -d ~
set $term footclient
# Your preferred application launcher
set $menu ~/.local/bin/wofi_run

Expand Down Expand Up @@ -371,6 +372,10 @@ exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CU
#
exec lxpolkit
#
# Start foot server:
#
exec foot --server
#
# Enable mako:
#
exec mako
Expand Down
9 changes: 2 additions & 7 deletions .config/sway/work
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ set $output_primary "Dell Inc. DELL P2319H 7C8XMM2"
set $output_secondary "Dell Inc. DELL P2317H F4VYG7561H1S"
set $output_laptop "Unknown 0x573D 0x00000000"
set $output_tv "Unknown Beyond TV 0x00000100"
set $output_home "Unknown W280 Ultra 0000000000000"
output $output_primary position 1080 0 transform 90
output $output_secondary position 0 0 transform 270
output $output_laptop position 2160 420 transform 0 scale 1
output $output_tv position 4080 320 mode --custom 2560x1440@60Hz
output $output_home position -1680 -512 mode 3840x2160@60Hz scale 1
bindsym $mod+Shift+F4 output $output_primary transform 90 clockwise
bindsym $mod+F4 output $output_primary transform 90 anticlockwise

Expand Down Expand Up @@ -60,11 +62,4 @@ bindsym --locked $mod+F1 output $output_primary enable
bindswitch --reload --locked lid:on output $output_laptop disable
bindswitch --reload --locked lid:off output $output_laptop enable

#
# Apps
#
set $term kitty
#set $term gnome-terminal
bindsym --no-warn $mod+Return exec $term

# vim: ai ts=4 sw=4 et
24 changes: 19 additions & 5 deletions .zshrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#zmodload zsh/zprof

# basic settings

Expand Down Expand Up @@ -99,7 +100,7 @@ export PYENV_ROOT="$HOME/.pyenv"
#[[ -d "$PYENV_ROOT" ]] && setup_pyenv_on_demand
setup_pyenv_on_demand
setup_nvm() {
unfunction nvm node
unfunction nvm npm npx node
source "$NVM_DIR/nvm.sh"
}
nvm_loaded=0
Expand All @@ -111,10 +112,13 @@ setup_nvm_on_demand() {
fi
}
nvm() { setup_nvm_once && nvm "$@" }
npm() { setup_nvm_once && npm "$@" }
npx() { setup_nvm_once && npx "$@" }
node() { setup_nvm_once && node "$@" }
}
export NVM_DIR="$HOME/.nvm"
[[ -d "$NVM_DIR" ]] && setup_nvm_on_demand
[[ -f "$HOME/.nvm-setup-now" ]] && setup_nvm
setup_bun() {
[ -s "/var/home/ambrose/.bun/_bun" ] && source "/var/home/ambrose/.bun/_bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Expand All @@ -132,6 +136,7 @@ which go >/dev/null 2>/dev/null && setup_go
setup_g() {
export PATH="$HOME/go/bin:$PATH" GOPATH="$HOME/go" GOROOT="$HOME/.go" # g-install: do NOT edit, see https://github.com/stefanmaric/g
}
export PATH="$HOME/.rd/bin:$PATH"
[[ -f "$HOME/go/bin/g" ]] && setup_g
setup_rancher_desktop() {
export PATH="$HOME/.rd/bin:$PATH"
Expand Down Expand Up @@ -209,6 +214,10 @@ if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
alias icat="imgcat"
alias ssh="TERM=xterm-256color ssh"
fi
if [[ "$TERM" == "foot" ]] && which foot >/dev/null 2>/dev/null; then
alias icat="img2sixel"
alias ssh="TERM=xterm-256color ssh"
fi
if [[ "$TERM" == "xterm-kitty" ]] && which kitty >/dev/null 2>/dev/null; then
alias icat="kitty +kitten icat"
alias ssh="kitty +kitten ssh"
Expand Down Expand Up @@ -448,10 +457,13 @@ setup_prompt() {
prompt_title_machine=
;;
esac
prompt_fmt_italic=$(tput sitm)
prompt_fmt_reset=$(tput sgr0)
#prompt_fmt_italic=$(tput sitm)
#prompt_fmt_reset=$(tput sgr0)
# For performance, use xterm escape codes
prompt_fmt_italic=$'\E[3m'
prompt_fmt_reset=$'\E[23m'
case "$TERM" in
cygwin|xterm*|putty*|rxvt*|ansi|tmux*)
cygwin|xterm*|putty*|rxvt*|ansi|tmux*|foot)
prompt_fmt_title=$'\e]1;'
prompt_fmt_title_end=$'\a'
prompt_fmt_window=$'\e]2;'
Expand All @@ -478,7 +490,7 @@ setup_prompt() {
prompt_vcs=
;;
esac
prompt_trunc=$'%50<..<'
prompt_trunc=$'%K{'$prompt_color_base02$'}%50<..<%k'
RPROMPT="$prompt_history$prompt_user"
PROMPT="$prompt_title$prompt_vi$prompt_trunc$prompt_vcs$prompt_directory "
}
Expand Down Expand Up @@ -639,3 +651,5 @@ if which gpgconf >/dev/null 2>/dev/null; then
echo UPDATESTARTUPTTY | gpg-connect-agent >/dev/null 2>&1
}
fi

#zprof

0 comments on commit f4f7335

Please sign in to comment.