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
|
2018-10-04 16:57:13 +02:00
|
|
|
~/.i3/scripts/dock.sh &
|
|
|
|
. ~/.i3/env
|
|
|
|
|
|
|
|
sleep 1
|
2018-10-08 12:46:55 +02:00
|
|
|
polybar primary &
|
|
|
|
polybar secondary &
|
|
|
|
polybar laptop &
|
2018-05-04 08:59:45 +02:00
|
|
|
else
|
2018-10-04 16:57:13 +02:00
|
|
|
~/.i3/scripts/undock.sh &
|
|
|
|
. ~/.i3/env
|
|
|
|
|
|
|
|
sleep 1
|
2018-10-08 12:46:55 +02:00
|
|
|
polybar primary &
|
2018-05-04 08:59:45 +02:00
|
|
|
fi
|