updated colorschemes
This commit is contained in:
@ -11,21 +11,36 @@ GET_PRIMARY_MONITOR() {
|
||||
|
||||
PRIMARY_MONITOR=$(GET_PRIMARY_MONITOR)
|
||||
|
||||
GET_DEFAULT_EXTERNAL_MONITOR() {
|
||||
GET_ALL_EXTERNAL_MONITORS() {
|
||||
xrandr \
|
||||
| grep ' connect' \
|
||||
| awk '{print $1;}' \
|
||||
| grep -v "$NATIVE_MONITOR" \
|
||||
| head -n 1
|
||||
2>/dev/null
|
||||
}
|
||||
GET_DEFAULT_EXTERNAL_MONITOR() {
|
||||
GET_ALL_EXTERNAL_MONITORS | head -n 1
|
||||
}
|
||||
EXTERNAL_MONITOR=$(GET_DEFAULT_EXTERNAL_MONITOR)
|
||||
|
||||
DISCONNECT_OTHER() {
|
||||
local SFX="$1"
|
||||
|
||||
for D in $(xrandr --listmonitors | sed '1d' | awk '{print $NF;}' | grep -v "^$(GET_PRIMARY_MONITOR)$")
|
||||
local INACTIVE_MONITORS=$(\
|
||||
xrandr --listmonitors \
|
||||
| sed '1d' | awk '{print $NF;}' \
|
||||
| grep -v "^$(GET_PRIMARY_MONITOR)$"
|
||||
)
|
||||
|
||||
for ACTIVE_MONITOR in ${@:2}
|
||||
do
|
||||
xrandr --output $D --off
|
||||
INACTIVE_MONITORS=$(echo $INACTIVE_MONITORS | grep -v "^$ACTIVE_MONITOR$")
|
||||
done
|
||||
|
||||
local MONITOR
|
||||
for MONITOR in $INACTIVE_MONITORS
|
||||
do
|
||||
xrandr --output $MONITOR --off
|
||||
done
|
||||
|
||||
sleep 1
|
||||
|
Reference in New Issue
Block a user