Discussion:
[xmonad] Shift Spotify to the right workspace
Eyal Erez
2018-11-27 19:28:40 UTC
Permalink
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 <*****@gmail.com* <***@gmail.com>*>*

There are 10 types of people, those who know binary and those who don't.
Brandon Allbery
2018-11-27 19:42:03 UTC
Permalink
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.)
Post by 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"
_NET_WM_ICON(CARDINAL) =
WM_CLASS(STRING) = "spotify", "Spotify"
WM_NAME(STRING) = "Spotify"
_NET_WM_NAME(UTF8_STRING) = "Spotify"
_NET_WM_DESKTOP(CARDINAL) = 2
window state: Normal
icon window: 0x0
XdndProxy(WINDOW): window id # 0x4c00002
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?
--
There are 10 types of people, those who know binary and those who don't.
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
--
brandon s allbery kf8nh
***@gmail.com
Loading...