Skip to content

facer.rgb Config Path Fix #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
WolicraftSF opened this issue Jan 23, 2025 · 0 comments
Open

facer.rgb Config Path Fix #222

WolicraftSF opened this issue Jan 23, 2025 · 0 comments

Comments

@WolicraftSF
Copy link

Hi, I just want to give a fix for the home dir path, because when you run the script with sudo it assumes that your home dir is /root, instead of /home/user

I'm new in GitHub so I'll just leave the code here:

#!/usr/bin/env python3
import argparse
import json
from pathlib import Path
import os

home_dir = Path(os.getenv("SUDO_USER") and f"/home/{os.getenv('SUDO_USER')}" or os.getenv("HOME"))

PAYLOAD_SIZE = 16
CHARACTER_DEVICE = "/dev/acer-gkbbl-0"

PAYLOAD_SIZE_STATIC_MODE = 4
CHARACTER_DEVICE_STATIC = "/dev/acer-gkbbl-static-0"

CONFIG_DIRECTORY = str(home_dir) + "/.config/predator/saved profiles"
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant