phillbush / xmenu

a x11 menu utility
Other
295 stars 26 forks source link

Workaround position #33

Closed Spuxy closed 2 years ago

Spuxy commented 2 years ago

Hey everyone who wants to implement this nice tool

I made workaround @phillbush i hope u wont be mad i made "the issue".

mouse_location=$(xdotool getmouselocation --shell | awk '{print $1}' | sed -n 1p | grep -o '[0-9]*')
xmenu_location="0x0:0"

for i in $(seq 3780 3840); do 
if [[ $mouse_location -eq $i ]];then
  xmenu_location="3705x25:0"
else
  continue
fi; done
for i in $(seq 7630 7680); do 

if [[ $mouse_location -eq $i ]];then
  xmenu_location="7545x25:0"
else
  continue
fi; done

cat <<EOF | xmenu -i -p $xmenu_location | sh &

ignore location numbers that fits to my 32" monitors

but this does really simple thing that change position on different monitor by mouse location like polybar area where i have option "utils"