17.09.2025

#on/off second monitor

#!/bin/bash

pid=`sed '1q;d' /tmp/mon_switch.pid`

if [[ -z "$pid" ]]; then

xrandr --output DVI-I-0 --off & echo "off" > /tmp/mon_switch.pid

else

xrandr --output DVI-I-0 --auto --left-of DVI-I-1

xrandr --output DVI-I-1 --primary & echo "" > /tmp/mon_switch.pid

fi


Комментариев нет:

Отправить комментарий