Initial import: Lua config, trimmed omarchy scripts, theme system

This commit is contained in:
2026-06-11 19:06:22 +02:00
commit 835a9aa3b5
536 changed files with 12459 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
# archypr:summary=Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol.
# archypr:args=<+N%|N%-|N%>
# archypr:examples=omarchy brightness display apple +5% | omarchy brightness display apple 5%- | omarchy brightness display apple 50%
if (( $# == 0 )); then
echo "Adjust Apple Display brightness by passing +5%, 5%-, or 100%"
else
step="$1"
if [[ $step =~ ^([0-9]+)%-$ ]]; then
step="-${BASH_REMATCH[1]}%"
fi
devices=()
for path in /dev/usb/hiddev* /dev/hiddev*; do
[[ -e $path ]] && devices+=("$path")
done
if (( ${#devices[@]} == 0 )); then
echo "No Apple Display HID device found"
exit 1
fi
device="$(sudo asdcontrol --detect "${devices[@]}" | grep -E '^/dev/(usb/)?hiddev' | cut -d: -f1 | head -n1)"
if [[ -z $device ]]; then
echo "No Apple Display HID device found"
exit 1
fi
sudo asdcontrol "$device" -- "$step" >/dev/null
value="$(sudo asdcontrol "$device" | awk -F= '/BRIGHTNESS=/{print $2+0}')"
archypr-swayosd-brightness "$(( value * 100 / 60000 ))"
fi