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
|
# "mpv", # media player
|
||||||
"wallpaper", # wallpapers & manager
|
"wallpaper", # wallpapers & manager
|
||||||
"kvantum", # qt theming
|
"kvantum", # qt theming
|
||||||
"nwg-look", # gtk theming
|
"nwg-look" # gtk theming
|
||||||
]
|
]
|
||||||
|
|
||||||
# for Hyprland setup
|
# for Hyprland setup
|
||||||
@@ -38,6 +38,7 @@ HYPRLAND_PKGS = [
|
|||||||
*GUI_BASE_PKGS,
|
*GUI_BASE_PKGS,
|
||||||
"eww", # widgets
|
"eww", # widgets
|
||||||
"hypr", # hypr family
|
"hypr", # hypr family
|
||||||
|
"hyprland", # wm config
|
||||||
"mako", # notifications
|
"mako", # notifications
|
||||||
"rofi", # application launcher
|
"rofi", # application launcher
|
||||||
"waybar", # status bar
|
"waybar", # status bar
|
||||||
|
|||||||
Vendored
-2
@@ -1,2 +0,0 @@
|
|||||||
shaders
|
|
||||||
wallpaper*
|
|
||||||
Executable → Regular
@@ -13,6 +13,7 @@ import argparse
|
|||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
from threading import Lock
|
||||||
|
|
||||||
MAX_WORKERS = 8
|
MAX_WORKERS = 8
|
||||||
|
|
||||||
@@ -60,6 +61,10 @@ SCRIPTS = {
|
|||||||
# or simply `find [-L] <CONFIG_DIR> -type f -name 'apply-color*'` to get all available 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
|
# 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]:
|
def hex2rgb(hex_color: str) -> tuple[int, int, int]:
|
||||||
"""#rrggbb to (r, g, b)"""
|
"""#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()}")
|
print(f"Error running {script_path}:\n{result.stderr.strip()}")
|
||||||
else:
|
else:
|
||||||
print(f"✓ {script_path}")
|
print(f"✓ {script_path}")
|
||||||
|
with success_count_lock:
|
||||||
|
global success_count
|
||||||
|
success_count += 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Exception running {script_path}: {e}")
|
print(f"Exception running {script_path}: {e}")
|
||||||
|
|
||||||
@@ -329,7 +337,7 @@ def main():
|
|||||||
"-a",
|
"-a",
|
||||||
"change-colortheme",
|
"change-colortheme",
|
||||||
"Colortheme Changed",
|
"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