8 lines
159 B
Bash
Executable file
8 lines
159 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
output=$(xrandr | awk '$2=="connected" { if ($1 ~ /VGA|HDMI/) { print $1 } }')
|
|
if [ -z "$output" ]; then
|
|
exit 1;
|
|
else
|
|
echo $output
|
|
fi
|