feat(root): add ddcutil to install script

Add support for monitor DDC/CI control via ddcutil.
This commit is contained in:
sankalp committed 2026-06-17 01:45:06 +05:45
1 parent 850c41cddb
commit 400b8db954
2 files changed
+1 -37

No files matched your search

+1
View File
@@ -47,6 +47,7 @@ PACKAGES=(
power-profiles-daemon
uwsm
cinnamon-desktop
ddcutil
)
# Colors and formatting
-37
View File
@@ -1,37 +0,0 @@
import re
def hypr_patch(cmd):
if not isinstance(cmd, str) or "dispatch" not in cmd:
return cmd
if "hyprctl dispatch" in cmd:
match = re.search(r"hyprctl dispatch (\w+)(.*)", cmd)
if match:
disp, args = match.group(1), match.group(2).strip(" '\"")
if disp == "workspace":
lua = f"hl.dsp.focus({{workspace=[[{args}]]}})"
elif disp == "movetoworkspace":
lua = f"hl.dsp.window.move({{workspace=[[{args}]]}})"
else:
disp = "exec_cmd" if disp == "exec" else disp
lua = f"hl.dsp.{disp}([[{args}]])" if args else f"hl.dsp.{disp}()"
cmd = cmd.replace(match.group(0), f"hyprctl eval '{lua}'")
cmd = re.sub(
r"dispatch workspace ([^\s;]+)",
r"dispatch hl.dsp.focus({workspace=[[\1]]})",
cmd,
)
cmd = re.sub(
r"dispatch movetoworkspace ([^\s;]+)",
r"dispatch hl.dsp.window.move({workspace=[[\1]]})",
cmd,
)
return cmd
print(hypr_patch("batch/dispatch workspace 1"))
print(hypr_patch("hyprctl dispatch exec 'uwsm app -- kitty'"))
print(hypr_patch("hyprctl dispatch workspace e+1"))