Compare commits
3 commits
047480274b
...
7940f6e3dd
Author | SHA1 | Date | |
---|---|---|---|
7940f6e3dd | |||
e950281dd9 | |||
2201bd06f9 |
5 changed files with 19 additions and 30 deletions
20
bin/gradient
20
bin/gradient
|
@ -4,27 +4,13 @@ COLUMNS=$(tput cols)
|
||||||
|
|
||||||
line() {
|
line() {
|
||||||
i=1
|
i=1
|
||||||
while [[ $i -le $COLUMNS ]]; do
|
while [[ $i -le $COLUMNS ]]; do
|
||||||
num=
|
num=
|
||||||
echo -en "\u258$(($RANDOM % 8 + 1))"
|
echo -en "\u258$((RANDOM % 8 + 1))"
|
||||||
i=$(($i + 1))
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# print the text with gradient
|
|
||||||
# awk -v columns=$COLUMNS -v s=$(line) \
|
|
||||||
# 'BEGIN{
|
|
||||||
# for (colnum = 0; colnum<columns+1; colnum++) {
|
|
||||||
# r = 255-(colnum*255/columns);
|
|
||||||
# g = (colnum*510/columns);
|
|
||||||
# b = (colnum*255/columns);
|
|
||||||
# if (g>255) g = 510-g;
|
|
||||||
# printf "\033[48;2;%d;%d;%dm", r,g,b;
|
|
||||||
# printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
|
|
||||||
# printf "%s\033[0m", substr(s,colnum+1,1);
|
|
||||||
# }
|
|
||||||
# printf "\n";
|
|
||||||
# }'
|
|
||||||
awk -v columns=$COLUMNS -v s=$(line) \
|
awk -v columns=$COLUMNS -v s=$(line) \
|
||||||
'BEGIN{
|
'BEGIN{
|
||||||
for (colnum = 0; colnum<columns+1; colnum++) {
|
for (colnum = 0; colnum<columns+1; colnum++) {
|
||||||
|
|
|
@ -90,7 +90,7 @@ install_fzf() {
|
||||||
echo "installing fzf using git"
|
echo "installing fzf using git"
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||||
~/.fzf/install --bin
|
~/.fzf/install --bin
|
||||||
}
|
}
|
||||||
|
|
||||||
install_mambaforge() {
|
install_mambaforge() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ if is-executable lsd; then
|
||||||
alias ls='lsd'
|
alias ls='lsd'
|
||||||
alias lt='lsd --tree --depth=3'
|
alias lt='lsd --tree --depth=3'
|
||||||
else
|
else
|
||||||
alias lt="tree -L 3"
|
alias lt="tree -L 3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
is-executable lazygit && alias lg=lazygit
|
is-executable lazygit && alias lg=lazygit
|
||||||
|
@ -54,3 +54,7 @@ alias zenith="zenith -d 0 -n 0"
|
||||||
|
|
||||||
alias pdm-start='eval "$(pdm shell)"'
|
alias pdm-start='eval "$(pdm shell)"'
|
||||||
|
|
||||||
|
# GNU make
|
||||||
|
alias mkrt='make -C $(git rev-parse --show-toplevel)'
|
||||||
|
alias mk="make"
|
||||||
|
alias mkc="make -C"
|
||||||
|
|
18
lib/env.zsh
18
lib/env.zsh
|
@ -106,20 +106,20 @@ export PATH="$PNPM_HOME:$PATH"
|
||||||
# pnpm end
|
# pnpm end
|
||||||
|
|
||||||
if [ -d "$HOME/.pkgs/google-cloud-sdk" ]; then
|
if [ -d "$HOME/.pkgs/google-cloud-sdk" ]; then
|
||||||
source /home/daylin/.pkgs/google-cloud-sdk/completion.zsh.inc
|
source /home/daylin/.pkgs/google-cloud-sdk/completion.zsh.inc
|
||||||
source /home/daylin/.pkgs/google-cloud-sdk/path.zsh.inc
|
source /home/daylin/.pkgs/google-cloud-sdk/path.zsh.inc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$HOME/.deno" ]; then
|
if [ -d "$HOME/.deno" ]; then
|
||||||
export DENO_INSTALL="/home/daylin/.deno"
|
export DENO_INSTALL="/home/daylin/.deno"
|
||||||
export PATH="$DENO_INSTALL/bin:$PATH"
|
export PATH="$DENO_INSTALL/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$HOME/.bun" ]; then
|
if [ -d "$HOME/.bun" ]; then
|
||||||
# bun completions
|
# bun completions
|
||||||
[ -s "/home/daylin/.bun/_bun" ] && source "/home/daylin/.bun/_bun"
|
[ -s "/home/daylin/.bun/_bun" ] && source "/home/daylin/.bun/_bun"
|
||||||
|
|
||||||
# bun
|
# bun
|
||||||
export BUN_INSTALL="$HOME/.bun"
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
export PATH="$BUN_INSTALL/bin:$PATH"
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -81,6 +81,5 @@ help() {
|
||||||
}
|
}
|
||||||
|
|
||||||
format-qmd() {
|
format-qmd() {
|
||||||
jupytext --from qmd $1 --pipe black
|
jupytext --from qmd $1 --pipe black
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue