mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
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}!")
|
||||
|
||||
def main():
|
||||
scss_file = os.path.expanduser('~/.local/state/ags/scss/_material.scss') # Hardcoded path to the SCSS file
|
||||
svg_path = os.path.expanduser('~/.config/Kvantum/Colloid/Colloid.svg') # Hardcoded path to the input SVG file
|
||||
output_path = os.path.expanduser('~/.config/Kvantum/MaterialAdw/MaterialAdw.svg') # Hardcoded path to the output SVG file
|
||||
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
|
||||
|
||||
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
|
||||
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}!")
|
||||
|
||||
def main():
|
||||
scss_file = os.path.expanduser('~/.local/state/ags/scss/_material.scss') # Hardcoded path to the SCSS file
|
||||
svg_path = os.path.expanduser('~/.config/Kvantum/Colloid/ColloidDark.svg') # Hardcoded path to the input SVG file
|
||||
output_path = os.path.expanduser('~/.config/Kvantum/MaterialAdw/MaterialAdw.svg') # Hardcoded path to the output SVG file
|
||||
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||
xdg_state_home = os.environ.get("XDG_STATE_HOME", os.path.expanduser("~/.local/state"))
|
||||
|
||||
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
|
||||
color_data = read_scss(scss_file)
|
||||
|
||||
@@ -28,9 +28,12 @@ def update_config_colors(config_file, colors, mappings):
|
||||
file.write(config_content)
|
||||
|
||||
if __name__ == "__main__":
|
||||
scss_file = os.path.expanduser('~/.local/state/ags/scss/_material.scss')
|
||||
config_file = os.path.expanduser('~/.config/Kvantum/MaterialAdw/MaterialAdw.kvconfig') # Replace with the actual path to your config file
|
||||
|
||||
xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.path.expanduser("~/.config"))
|
||||
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
|
||||
mappings = {
|
||||
'window.color': 'background',
|
||||
|
||||
Reference in New Issue
Block a user