addet some usefull zsh stuff
This commit is contained in:
parent
07386c11ec
commit
b37fe77053
3 changed files with 32 additions and 21 deletions
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal 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
1
.zsh/autosuggestions
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5
|
46
.zshrc
46
.zshrc
|
@ -56,16 +56,20 @@ setopt autocd notify
|
|||
# End of lines configured by zsh-newuser-install
|
||||
|
||||
_init (){
|
||||
if command_exists oh-my-posh; then
|
||||
if command_exists oh-my-posh; then
|
||||
# eval "$(oh-my-posh init zsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/amro.omp.json')"
|
||||
eval "$(oh-my-posh init zsh --config 'https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/amro.toml')"
|
||||
# eval "$(oh-my-posh init zsh --config '~/gitea/dotfiles/oh-my-posh/amro.toml')"
|
||||
else
|
||||
else
|
||||
curl -s https://ohmyposh.dev/install.sh | sudo bash --norc -s -- -d /usr/bin/
|
||||
fi
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue