[xmonad] Shift Spotify to the right workspace

Brandon Allbery allbery.b at gmail.com
Tue Nov 27 19:42:03 UTC 2018


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 <oneself at gmail.com> 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 <**oneself at gmail.com* <oneself at gmail.com>*>*
>
> There are 10 types of people, those who know binary and those who don't.
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
>


-- 
brandon s allbery kf8nh
allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20181127/c960ff7c/attachment.html>


More information about the xmonad mailing list