dry_run=false
downres=true
-quarter=true
-tall=false
+quarter=false
+tall=true
restart=false
x_offset=$primary_x
left_right_arg=--right-of
+ # This one is temporarily on the left. uncomment and move into conditional
+ # when it isn't anymore.
+ # [[ $secondary_out == DP-1 && $(edid card1-DP-1 ) == f3364bc6c1 ]]
if [[ $secondary_out == HDMI2 && $(edid card0-HDMI-A-2) == 192efbdcef ]] || \
[[ $secondary_out == HDMI-1 && $(edid card1-HDMI-A-1 ) == 7c58f9ac1e ]] || \
- [[ $secondary_out == DP-2 && $(edid card1-DP-2 ) == 0c35564b67 ]] || \
- [[ $secondary_out == DP-1 && $(edid card1-DP-1 ) == f3364bc6c1 ]]; then
+ [[ $secondary_out == DP-2 && $(edid card1-DP-2 ) == 0c35564b67 ]]; then
left_right_arg=--left-of
x_offset=0
fi
elif $quarter; then
m xrandr --setmonitor MON-LEFT $half_x/298x$half_y/336+$x_offset+0 $target_out
+ # note: this bottom left is buggy when it comes to context menus,
+ # including in web pages. In the tall configuration, I sometimes see
+ # them in another "monitor" area, but with this bottom left monitor,
+ # they aren't displayed at all, as if the window system is displaying
+ # them off screen. When that happens, I just switch to the tall
+ # configuration, use the dialog, and them maybe switch back.
m xrandr --setmonitor MON-BOTTOM-LEFT $half_x/298x$half_y/336+$x_offset+$half_y none
m xrandr --setmonitor MON-RIGHT $half_x/298x$target_y/336+$(( x_offset + half_x ))+0 none
fi
for (( i=0; i<total_ws_count; i++ )); do
ws=$(( i+1 ))
tmp=${ws_outputs[$i]}
- echo "tmp: $tmp"
# use the last output in the array for all remaining workspaces
if [[ $tmp ]]; then
ws_out=$tmp
refresh_workspaces=true
while $refresh_workspaces; do
if (( refresh_count > 20 )); then
- echo "error. moving workspaces is not working as expected" >&2
+ cat <<'EOF' >&2
+
+ERROR: moving workspaces is not working as expected I've seen it happen
+that an output is not "active" and restarting i3 fixed it. If you see
+this, try reloading i3, and thinking about how to automatically handle
+the situation from within the script.
+
+EOF
exit 1
fi
refresh_count=$(( refresh_count + 1 ))
while read -r ws; do
read -r output || break
if [[ ${ws_expected_out[$ws]} != "$output" ]]; then
- m i3 '[workspace="'$ws'"]' move workspace to output $output
+ m i3 '[workspace="'$ws'"]' move workspace to output ${ws_expected_out[$ws]}
refresh_workspaces=true
break
fi