class GameConfig: def __init__(self, config_path): self.ini = CodexINI.load(config_path) self.path = config_pathdef apply_graphics_preset(self, preset): if preset == "low": self.ini.set("Quality", "shadows", "Low") self.ini.set("Quality", "texture_quality", "Low") self.ini.set("Quality", "antialiasing", "0") elif preset == "ultra": self.ini.set("Quality", "shadows", "Ultra") self.ini.set("Quality", "texture_quality", "Ultra") self.ini.set("Quality", "antialiasing", "8") self.ini.save(self.path) def get_resolution(self): res = self.ini.get("Display", "resolution", default="1920x1080") width, height = map(int, res.split('x')) return width, height def set_resolution(self, width, height): self.ini.set("Display", "resolution", f"widthxheight") self.ini.save(self.path)
# Modify existing values (preserves position and comments) ini.set("Display", "fullscreen", "0")
ini.insert_after("Display", "resolution", "refresh_rate", "144")codexini install
yay -S codexini-bin
# Or build from source:
yay -S codexini-git
After installation, verify with:
codexini --version
Expected output: codexini version 2.4.1
source codex_env/bin/activate