xoffset relative position #1904
-
ProblemHi, I'm using rofi in combination with polybar. When I want to give more information, I hook a rofi script on polybar icon, and clicking the icon opens a rofi popup. Example of such script is following: #!/bin/bash
x_mouse=$(xdotool getmouselocation | cut -d ' ' -f1 | cut -d ':' -f2)
x_offset=$(( $x_mouse - 80 ))
# polybar height
y_offset=-25
selection=$(rofi -theme ssh_sessions -modi "sshc:~/.local/bin/ssh_sessions" -show sshc -location 7 -xoffset $x_offset -yoffset $y_offset) I'm fetching current cursor position (which is where icon is position on polybar) and I pass this information to rofi so it knows where to create popup. This worked fine on first monitor, but now I moved some icons to second monitor and it seems rofi uses The issue is that Question
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can force rofi to use the first monitor, does that help if you pass absolute distance for positioning it on the 2nd? this worked for me to position it on monitor 0 launched on any monitor. rofi -theme-str 'window {x-offset: 3900; anchor: north west; location: north west; } configuration { monitor: 1; } ' |
Beta Was this translation helpful? Give feedback.
You can force rofi to use the first monitor, does that help if you pass absolute distance for positioning it on the 2nd?
this worked for me to position it on monitor 0 launched on any monitor.
rofi -theme-str 'window {x-offset: 3900; anchor: north west; location: north west; } configuration { monitor: 1; } '