2020-09-11 15:00:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
LAYOUT=`cat ~/.config/screenlayout/i3.current`
|
|
|
|
MIDDLE="eDP-1"
|
|
|
|
|
|
|
|
if [[ $LAYOUT == 'home' ]]; then
|
2020-11-23 09:35:26 +00:00
|
|
|
RIGHT="DP-2-2"
|
|
|
|
LEFT="DP-2-1"
|
2020-09-11 15:00:39 +00:00
|
|
|
elif [[ $LAYOUT == 'work' ]]; then
|
2020-11-23 09:35:26 +00:00
|
|
|
RIGHT="DP-2-2"
|
|
|
|
LEFT="DP-2-1"
|
2020-09-11 15:00:39 +00:00
|
|
|
elif [[ $LAYOUT == '3' ]]; then
|
2020-11-23 09:35:26 +00:00
|
|
|
MIDDLE="DP-2-2"
|
|
|
|
LEFT="DP-2-1"
|
|
|
|
RIGHT="eDP-1"
|
2020-09-11 15:00:39 +00:00
|
|
|
else
|
2020-11-23 09:35:26 +00:00
|
|
|
echo "No external displays connected"
|
2020-09-11 15:00:39 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ $1 == 'right' ]]; then
|
2020-11-23 09:35:26 +00:00
|
|
|
i3 move workspace to output $RIGHT
|
2020-09-11 15:00:39 +00:00
|
|
|
elif [[ $1 == 'middle' ]]; then
|
2020-11-23 09:35:26 +00:00
|
|
|
i3 move workspace to output $MIDDLE
|
2020-09-11 15:00:39 +00:00
|
|
|
elif [[ $1 == 'left' ]]; then
|
2020-11-23 09:35:26 +00:00
|
|
|
i3 move workspace to output $LEFT
|
2020-09-11 15:00:39 +00:00
|
|
|
else
|
2020-11-23 09:35:26 +00:00
|
|
|
echo "Invalid direction. Requires either 'up', 'left', or 'middle'"
|
2020-09-11 15:00:39 +00:00
|
|
|
fi
|