This commit is contained in:
pika 2025-05-11 12:42:45 +02:00
parent 059da9ee0e
commit 7bfea6a9d8
2 changed files with 3 additions and 16 deletions

View file

@ -20,7 +20,7 @@ _help() {
} }
_install_func() { _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() { _check() {

17
.zshrc
View file

@ -640,7 +640,7 @@ __alias__() {
if command_exists zellij; then if command_exists zellij; then
za() { za() {
# local zsession='zellij list-sessions | tail -1 | grep -q EXITED' # 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 --" echo "-- Zellij session active! | Connecting to existing session --"
sleep 0.3 sleep 0.3
zellij attach zellij attach
@ -649,7 +649,7 @@ __alias__() {
sleep 0.3 sleep 0.3
zellij attach zellij attach
else else
echo "-- No Zellij session found! | Creating one --" echo "-- No Zellij session active! | Creating one --"
sleep 0.3 sleep 0.3
zellij zellij
fi fi
@ -666,30 +666,17 @@ _coding_() {
alias h='hugo' alias h='hugo'
alias hs='hugo server -D --noHTTPCache --disableFastRender' # --bind "$(get_ip)"' alias hs='hugo server -D --noHTTPCache --disableFastRender' # --bind "$(get_ip)"'
fi fi
# ─< c stands for bin/cake >──────────────────────────────────────────────────────────────
# alias cake='bin/cake'
# alias c='cake'
# alias cs='c server -p 1313'
# ─< VSCodium >───────────────────────────────────────────────────────────────────────────── # ─< VSCodium >─────────────────────────────────────────────────────────────────────────────
if command_exists codium; then if command_exists codium; then
alias code="codium" alias code="codium"
export EDITOR="codium" export EDITOR="codium"
fi 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 # Function to get the IP address
get_ip() { get_ip() {
ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1 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 # Check if php is available, then create the alias
if command_exists php; then if command_exists php; then
alias phprun="php artisan serve --host=$(get_ip) --port=8000" alias phprun="php artisan serve --host=$(get_ip) --port=8000"