#!/usr/bin/env python
# vim: ft=python
import os
fixes = []
with open(os.environ["XDG_CONFIG_HOME"] + "/xournal_conf/ugly_fix", "r") as f:
fixes = f.read().strip().split("\n")
with open(os.environ["XDG_CONFIG_HOME"] + "/xournalpp/settings.xml", "r") as f:
text = f.read().strip().split("\n")
for i in range(len(text)):
if "selectionBorderColor" in text[i]:
text[i] = ''
if "backgroundColor" in text[i] and "pageTemplate" not in text[i]:
text[i] = ''
if "selectionMarkerColor" in text[i]:
text[i] = ''
if "pageTemplate" in text[i]:
text[i] = ''
if "defaultViewModeAttributes" in text[i]:
text[i] = ''
text = "\n".join(text)
with open(os.environ["XDG_CONFIG_HOME"] + "/xournalpp/settings.xml", "w") as f:
f.write(text)