diff --git a/.cwm_scripts/display-switcher b/.cwm_scripts/display-switcher index 1ee849c..1d428ce 100755 --- a/.cwm_scripts/display-switcher +++ b/.cwm_scripts/display-switcher @@ -11,12 +11,14 @@ while true; do if [ "$(xrandr --nograb --current | grep '^DP-1 connected')" ]; then echo "Display Switcher: switching to external display" active_display="external" + doas sysctl machdep.lidaction=0 xrandr --output DP-1 --auto --dpi 224 --output eDP-1 --off fi else if [ "$(xrandr --nograb --current | grep '^DP-1 disconnected')" ]; then echo "Display Switcher: switching to internal display" active_display="internal" + doas sysctl machdep.lidaction=1 xrandr --output eDP-1 --auto --dpi 176 --output DP-1 --off fi fi