dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.local/bin/monis

13 lines
497 B
Bash
Executable File

#!/bin/sh
conectados=$(xrandr -q | awk '/ connected/ {count++} END {print count}')
sec=$(xrandr -q | awk '/ connected/ {print $1}' | sed -sn 2p)
if [ "$conectados" = 1 ]; then
xrandr --output LVDS1 --primary --auto --scale 1.0x1.0 "$(xrandr -q | awk '/ disconnected/ {print "--output", $1, "--off"}' | paste -sd ' ')"
randbg
elif [ "$conectados" = 2 ]; then
xrandr --output LVDS1 --primary --auto --scale 1.0x1.0 --output "$sec" --right-of LVDS1 --auto --scale 1.0x1.0
randbg
fi