lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
927 stars 36 forks source link

[BUG] rofi show on wrong monitor #39

Closed kwiesmueller closed 2 years ago

kwiesmueller commented 2 years ago

Version

Version: 1.7.0-41-g1520a4a5 (next)

Configuration

Monitor layout:
              ID: 0
            name: XWAYLAND1
        position: 1920,0
            size: 2560,1440
            size: 600mm,340mm  dpi: 108,108

              ID: 1
            name: XWAYLAND0
        position: 0,0
            size: 1920,1080
            size: 340mm,190mm  dpi: 143,144

Detected modi:
        * +window
        * windowcd
        * +run
        * +ssh
        * drun
        * combi
        * keys
        * filebrowser

Compile time options:
        * window  enabled
        * drun    enabled
        * gcov    disabled
        * asan    disabled

For more information see: man rofi
                 Version: 1.7.0-41-g1520a4a5 (next)
              Bugreports: https://github.com/davatorium/rofi/
                 Support: https://reddit.com/r/qtools/
                          #rofi @ libera.chat
      Configuration file: /home/kwiesmueller/.config/rofi/config.rasi

swaymsg -t get_outputs

Output eDP-1 'Unknown 0x4141 0x00000000'
  Current mode: 3840x2160 @ 59.999001 Hz
  Position: 0,0
  Scale factor: 2.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    3840x2160 @ 59.999001 Hz

Output HDMI-A-1 'Dell Inc. Dell S2716DG Y44M571P0CAQ' (focused)
  Current mode: 2560x1440 @ 59.951000 Hz
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 10
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    640x480 @ 59.939999 Hz
    640x480 @ 60.000000 Hz
    720x480 @ 59.939999 Hz
    720x480 @ 60.000000 Hz
    720x576 @ 50.000000 Hz
    800x600 @ 60.317001 Hz
    1024x768 @ 60.004002 Hz
    1280x720 @ 50.000000 Hz
    1280x720 @ 59.939999 Hz
    1280x720 @ 60.000000 Hz
    1920x1080 @ 50.000000 Hz
    1920x1080 @ 59.939999 Hz
    1920x1080 @ 60.000000 Hz
    2560x1440 @ 59.951000 Hz

Launch Command

set $menu "~/.local/bin/rofi -i -combi-modi run,drun -modi drun,run -show run -terminal foot -m -5 | xargs swaymsg exec --"

Steps to reproduce

What behaviour you see

Depending on the value for -m rofi shows on the wrong screen. When on -5 (default) it always shows on the HDMI-A-1. When on -4 it always shows on the opposite screen of the focused window.

It seems like the monitors detected by Rofi are kind of wrong or at least don't match sway. I'm fairly certain the 4k screen is running in 4k and the other one in 1440p. Don't know why they identify so differently in rofi. And why their IDs and Names in Rofi are mixed up.

What behaviour you expect to see

Rofi to consistently show on the right screen.

lbonn commented 2 years ago

According to your config, you are not using this fork but upstream rofi which does not support wayland officially.

However we also don't support the -m options in wayland mode at the moment, so you are out of luck.

kwiesmueller commented 2 years ago

I built from this repo, but let me check. Also I only used the -m option to see if I can fix the default behavior.

lbonn commented 2 years ago

The version string in your logs is definitely from upstream (actually, current tip of the next branch). And because you have "monitor layout" in your logs, it means that rofi is starting in x11 mode.

kwiesmueller commented 2 years ago

Thanks, my bad. I followed https://github.com/lbonn/rofi/blob/wayland/INSTALL.md and seems like I took the wrong GitHub URL to pull from :-/

lbonn commented 2 years ago

Ah I see, good point...

Actually we have started modifying these instructions, so we could fix these links as well.