hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.45k stars 897 forks source link

Changing monitors with Kanshi breaks focusmonitor #5833

Open twiclo opened 6 months ago

twiclo commented 6 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759 (props: bump version to 0.39.1). Date: Tue Apr 16 16:01:03 2024 Tag: v0.39.1, commits: 4460 flags: (if any) System Information: System name: Linux Node name: sato Release: 6.8.5-301.fc40.x86_64 Version: #1 SMP PREEMPT_DYNAMIC Thu Apr 11 20:00:10 UTC 2024 GPU information: c1:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c4) (prog-if 00 [VGA controller]) os-release: NAME="Fedora Linux" VERSION="40 (Workstation Edition)" ID=fedora VERSION_ID=40 VERSION_CODENAME="" PLATFORM_ID="platform:f40" PRETTY_NAME="Fedora Linux 40 (Workstation Edition)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:40" DEFAULT_HOSTNAME="fedora" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=40 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=40 SUPPORT_END=2025-05-13 VARIANT="Workstation Edition" VARIANT_ID=workstation plugins: ```

Bug or Regression?

Bug

Description

hyprctl dispatch focusmonitor 2 works when monitors aren't set in the hyprland config (monitor=,preferred,auto,1) but when monitors are set with kanshi I'm unable to focus monitor 2.

hyprctl monitors before kanshi:

Monitor DP-9 (ID 1):
    2560x1440@59.95100 at 0x0
    description: Ancor Communications Inc ASUS PB258 F8LMTJ017132
    make: Ancor Communications Inc
    model: ASUS PB258
    serial: F8LMTJ017132
    active workspace: 3 (3)
    special workspace: 0 ()
    reserved: 0 24 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1680x1050@59.95Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.89Hz 1280x960@60.00Hz 1280x800@59.81Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1280x720@50.00Hz 1440x576@50.00Hz 1440x576@50.00Hz 1024x768@75.03Hz 1024x768@70.07Hz 1024x768@60.00Hz 1440x480@60.00Hz 1440x480@60.00Hz 1440x480@59.94Hz 1440x480@59.94Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@72.19Hz 800x600@60.32Hz 800x600@56.25Hz 720x576@50.00Hz 720x576@50.00Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@60.00Hz 720x480@59.94Hz 720x480@59.94Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@66.67Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 720x400@70.08Hz

Monitor DP-11 (ID 2):
    2560x1440@59.95100 at 2560x0
    description: Ancor Communications Inc ASUS PB258 G1LMTJ002877
    make: Ancor Communications Inc
    model: ASUS PB258
    serial: G1LMTJ002877
    active workspace: 1 (1)
    special workspace: 0 ()
    reserved: 0 24 0 0
    scale: 1.00
    transform: 0
    focused: no
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@30.00Hz 1920x1080@29.97Hz 1920x1080@25.00Hz 1920x1080@24.00Hz 1920x1080@23.98Hz 1680x1050@59.88Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.90Hz 1280x960@60.00Hz 1280x800@59.91Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1280x720@50.00Hz 1440x576@50.00Hz 1440x576@50.00Hz 1024x768@75.03Hz 1024x768@70.07Hz 1024x768@60.00Hz 1440x480@60.00Hz 1440x480@60.00Hz 1440x480@59.94Hz 1440x480@59.94Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@72.19Hz 800x600@60.32Hz 800x600@56.25Hz 720x576@50.00Hz 720x576@50.00Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@60.00Hz 720x480@59.94Hz 720x480@59.94Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@66.67Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 720x400@70.08Hz

Monitor eDP-1 (ID 0):
    2256x1504@59.99900 at 5120x0
    description: BOE 0x0BCA
    make: BOE
    model: 0x0BCA
    serial:
    active workspace: 4 (4)
    special workspace: 0 ()
    reserved: 0 24 0 0
    scale: 1.00
    transform: 0
    focused: no
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 2256x1504@60.00Hz 2256x1504@48.00Hz 1920x1200@60.00Hz 1920x1080@60.00Hz 1600x1200@60.00Hz 1680x1050@60.00Hz 1280x1024@60.00Hz 1440x900@60.00Hz 1280x800@60.00Hz 1280x720@60.00Hz 1024x768@60.00Hz 800x600@60.00Hz 640x480@60.00Hz

