acer-predator-turbo-and-rgb-keyboard-linux-module
acer-predator-turbo-and-rgb-keyboard-linux-module copied to clipboard
facer.rgb Config Path Fix
trafficstars
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"
...