You are not logged in.
Hello everyone.
Could someone please help me to understand what could be wrong with Spotify application that doesn't allow me to bind it to any of the tags in config.h, this is what I have in the rules
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
{ "Gimp", NULL, NULL, 1<<7, 0, 0, 0, -1 },
{ "Spotify", NULL, NULL, 1<<2, 1, 0, 0, 0 },
};Every single application works as intended and appears in the correct tag. But Spotify seems to ignore the rules and somehow go around it.
Last edited by AcidGod (2020-04-21 21:56:57)
Offline
Ugh: have you thought about fixing the spacing in that file? It is impossible to read...
What is the output from xprop when you hit spotify?
# edit: don't paste all the icon crap at the top, just the name, class, instance at the end of the output.
Last edited by jasonwryan (2020-04-21 21:54:57)
Offline
Ugh: have you thought about fixing the spacing in that file? It is impossible to read...
What is the output from xprop when you hit spotify?
# edit: don't paste all the icon crap at the top, just the name, class, instance at the end of the output.
Sorry for inconvenience just did, unfortunately, tabs in vim are not the same tabs as in browser
Last edited by AcidGod (2020-04-21 21:58:28)
Offline
WM_CLASS(STRING) = "spotify", "Spotify"
WM_NAME(STRING) = "Spotify Premium"
Offline
Sorry for inconvenience just did, unfortunately, tabs in vim are not the same tabs as in browser
Off topic: This is why I only ever use tabs for indent at the start of lines, never for aligning within code. It took me a while to accept this lesson too.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Guys, does anyone know why this might be happening? I have tried a different build of dwm to see if it will work but the result is the same. It opens spotify directly in active tag, rather than the one assign in the rules section.
Last edited by AcidGod (2020-05-01 12:11:34)
Offline
Presumably you have tried changing the case?
Offline
Running xprop on spotify brings:
WM_CLASS(STRING) = "spotify", "Spotify"
WM_NAME(STRING) = "Spotify Premium"Following this format in the config.h:
WM_CLASS(STRING) = instance, class
WM_NAME(STRING) = titleCame out with this:
/* class instance title tags mask isfloating monitor */
{ "Spotify", "spotify", NULL, 1 << 8, 0, -1 },
{ "Spotify", NULL, NULL, 1 << 8, 0, -1 },
{ NULL, "spotify", NULL, 1 << 8, 0, -1 },Tried all three (3) of them individually, not at the same time.
NULL value on title because it always changes when the current playing song changes.
Current behavior: Spotify is opened on the current displayed tag, reloading dwm is the only time it moves to the assigned tag (1 << 8).
Expected behavior: Spotify will open on the assigned tag.
Same behavior as spotify:
WM_CLASS(STRING) = "libreoffice", "libreoffice-writer"Offline
It's possible those programs only set their class hints after the window is mapped. Apparently, DWM only checks these when the window is first mapped. It should be relatively easy to patch DWM to respond to changes in these properties too. Of course, this would mean the windows would appear on screen briefly before they were moved to where they should be.
Last edited by Trilby (2020-12-22 14:29:22)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
It's possible those programs only set their class hints after the window is mapped. Apparently, DWM only checks these when the window is first mapped. It should be relatively easy to patch DWM to respond to changes in these properties too. Of course, this would mean the windows would appear on screen briefly before they were moved to where they should be.
It seems that that is the case indeed. Thanks!
If I was that avid with C I would try doing that patch, but alas, I'm still learning the language and I just switched from i3 just a few days.
Offline
{ NULL, NULL, "LibreOffice", 1 << 8, 0, -1 }, Update: This works for Libre Office, I just found out this week.
Offline