diff --git a/.zshrc b/.zshrc index b063baa..4cff911 100644 --- a/.zshrc +++ b/.zshrc @@ -345,19 +345,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