From 9e1bb67ef290606344fa52be521093d5a446efc3 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 22 Jun 2025 11:42:39 +0200 Subject: [PATCH] wip --- .zsh/.aliases.zsh | 2 +- .zshrc | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.zsh/.aliases.zsh b/.zsh/.aliases.zsh index 3cc8cb1..f51271a 100644 --- a/.zsh/.aliases.zsh +++ b/.zsh/.aliases.zsh @@ -665,7 +665,7 @@ main() { # ─< d stands for docker >────────────────────────────────────────────────────────────────── if command_exists docker; then __docker__ - elif command_exists podman-compose; then + elif command_exists podman; then __podman__ else echo_missing "docker | podman" diff --git a/.zshrc b/.zshrc index b8c3585..06d880c 100644 --- a/.zshrc +++ b/.zshrc @@ -295,6 +295,27 @@ __keychain_setup__() { fi } +get-vars() { + local uptime docker shell + + uptime="$(uptime --pretty)" + shell="$SHELL" + + if command_exists docker; then + docker=docker + elif command_exists podman; then + docker=podman + else + docker=none + fi + + printf "uptime: %s\n" "$uptime" + printf "\n" + printf "using: %s\n" "$docker" + printf "\n" + printf "shell: %s\n" "$shell" +} + __end__() { if command_exists fastfetch; then clear && @@ -303,8 +324,9 @@ __end__() { fi if command_exists cowsay; then - alias clear='clear && cowsay -f tux "$(uptime --pretty)"' - cowsay -f tux "$(uptime --pretty)" + alias clear='clear && get-vars | cowsay -f tux' + # cowsay -f tux "$(uptime --pretty)" + get-vars | cowsay -f tux else echo_missing "cowasy" fi