12 lines
196 B
Bash
12 lines
196 B
Bash
|
#! /usr/bin/env bash
|
||
|
|
||
|
connect() {
|
||
|
xrandr --output HDMI-2 --same-as eDP-1
|
||
|
}
|
||
|
|
||
|
disconnect() {
|
||
|
xrandr --output HDMI-2 --off
|
||
|
}
|
||
|
|
||
|
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
|