Add files via upload

This commit is contained in:
kaii :3 (notquitek3t)
2026-03-08 06:59:57 +00:00
committed by GitHub
parent dfc11908a4
commit 9cadcac26b
10 changed files with 604 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
# Pontiac G5 Pi AUX Unit (i dont know wtf to name this thing)
clear
cat <<EOF
██╗ ██╗██████╗ ████████╗██╗ ██╗██╗ ██╗███████╗ ██████╗ ███████╗██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗███╗ ██╗████████╗
██║ ██╔╝╚════██╗╚══██╔══╝╚██╗██╔╝╚██╗ ██╔╝╚══███╔╝ ██╔══██╗██╔════╝██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗████╗ ████║██╔════╝████╗ ██║╚══██╔══╝
█████╔╝ █████╔╝ ██║ ╚███╔╝ ╚████╔╝ ███╔╝ ██║ ██║█████╗ ██║ ██║█████╗ ██║ ██║ ██║██████╔╝██╔████╔██║█████╗ ██╔██╗ ██║ ██║
██╔═██╗ ╚═══██╗ ██║ ██╔██╗ ╚██╔╝ ███╔╝ ██║ ██║██╔══╝ ╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██╔═══╝ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║
██║ ██╗██████╔╝ ██║██╗██╔╝ ██╗ ██║ ███████╗ ██████╔╝███████╗ ╚████╔╝ ███████╗███████╗╚██████╔╝██║ ██║ ╚═╝ ██║███████╗██║ ╚████║ ██║
╚═╝ ╚═╝╚═════╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝
EOF
# Functions
logger() {
local message="$*"
local timestamp=$(date '+%b %e %H:%M:%S') # e.g., Mar 8 14:35:22
local hostname=$(hostname)
local pid=$$ # PID of the current script
echo "$timestamp g5pi[$pid]: $message"
}
# bluetooth network loop
netloop() {
# Exit if already locked
[[ -e /tmp/netloop ]] && return 0
touch /tmp/netloop
while :; do
# Check if "Pixel 6a Network" is active
if ! nmcli -t -f NAME connection show --active | grep -qx "Pixel 6a Network"; then
#echo "Connecting to Pixel 6a Network..."
nmcli connection up "Pixel 6a Network"
fi
sleep 5
done
}
echo "$(date) [g5pi] starting up.."
journalctl -f &
# bump up that aux to the highest it can be
pactl set-sink-volume alsa_output.platform-fe00b840.mailbox.stereo-fallback 100%
# Bluetooth preparation
bluetoothctl <<EOF
power on
agent NoInputNoOutput
default-agent
system-alias "Pontiac G5"
discoverable on
pairable on
EOF
netloop &
tail