feat: switch to kitty
This commit is contained in:
27
configs/zsh/functions/conf.zsh
Normal file
27
configs/zsh/functions/conf.zsh
Normal file
@ -0,0 +1,27 @@
|
||||
function conf(){
|
||||
|
||||
if [ "$1" = "u" ]; then
|
||||
source ~/.zshrc
|
||||
else
|
||||
cd ~/.dotfiles/
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
cd configs
|
||||
cd $1
|
||||
fi
|
||||
|
||||
if [[ -f "init.lua" ]]; then
|
||||
nvim init.lua
|
||||
elif [[ -f ".zshrc" ]]; then
|
||||
nvim .zshrc
|
||||
source ~/.zshrc
|
||||
elif [[ -f "config" ]]; then
|
||||
nvim config
|
||||
else
|
||||
nvim .
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
function mke(){
|
||||
mkdir -p $1
|
||||
cd $1
|
||||
}
|
15
configs/zsh/functions/note.zsh
Normal file
15
configs/zsh/functions/note.zsh
Normal file
@ -0,0 +1,15 @@
|
||||
function note(){
|
||||
cd ~/Notes
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
cd $1
|
||||
fi
|
||||
|
||||
if [[ -f "index.md" ]]; then
|
||||
nvim index.md
|
||||
else
|
||||
nvim .
|
||||
fi
|
||||
}
|
||||
|
||||
compctl -/ -W ~/Notes/$@ note
|
@ -1,11 +1,7 @@
|
||||
function run(){
|
||||
HAS_MAKE="$(ls | grep Makefile)"
|
||||
HAS_PACKAGE="$(ls | grep package.json)"
|
||||
|
||||
if [ "$HAS_PACKAGE" != "" ]; then
|
||||
if [[ -f "package.json" ]]; then
|
||||
pnpm $1
|
||||
elif [ "$HAS_MAKE" != "" ]; then
|
||||
elif [[ -f "Makefile" ]]; then
|
||||
make $1
|
||||
fi
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user