xmonad 不识别 Spotify Window

xmonad doesnt recognize the Spotify Window

我的 ManageHook 无法识别 Spotify Window,因此我无法将它自动​​移动到我希望打开它的工作区。它可以与其他所有 Window 一起正常工作,除了 Spotify。

这是我的 Managehook:

myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll . concat $
    [ [ isDialog --> doCenterFloat ]
    , [ isFullscreen --> doFullFloat ]
    , [(className =? c <||> title =? c <||> resource =? c) --> doIgnore | c <- bars ]
    , [(className =? c <||> title =? c <||> resource =? c) --> doFloat | c <- float ]
    , [(className =? c <||> title =? c <||> resource =? c) --> doCenterFloat | c <- cfloat ]
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift "0" | c <- ws0 ] -- 0
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 0) | c <- ws1 ] -- i
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 1) | c <- ws2 ] -- ii
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 2) | c <- ws3 ] --iii
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 3) | c <- ws4 ] -- iv
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 4) | c <- ws5 ] -- v
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 5) | c <- ws6 ] -- vi
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 6) | c <- ws7 ] -- vii
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 7) | c <- ws8 ] -- viii
    , [(className =? c <||> title =? c <||> resource =? c) --> doShift (myWorkspaces !! 8) | c <- ws9 ] -- ix
    ]
     where
     bars    = ["dzen2","desktop_window"]
     float   = ["feh","conky_mpd"]
     cfloat  = ["Xmessage","Gxmessage","Eog","xclock"]
            ++ ["SimpleScreenRecorder","Evolution-alarm-notify","Evolution","Gns3","Mtpaint","Calculator","world-clock","wifi-qrcode","agenda-term","arandr"]
            ++ ["xeyes", "pinentry","zoiper","blueman-manager","system-config-printer","Solaar", "nm-connection-editor", "Save File", "Gscreenshot", "qalculate-gtk"]
     ws0     = [""]                             --
     ws1     = [""]               --dev
     ws2     = ["Mozilla Firefox", "Opera", "vivaldi-stable", "min"] --www
     ws3     = ["Spotify"]                             --mus
     ws4     = ["postman"]                             --doc
     ws5     = ["VirtualBox Manager"]           --vbox
     ws6     = ["discord", "zoom", "Mail"]                      --chat
     ws7     = [""]                      --sys
     ws8     = ["mpv", "vlc"]                   --vid
     ws9     = ["Gimp", "Olive", "obs"]                         --gfx
     role    = stringProperty "WM_WINDOW_ROLE" -- example

和 Spotify 的 xprop 输出:

XdndProxy(WINDOW): window id # 0x1c00004
_NET_WM_DESKTOP(CARDINAL) = 0
WM_CLASS(STRING) = "spotify", "Spotify"
WM_NAME(STRING) = "Spotify"
_NET_WM_NAME(UTF8_STRING) = "Spotify"
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified location: 0, 0
_NET_WM_PID(CARDINAL) = 18790
WM_CLIENT_MACHINE(STRING) = "arch-acer"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING

我已经尝试重新编译 xmonad 配置并重新启动,但没有任何改变

有人在 Reddit 上提出了类似问题 here,其中的答案建议使用以下链接。

简而言之,使用DynamicProperty会有所帮助。 已发布如何使用它的具体示例 here