From: Ian Kelling Date: Mon, 8 Jul 2024 19:34:15 +0000 (-0400) Subject: minor bug fix and improvements X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=841173cdb1c0f170b263ebf6c576c1358227715e;p=distro-setup minor bug fix and improvements --- diff --git a/myx b/myx index 7b8de6b..ad1bf23 100755 --- a/myx +++ b/myx @@ -69,8 +69,8 @@ date "+%A, %B %d, %r, %S seconds" dry_run=false downres=true -quarter=true -tall=false +quarter=false +tall=true restart=false @@ -102,10 +102,12 @@ if [[ $secondary_out ]]; then 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 @@ -213,6 +215,12 @@ if $tall; then 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 @@ -280,7 +288,6 @@ if (( ${#ws_outputs[@]} )); then for (( i=0; i 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 )) @@ -306,7 +320,7 @@ if (( ${#ws_outputs[@]} )); then 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