added PKGBUILD and updated config location

This commit is contained in:
CPTN Cosmo 2026-01-10 01:33:26 +01:00
parent 6878c8b77d
commit efb7e52a14
No known key found for this signature in database
6 changed files with 65 additions and 9 deletions

View file

@ -62,13 +62,22 @@ def send_otp(secret):
print("Timed out waiting for XIVLauncher OTP prompt.")
def main():
# Determine config path (look in script directory)
script_dir = os.path.dirname(os.path.realpath(__file__))
config_path = os.path.join(script_dir, "config.json")
# Determine config path (XDG standard)
xdg_config_home = os.environ.get('XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config'))
config_dir = os.path.join(xdg_config_home, 'xivlauncher-wrapper')
config_path = os.path.join(config_dir, 'config.json')
# Fallback to script directory (legacy/development)
if not os.path.exists(config_path):
print(f"Config file not found at: {config_path}")
print("Please copy config.example.json to config.json and fill in your secret.")
script_dir = os.path.dirname(os.path.realpath(__file__))
local_config = os.path.join(script_dir, "config.json")
if os.path.exists(local_config):
config_path = local_config
if not os.path.exists(config_path):
print(f"Config file not found.")
print(f"Expected at: {config_path}")
print(f"Please copy config.example.json to {config_path} and fill in your secret.")
sys.exit(1)
try: