scripts/i3/i3move.sh

29 wiersze
645 B
Bash
Executable File

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