From b7e786c440280670315722b77171fd47710777a6 Mon Sep 17 00:00:00 2001 From: noctuid Date: Sun, 30 Aug 2015 13:19:31 -0400 Subject: [PATCH] Fix -m for WMs where xrandr will identify one monitor as "primary" --- tdrop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrop b/tdrop index 0cb23e3..e514598 100755 --- a/tdrop +++ b/tdrop @@ -146,7 +146,7 @@ update_geometry_settings_for_monitor() { wininfo=$(xwininfo -id "$(xdotool getactivewindow)") window_x=$(echo "$wininfo" | awk '/Absolute.*X/ {print $4}') window_y=$(echo "$wininfo" | awk '/Absolute.*Y/ {print $4}') - monitors_info=$(xrandr --query | grep " connected") + monitors_info=$(xrandr --query | awk '/ connected/ {gsub("primary ",""); print}') while read -r monitor; do monitor_geo=$(echo "$monitor" | awk '{print $3}') x_begin=$(echo "$monitor_geo" | awk -F '+' '{print $2}')