split hypr* & hyprland stow packages; add success_count in change-colortheme script
This commit is contained in:
+2
-1
@@ -30,7 +30,7 @@ GUI_BASE_PKGS = [
|
||||
# "mpv", # media player
|
||||
"wallpaper", # wallpapers & manager
|
||||
"kvantum", # qt theming
|
||||
"nwg-look", # gtk theming
|
||||
"nwg-look" # gtk theming
|
||||
]
|
||||
|
||||
# for Hyprland setup
|
||||
@@ -38,6 +38,7 @@ HYPRLAND_PKGS = [
|
||||
*GUI_BASE_PKGS,
|
||||
"eww", # widgets
|
||||
"hypr", # hypr family
|
||||
"hyprland", # wm config
|
||||
"mako", # notifications
|
||||
"rofi", # application launcher
|
||||
"waybar", # status bar
|
||||
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
shaders
|
||||
wallpaper*
|
||||
Executable → Regular
@@ -13,6 +13,7 @@ import argparse
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from threading import Lock
|
||||
|
||||
MAX_WORKERS = 8
|
||||
|
||||
@@ -60,6 +61,10 @@ SCRIPTS = {
|
||||
# or simply `find [-L] <CONFIG_DIR> -type f -name 'apply-color*'` to get all available scripts,
|
||||
# but I need the exact application names anyway, so hardcoding does make some sense
|
||||
|
||||
# A thread-safe counter
|
||||
success_count = 0
|
||||
success_count_lock = Lock()
|
||||
|
||||
|
||||
def hex2rgb(hex_color: str) -> tuple[int, int, int]:
|
||||
"""#rrggbb to (r, g, b)"""
|
||||
@@ -231,6 +236,9 @@ def run_script(script_path: Path, args: list[str]):
|
||||
print(f"Error running {script_path}:\n{result.stderr.strip()}")
|
||||
else:
|
||||
print(f"✓ {script_path}")
|
||||
with success_count_lock:
|
||||
global success_count
|
||||
success_count += 1
|
||||
except Exception as e:
|
||||
print(f"Exception running {script_path}: {e}")
|
||||
|
||||
@@ -329,7 +337,7 @@ def main():
|
||||
"-a",
|
||||
"change-colortheme",
|
||||
"Colortheme Changed",
|
||||
f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {len(apps)} apps",
|
||||
f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {success_count} apps",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user