addet some usefull zsh stuff

This commit is contained in:
pika 2024-08-20 22:42:50 +02:00
parent 07386c11ec
commit b37fe77053
3 changed files with 32 additions and 21 deletions

4
.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
[submodule ".zsh/autosuggestions"]
path = .zsh/autosuggestions
url = https://github.com/zsh-users/zsh-autosuggestions
branch = master

1
.zsh/autosuggestions Submodule

@ -0,0 +1 @@
Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5

40
.zshrc
View file

@ -66,6 +66,10 @@ fi
if command_exists zoxide; then
eval "$(zoxide init zsh)"
fi
local zconf="$HOME/.zsh"
local zAutosg="$zconf/autosuggestions/zsh-autosuggestions.zsh"
[[ -f "$zAutosg" ]] &&
. $zAutosg
}
_alias(){
@ -101,17 +105,17 @@ _alias(){
alias l="exa --long --no-filesize --no-permissions --no-time --git --colour-scale --icons"
alias ll="exa --all --long --no-filesize --no-permissions --no-time --git --colour-scale --icons"
alias tree="exa --icons -l --tree"
elif command_exists lsd; then
alias ls="lsd -l -1 -h1 --almost-all --git"
alias l="lsd -1"
alias ll="lsd -1 --almost-all"
alias clearl="command clear && l"
alias tree="lsd --tree"
elif command_exists eza; then
alias ls="eza --icons --long --git"
alias l="eza --icons -l"
alias ll="eza --icons -laa"
alias tree="eza --icons -l --tree"
# elif command_exists lsd; then
# alias ls="lsd -l -1 -h1 --almost-all --git"
# alias l="lsd -1"
# alias ll="lsd -1 --almost-all"
# alias clearl="command clear && l"
# alias tree="lsd --tree"
# elif command_exists eza; then
# alias ls="eza --icons --long --git"
# alias l="eza --icons -l"
# alias ll="eza --icons -laa"
# alias tree="eza --icons -l --tree"
else
alias ls="ls --color=always -lAph"
alias l="ls --color=always -lph -w1"
@ -179,8 +183,8 @@ _alias(){
if fastfetch --config os >/dev/null 2>&1; then
alias f="fastfetch --config os"
else
git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1
exec $SHELL
git clone https://git.k4li.de/mirrors/fastfetch.git "$HOME/.local/share/fastfetch" >/dev/null 2>&1
exec "$SHELL"
fi
command clear &
fastfetch
@ -227,9 +231,9 @@ _coding_() {
alias hs='hugo server -D --noHTTPCache --disableFastRender'
fi
# ─< c stands for bin/cake >──────────────────────────────────────────────────────────────
alias cake='bin/cake'
alias c='cake'
alias cs='c server -p 1313'
# alias cake='bin/cake'
# alias c='cake'
# alias cs='c server -p 1313'
# ─< VSCodium >─────────────────────────────────────────────────────────────────────────────
if command_exists codium; then
alias code="codium"
@ -240,9 +244,11 @@ _coding_() {
if command_exists neovide; then
alias nvim='neovide --fork'
else
neovide_path=$(find "$HOME/" -name "*neovide*.appimage" 2>/dev/null)
if [ -n "$neovide_path" ]; then
alias nvim="$neovide_path --fork"
else
neovide_path=$(find "$HOME/" -name "*neovide*.appimage" 2>/dev/null)
alias nvim="$neovide_path --fork"
fi
fi
fi