update;repurpose displayctl

This commit is contained in:
2026-01-11 00:22:26 -08:00
parent 66c0f78753
commit d230adf3aa
2 changed files with 37 additions and 22 deletions

View File

@ -1,8 +1,17 @@
#!/bin/sh
DISPLAY_STATUS=$(xrandr | grep DP-2)
if [ "$DISPLAY_STATUS" = *"1440x3440"* ]; then
xrandr --output DP-2 --off
else
init_displays
fi
# unused for now, repurposing for ddcutil control
#DISPLAY_STATUS=$(xrandr | grep DP-2)
#
#if [ "$DISPLAY_STATUS" = *"1440x3440"* ]; then
# xrandr --output DP-2 --off
#else
# init_displays
#fi
case $1 in
"brightness")
ddcutil setvcp 10 $2;;
"contrast")
ddcutil setvcp 12 $2;;
esac