Merge branch 'main' of git.k4li.de:dotfiles/zsh

This commit is contained in:
pika 2024-09-12 19:02:05 +02:00
commit feae8fc82a

21
.zshrc
View file

@ -80,6 +80,7 @@ _init (){
local zconf="$HOME/.zsh"
local zAutosg="$zconf/autosuggestions/zsh-autosuggestions.zsh"
local zSynthl="$zconf/syntax-highlighting/zsh-syntax-highlighting.zsh"
local _pluginlist=("$zAutosg" "$zSynthl")
# ─< init plugis >────────────────────────────────────────────────────────────────────────
@ -91,7 +92,7 @@ _init (){
p_has() {
if ! command_exists has; then
inst_has() {
git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install
git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install && cd $HOME/ && rm -r /tmp/has
}
echo_info "Installing has"
inst_has >/dev/null 2>&1
@ -127,6 +128,7 @@ _alias(){
# ─< linutil >────────────────────────────────────────────────────────────────────────────
alias linutil="curl -fsSL https://christitus.com/linux | sh"
alias linutil-dev="curl -fsSL https://christitus.com/linuxdev | sh"
# ─< telnet (starwars) >────────────────────────────────────────────────────────────────────
if command_exists telnet; then
@ -306,7 +308,7 @@ drweb() {
# ─< g stands for GIT >─────────────────────────────────────────────────────────────────────
if command_exists git; then
alias g="git"
alias gs="git status"
alias gs="git status -sb"
alias gm='git checkout main && git merge'
alias gc="git clone --recurse-submodule"
gcl() {
@ -348,19 +350,18 @@ _coding_() {
alias code="codium"
export EDITOR="codium"
fi
# ─< neovide, the best frontend for any neovim-config >───────────────────────────────────
if [ -d "$HOME/.local/share/neovide/" ]; then
# ─< neovide, the best frontend for any neovim-config >───────────────────────────────────
if command_exists nvim; then
if command_exists neovide; then
alias nvim='neovide --fork'
else
if [ -n "$neovide_path" ]; then
alias nvim="$neovide_path --fork"
if [ -n "$TMUX" ]; then
alias nvim="command nvim"
else
neovide_path=$(find "$HOME/" -name "*neovide*.appimage" 2>/dev/null)
alias nvim="$neovide_path --fork"
alias nvim="neovide --fork"
fi
fi
fi
# Function to get the IP address
get_ip() {
ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1