-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
62 lines (50 loc) · 1.82 KB
/
.aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
alias knode="sudo killall -9 node"
alias cpbr="git branch --show-current | pbcopy"
# python
alias python=python3
alias pip=pip3
# flutter
# alias f="fvm flutter"
# certs jun 4 2025
alias srvrunsec="npm run start -- --ssl --ssl-key ~/.serts/localhost-key.pem --ssl-cert ~/.serts/localhost.pem"
alias srvdistsec="npx http-server ~/workspace/mapal/GcWebApp-Angular/dist/apps/compliance-webapp/ --port 4200 --ssl --key ~/.serts/localhost-key.pem --cert ~/.serts/localhost.pem"
# nvim
alias nvim-lazy="NVIM_APPNAME=nvim-lazyvim nvim"
# alias nvim-kick="NVIM_APPNAME=nvim-kickstart nvim"
alias nvim-chad="NVIM_APPNAME=nvim-nvchad nvim"
# alias nvim-astro="NVIM_APPNAME=nvim-astrovim nvim"
nv() {
# select config in lazyvim kickstart nvchad astrovim lunarvim
select config in lazyvim nvchad
do NVIM_APPNAME=nvim-$config nvim $@; break; done
}
nvims() {
# items=("default" "kickstart" "lazyvim" "nvchad" "astrovim" "lunarvim")
items=("lazyvim" "nvchad" "default" )
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=~50% --layout=reverse --border --exit-0)
if [[ -z $config ]]; then
echo "Nothing selected"
return 0
elif [[ $config == "default" ]]; then
config=""
fi
NVIM_APPNAME=nvim-$config nvim $@
}
bindkey -s ^a "nvims\n"
# export NVIM_APPNAME=nvim-nvchad
# yazi cd on quit
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}
# ffmpeg
function ffmp() {
ffmpeg -i "$@" -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -c:a copy "$@".mp4
}
function ffmpx2() {
ffmpeg -i "$@" -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -filter:v "setpts=0.5*PTS" -filter:a "atempo=2.0" -c:a aac -strict experimental "$@".mp4
}