Shift Spotify to the right workspace

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Shift Spotify to the right workspace

Eyal Erez
Hi,

I have a workspace called "music" and I'm trying to shift the Spotify linux client there.  I put this as part of my manage hook, but it doesn't seem to work.  Spotify starts up in whatever workspace I happen to be (this works fine for many other apps).

   , className =? "Spotify"        --> doShift "music"
    , className =? "spotify"        --> doShift "music"
    , title     =? "spotify"        --> doShift "music"

Looking at xprop, I see the following:

_NET_WM_ICON(CARDINAL) =
WM_CLASS(STRING) = "spotify", "Spotify"
WM_NAME(STRING) = "Spotify"
_NET_WM_NAME(UTF8_STRING) = "Spotify"
_NET_WM_DESKTOP(CARDINAL) = 2
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
XdndProxy(WINDOW): window id # 0x4c00002
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 0, 0
                window gravity: Static
_NET_WM_PID(CARDINAL) = 8317
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "eyal"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING

Is Spotify not setting something right or not at the right time?


--
Eyal Erez <[hidden email]>

There are 10 types of people, those who know binary and those who don't.


_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
Reply | Threaded
Open this post in threaded view
|

Re: Shift Spotify to the right workspace

Brandon Allbery
IIRC it's a web-based client, so that only gets set after initial load and rendering; before that, it probably identifies as some variety of HTML widget / mini-browser. You'll need http://hackage.haskell.org/package/xmonad-contrib-0.15/docs/XMonad-Hooks-DynamicProperty.html to match it.

(It's actually violating the protocol if it's not setting WM_CLASS properly initially, but any more nobody cares about such things.)

On Tue, Nov 27, 2018 at 2:29 PM Eyal Erez <[hidden email]> wrote:
Hi,

I have a workspace called "music" and I'm trying to shift the Spotify linux client there.  I put this as part of my manage hook, but it doesn't seem to work.  Spotify starts up in whatever workspace I happen to be (this works fine for many other apps).

   , className =? "Spotify"        --> doShift "music"
    , className =? "spotify"        --> doShift "music"
    , title     =? "spotify"        --> doShift "music"

Looking at xprop, I see the following:

_NET_WM_ICON(CARDINAL) =
WM_CLASS(STRING) = "spotify", "Spotify"
WM_NAME(STRING) = "Spotify"
_NET_WM_NAME(UTF8_STRING) = "Spotify"
_NET_WM_DESKTOP(CARDINAL) = 2
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
XdndProxy(WINDOW): window id # 0x4c00002
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 0, 0
                window gravity: Static
_NET_WM_PID(CARDINAL) = 8317
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "eyal"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING

Is Spotify not setting something right or not at the right time?


--
Eyal Erez <[hidden email]>

There are 10 types of people, those who know binary and those who don't.

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad


--
brandon s allbery kf8nh

_______________________________________________
xmonad mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad