40 lines
No EOL
1.2 KiB
Bash
Executable file
40 lines
No EOL
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# --- Configuration ---
|
|
AUR_HELPER="yay"
|
|
PKG_NAME="linux-enable-ir-emitter"
|
|
|
|
# --- Colors ---
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
RED='\033[0;31m'
|
|
NC='\033[0m'
|
|
|
|
echo -e "${GREEN}=== IR Emitter Enabler for Arch Linux ===${NC}"
|
|
|
|
# 1. Check/Install dependencies
|
|
echo -e "${YELLOW}[1/3] Installing linux-enable-ir-emitter from AUR...${NC}"
|
|
if ! command -v $AUR_HELPER &> /dev/null; then
|
|
echo -e "${RED}Error: AUR helper '$AUR_HELPER' not found. Please install yay or paru.${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
$AUR_HELPER -S --needed $PKG_NAME
|
|
|
|
# 2. Run the Configuration Wizard
|
|
echo -e "${YELLOW}[2/3] Starting configuration wizard...${NC}"
|
|
echo -e "${GREEN}INSTRUCTIONS:${NC}"
|
|
echo "1. The tool will ask to find your IR camera."
|
|
echo "2. It will try different 'patterns' to turn on the light."
|
|
echo "3. You must LOOK AT YOUR CAMERA while it tests."
|
|
echo "4. When you see the red light flash (or purple on your screen), answer 'Yes'."
|
|
echo ""
|
|
read -p "Press Enter to start the wizard..."
|
|
|
|
# We run the configure command. It requires root permissions for hardware access.
|
|
sudo linux-enable-ir-emitter configure
|
|
|
|
# 3. Final Test
|
|
echo -e "${YELLOW}[3/3] Testing Howdy...${NC}"
|
|
read -p "If the wizard was successful, press Enter to test Howdy now..."
|
|
sudo howdy test |