dotfiles/sway/.config/sway/scripts/start_layout.sh

16 lines
255 B
Bash
Executable File

#!/bin/bash
CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'"
monitors=`eval $CONNECTED_CMD`
if [ $monitors -gt 1 ]
then
echo "DOCKED"
~/.config/sway/scripts/dock.sh &
else
echo "UNDOCKED"
~/.config/sway/scripts/undock.sh &
fi
exit 0