1
0
Fork 0

Fix npx command

main
Ambrose Chua 2024-02-06 16:46:34 +08:00
parent 46695bea7f
commit f4f733537a
No known key found for this signature in database
GPG Key ID: 36C99AADD44C83D2
3 changed files with 27 additions and 13 deletions

View File

@ -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
@ -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

View File

@ -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
@ -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
.zshrc
View File

@ -1,3 +1,4 @@
#zmodload zsh/zprof
# basic settings
@ -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
@ -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"
@ -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"
@ -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"
@ -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;'
@ -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 "
}
@ -639,3 +651,5 @@ if which gpgconf >/dev/null 2>/dev/null; then
echo UPDATESTARTUPTTY | gpg-connect-agent >/dev/null 2>&1
}
fi
#zprof