forked from Shinonome/dots-hyprland
kvantum scripts: use xdg dirs instead of assuming defaults
This commit is contained in:
@@ -35,9 +35,12 @@ def update_svg_colors(svg_path, old_to_new_colors, output_path):
|
|||||||
print(f"SVG colors have been updated and saved to {output_path}!")
|
print(f"SVG colors have been updated and saved to {output_path}!")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
scss_file = os.path.expanduser('~/.local/state/ags/scss/_material.scss') # Hardcoded path to the SCSS file
|
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||||
svg_path = os.path.expanduser('~/.config/Kvantum/Colloid/Colloid.svg') # Hardcoded path to the input SVG file
|
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
|
||||||
output_path = os.path.expanduser('~/.config/Kvantum/MaterialAdw/MaterialAdw.svg') # Hardcoded path to the output SVG file
|
|
||||||
|
scss_file = os.path.join(xdg_state_home, "ags", "scss", "_material.scss")
|
||||||
|
svg_path = os.path.join(xdg_config_home, "Kvantum", "Colloid", "Colloid.svg")
|
||||||
|
output_path = os.path.join(xdg_config_home, "Kvantum", "MaterialAdw", "MaterialAdw.svg")
|
||||||
|
|
||||||
# Read colors from the SCSS file
|
# Read colors from the SCSS file
|
||||||
color_data = read_scss(scss_file)
|
color_data = read_scss(scss_file)
|
||||||
|
|||||||
@@ -35,9 +35,12 @@ def update_svg_colors(svg_path, old_to_new_colors, output_path):
|
|||||||
print(f"SVG colors have been updated and saved to {output_path}!")
|
print(f"SVG colors have been updated and saved to {output_path}!")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
scss_file = os.path.expanduser('~/.local/state/ags/scss/_material.scss') # Hardcoded path to the SCSS file
|
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||||
svg_path = os.path.expanduser('~/.config/Kvantum/Colloid/ColloidDark.svg') # Hardcoded path to the input SVG file
|
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
|
||||||
output_path = os.path.expanduser('~/.config/Kvantum/MaterialAdw/MaterialAdw.svg') # Hardcoded path to the output SVG file
|
|
||||||
|
scss_file = os.path.join(xdg_state_home, "ags", "scss", "_material.scss")
|
||||||
|
svg_path = os.path.join(xdg_config_home, "Kvantum", "Colloid", "ColloidDark.svg")
|
||||||
|
output_path = os.path.join(xdg_config_home, "Kvantum", "MaterialAdw", "MaterialAdw.svg")
|
||||||
|
|
||||||
# Read colors from the SCSS file
|
# Read colors from the SCSS file
|
||||||
color_data = read_scss(scss_file)
|
color_data = read_scss(scss_file)
|
||||||
|
|||||||
@@ -28,9 +28,12 @@ def update_config_colors(config_file, colors, mappings):
|
|||||||
file.write(config_content)
|
file.write(config_content)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
scss_file = os.path.expanduser('~/.local/state/ags/scss/_material.scss')
|
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||||
config_file = os.path.expanduser('~/.config/Kvantum/MaterialAdw/MaterialAdw.kvconfig') # Replace with the actual path to your config file
|
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
|
||||||
|
|
||||||
|
config_file = os.path.join(xdg_config_home, "Kvantum", "MaterialAdw", "MaterialAdw.kvconfig")
|
||||||
|
scss_file = os.path.join(xdg_state_home, "ags", "scss", "_material.scss")
|
||||||
|
|
||||||
# Define your mappings here
|
# Define your mappings here
|
||||||
mappings = {
|
mappings = {
|
||||||
'window.color': 'background',
|
'window.color': 'background',
|
||||||
|
|||||||
Reference in New Issue
Block a user