From 7bfea6a9d8b493cea471f6a8dad635621496258a Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 11 May 2025 12:42:45 +0200 Subject: [PATCH] wip --- .zsh/.installs.zsh | 2 +- .zshrc | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.zsh/.installs.zsh b/.zsh/.installs.zsh index d01cb6a..3a44d75 100644 --- a/.zsh/.installs.zsh +++ b/.zsh/.installs.zsh @@ -20,7 +20,7 @@ _help() { } _install_func() { - curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | sh + curl -fsSL "https://git.k4li.de/scripts/installs/raw/branch/main/${1}.sh" | { bash || sh } } _check() { diff --git a/.zshrc b/.zshrc index dc5e94d..abbdbf2 100644 --- a/.zshrc +++ b/.zshrc @@ -640,7 +640,7 @@ __alias__() { if command_exists zellij; then za() { # local zsession='zellij list-sessions | tail -1 | grep -q EXITED' - if ! zellij list-sessions; then + if ! zellij list-sessions >/dev/null 2>&1; then echo "-- Zellij session active! | Connecting to existing session --" sleep 0.3 zellij attach @@ -649,7 +649,7 @@ __alias__() { sleep 0.3 zellij attach else - echo "-- No Zellij session found! | Creating one --" + echo "-- No Zellij session active! | Creating one --" sleep 0.3 zellij fi @@ -666,30 +666,17 @@ _coding_() { alias h='hugo' alias hs='hugo server -D --noHTTPCache --disableFastRender' # --bind "$(get_ip)"' fi - # ─< c stands for bin/cake >────────────────────────────────────────────────────────────── - # alias cake='bin/cake' - # alias c='cake' - # alias cs='c server -p 1313' # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── if command_exists codium; then alias code="codium" export EDITOR="codium" fi - cursor_exe="/mnt/c/Users/piecka/AppData/Local/Programs/cursor/Cursor.exe" - if [ -e "$cursor_exe" ]; then - alias code="$cursor_exe" - 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 } - if command_exists composer; then - alias laravel_new="composer create-project laravel/laravel" - fi - # Check if php is available, then create the alias if command_exists php; then alias phprun="php artisan serve --host=$(get_ip) --port=8000"