"""Central configuration for ba-auto-daily, ported from the old ba_dailies.sh.""" import os DISPLAY = ":0" XAUTHORITY = "/run/user/1000/gdm/Xauthority" ENV = {**os.environ, "DISPLAY": DISPLAY, "XAUTHORITY": XAUTHORITY} WINDOW_NAME = "BlueArchive" ASSET_DIR = os.path.expanduser("~/ba_assets") # Runtime working files (probe/detection screenshots); never /tmp, per CLAUDE.md. SCRATCHPAD_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "scratchpad") os.makedirs(SCRATCHPAD_DIR, exist_ok=True) # Refined from (1726, 60): that coordinate sat on the edge of the icon's # hitbox and intermittently missed during live testing. MAILBOX_ICON = (1732, 50) CLAIM_ALL = (1691, 1128) MISSION_ICON = (75, 350) # Background pixel inside the "一括受取" (claim all) button on the Mission # panel: bright yellow (r~250, r-b~180+) when something is claimable, flat # grey (r-b<20) when not. Calibrated live at 1920x1200. MISSION_CLAIM_PROBE = (1600, 1100) CAFE_ICON = (165, 1100) CAFE_ROOM_SWITCH = (190, 160) CAFE_INCOME = (1780, 1105) # Max sparkle-detection attempts per room (hits and misses both count -- # sparkles are on a per-student cooldown, so most checks legitimately find # nothing and the loop keeps polling rather than giving up after one miss). CAFE_MAX_CLICKS_PER_ROOM = 15 CAFE_SPARKLE_TEMPLATE = os.path.join(ASSET_DIR, "cafe_sparkle.png")