mirror of
https://github.com/duma799/hyprduma-config.git
synced 2026-05-13 14:11:01 +00:00
Reorganize repo into config/, scripts/, and docs/ directories
This commit is contained in:
+8
-8
@@ -93,10 +93,10 @@ def cmd_exists(name):
|
|||||||
|
|
||||||
def find_repo_dir():
|
def find_repo_dir():
|
||||||
cwd = Path.cwd()
|
cwd = Path.cwd()
|
||||||
if (cwd / "hyprland.conf").exists() and (cwd / "pywal.sh").exists():
|
if (cwd / "hyprland.conf").exists() and (cwd / "scripts" / "pywal.sh").exists():
|
||||||
return cwd
|
return cwd
|
||||||
script_dir = Path(__file__).resolve().parent
|
script_dir = Path(__file__).resolve().parent
|
||||||
if (script_dir / "hyprland.conf").exists() and (script_dir / "pywal.sh").exists():
|
if (script_dir / "hyprland.conf").exists() and (script_dir / "scripts" / "pywal.sh").exists():
|
||||||
return script_dir
|
return script_dir
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -277,13 +277,13 @@ def install_pywal(repo):
|
|||||||
# Pywal templates
|
# Pywal templates
|
||||||
templates_dst = home / ".config" / "wal" / "templates"
|
templates_dst = home / ".config" / "wal" / "templates"
|
||||||
templates_dst.mkdir(parents=True, exist_ok=True)
|
templates_dst.mkdir(parents=True, exist_ok=True)
|
||||||
templates_src = repo / "wal" / "templates"
|
templates_src = repo / "config" / "wal" / "templates"
|
||||||
if templates_src.exists():
|
if templates_src.exists():
|
||||||
for f in templates_src.iterdir():
|
for f in templates_src.iterdir():
|
||||||
shutil.copy2(str(f), str(templates_dst / f.name))
|
shutil.copy2(str(f), str(templates_dst / f.name))
|
||||||
print_ok("Installed pywal templates")
|
print_ok("Installed pywal templates")
|
||||||
else:
|
else:
|
||||||
print_err("wal/templates not found in repo")
|
print_err("config/wal/templates not found in repo")
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
for script in [
|
for script in [
|
||||||
@@ -292,7 +292,7 @@ def install_pywal(repo):
|
|||||||
"waypaper-hook.sh",
|
"waypaper-hook.sh",
|
||||||
"monitor-handler.py",
|
"monitor-handler.py",
|
||||||
]:
|
]:
|
||||||
src = repo / script
|
src = repo / "scripts" / script
|
||||||
dst = hypr_dir / script
|
dst = hypr_dir / script
|
||||||
if src.exists():
|
if src.exists():
|
||||||
shutil.copy2(str(src), str(dst))
|
shutil.copy2(str(src), str(dst))
|
||||||
@@ -332,14 +332,14 @@ def install_pywal(repo):
|
|||||||
|
|
||||||
# pywal.sh in home
|
# pywal.sh in home
|
||||||
home_pywal = home / "pywal.sh"
|
home_pywal = home / "pywal.sh"
|
||||||
shutil.copy2(str(repo / "pywal.sh"), str(home_pywal))
|
shutil.copy2(str(repo / "scripts" / "pywal.sh"), str(home_pywal))
|
||||||
home_pywal.chmod(0o755)
|
home_pywal.chmod(0o755)
|
||||||
print_ok("Copied pywal.sh to ~/pywal.sh")
|
print_ok("Copied pywal.sh to ~/pywal.sh")
|
||||||
|
|
||||||
# Kitty
|
# Kitty
|
||||||
kitty_dir = home / ".config" / "kitty"
|
kitty_dir = home / ".config" / "kitty"
|
||||||
kitty_dir.mkdir(parents=True, exist_ok=True)
|
kitty_dir.mkdir(parents=True, exist_ok=True)
|
||||||
kitty_src = repo / "kitty" / "kitty.conf"
|
kitty_src = repo / "config" / "kitty" / "kitty.conf"
|
||||||
if kitty_src.exists():
|
if kitty_src.exists():
|
||||||
shutil.copy2(str(kitty_src), kitty_dir / "kitty.conf")
|
shutil.copy2(str(kitty_src), kitty_dir / "kitty.conf")
|
||||||
print_ok("Installed kitty config with pywal colors")
|
print_ok("Installed kitty config with pywal colors")
|
||||||
@@ -402,7 +402,7 @@ def install_pywal(repo):
|
|||||||
|
|
||||||
def install_fastfetch_config(repo):
|
def install_fastfetch_config(repo):
|
||||||
home = Path.home()
|
home = Path.home()
|
||||||
fastfetch_src = repo / "fastfetch"
|
fastfetch_src = repo / "config" / "fastfetch"
|
||||||
|
|
||||||
if not fastfetch_src.exists():
|
if not fastfetch_src.exists():
|
||||||
print_warn("fastfetch/ directory not found in repo - skipping")
|
print_warn("fastfetch/ directory not found in repo - skipping")
|
||||||
|
|||||||
Reference in New Issue
Block a user