2018-05-04 08:59:45 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
CONNECTED_CMD="xrandr --query | grep connected | grep -v disconnected | wc -l"
|
|
|
|
monitors=`eval $CONNECTED_CMD`
|
|
|
|
|
2018-05-09 12:33:08 +02:00
|
|
|
sleep 5
|
2018-05-04 08:59:45 +02:00
|
|
|
if [ $monitors -gt 1 ]
|
|
|
|
then
|
|
|
|
~/.i3/scripts/dock.sh &
|
|
|
|
else
|
|
|
|
~/.i3/scripts/undock.sh &
|
|
|
|
fi
|