Tag: dockerstats

  • Fastfetch + Docker Stats + Welcome on Terminal

    Fastfetch + Docker Stats + Welcome on Terminal

    # 1. Add the Fastfetch PPA
    sudo add-apt-repository ppa:zhangsongcui3371/fastfetch -y
    
    # 2. Update package list
    sudo apt update
    
    # 3. Install / Upgrade to the latest fastfetch
    sudo apt install fastfetch -y
    nano ~/.bashrc
    # =============================================
    # Fastfetch + Syndicate Network
    # =============================================
    
    if [[ $- == *i* ]]; then
        echo
        
        # Fastfetch
        fastfetch --logo ubuntu_small --color-keys blue
        
        # Custom Minimal Banner
        echo -e "\033[1;37m► Syndicate Network ◄\033[0m"
        echo -e "\033[1;36m   Welcome Back!\033[0m"
        echo -e "\033[38;5;239m──────────────────────────────────────────────\033[0m"
        echo
    fi
    # Docker Stats (shows for 8 seconds then returns to prompt)
        echo -e "\033[1;33m→ Docker Container Statistics (live for 8s):\033[0m"
        timeout 8s docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}" 2>/dev/null || echo "No running containers or Docker not available."
        echo
    fi