And after running kanshi

Monitor DP-9 (ID 1):
    2560x1440@59.95100 at 2560x0
    description: Ancor Communications Inc ASUS PB258 F8LMTJ017132
    make: Ancor Communications Inc
    model: ASUS PB258
    serial: F8LMTJ017132
    active workspace: 3 (3)
    special workspace: 0 ()
    reserved: 0 24 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1680x1050@59.95Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.89Hz 1280x960@60.00Hz 1280x800@59.81Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1280x720@50.00Hz 1440x576@50.00Hz 1440x576@50.00Hz 1024x768@75.03Hz 1024x768@70.07Hz 1024x768@60.00Hz 1440x480@60.00Hz 1440x480@60.00Hz 1440x480@59.94Hz 1440x480@59.94Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@72.19Hz 800x600@60.32Hz 800x600@56.25Hz 720x576@50.00Hz 720x576@50.00Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@60.00Hz 720x480@59.94Hz 720x480@59.94Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@66.67Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 720x400@70.08Hz

Monitor DP-11 (ID 2):
    2560x1440@59.95100 at 0x0
    description: Ancor Communications Inc ASUS PB258 G1LMTJ002877
    make: Ancor Communications Inc
    model: ASUS PB258
    serial: G1LMTJ002877
    active workspace: 1 (1)
    special workspace: 0 ()
    reserved: 0 24 0 0
    scale: 1.00
    transform: 0
    focused: no
    dpmsStatus: 1
    vrr: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    availableModes: 2560x1440@59.95Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1920x1080@30.00Hz 1920x1080@29.97Hz 1920x1080@25.00Hz 1920x1080@24.00Hz 1920x1080@23.98Hz 1680x1050@59.88Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@59.90Hz 1280x960@60.00Hz 1280x800@59.91Hz 1152x864@75.00Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1280x720@50.00Hz 1440x576@50.00Hz 1440x576@50.00Hz 1024x768@75.03Hz 1024x768@70.07Hz 1024x768@60.00Hz 1440x480@60.00Hz 1440x480@60.00Hz 1440x480@59.94Hz 1440x480@59.94Hz 832x624@74.55Hz 800x600@75.00Hz 800x600@72.19Hz 800x600@60.32Hz 800x600@56.25Hz 720x576@50.00Hz 720x576@50.00Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@60.00Hz 720x480@59.94Hz 720x480@59.94Hz 720x480@59.94Hz 640x480@75.00Hz 640x480@66.67Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 720x400@70.08Hz

Again, at this point hyprctl dispatch focusmonitor 2 no longer selects that monitor.

How to reproduce

Move monitors using kanshi then try to run a focusmonitor dispatch

Crash reports, logs, images, videos

No response

twiclo commented 6 months ago

Workaround

Configure Kanshi to remap your focusmonitor keymaps after applying a profile

profile home {
    output eDP-1 disable
    output DP-11 position 0,0
    output DP-9 position 2560,0
    exec hyprctl keyword bind SUPER, W, focusmonitor, DP-11
    exec hyprctl keyword bind SUPER, E, focusmonitor, DP-9
}

profile work {
    output eDP-1 disable
    output DP-10 position 0,0
    output DP-13 position 2560,0
    output DP-9 position 5120,0
    exec hyprctl keyword bind SUPER, W, focusmonitor, DP-10
    exec hyprctl keyword bind SUPER, E, focusmonitor, DP-13
    exec hyprctl keyword bind SUPER, R, focusmonitor, DP-9
}

profile work-alt {
    output eDP-1 disable
    output DP-9 position 0,0
    output DP-13 position 2560,0
    output DP-11 position 5120,0
    exec hyprctl keyword bind SUPER, W, focusmonitor, DP-9
    exec hyprctl keyword bind SUPER, E, focusmonitor, DP-13
    exec hyprctl keyword bind SUPER, R, focusmonitor, DP-11
}

profile mobile {
    output eDP-1 enable scale 1.175
}