tyrannical icon indicating copy to clipboard operation
tyrannical copied to clipboard

Matching errors until restart

Open Wonskcalb opened this issue 8 years ago • 4 comments

Hello there !

I have a curious behaviour with tyrannical and Spotify, I have a matching rule for Spotify but on start, it is never matched to any tag (Pops into a N/A tab) but if and only if I restart Awesome (without killing spotify) then it will be matched on the correct tag.

Here's my tag.lua file where all the magic happens and here is the xprop output for Spotify Spotify.prop.txt

     {
        name      = "media",
        layout    = awful.layout.suit.fair,
        exclusive = true,
        init      = false,
        volatile  = true,
        screen    = {1,2},
        class     = {"vlc", "spotify", "Spotify"}
    },

Wonskcalb avatar Sep 27 '16 12:09 Wonskcalb

Maybe it changes xprop tag after some time while initializing? I had something like that with WebStorm

slavaGanzin avatar Sep 27 '16 13:09 slavaGanzin

I have a similar issue with libreoffice where the class prop changes, but I don't know if I could check the xprop tag at some point in the startup process of Spotify

Wonskcalb avatar Oct 09 '16 21:10 Wonskcalb

You can use Awesome "manage" signal and print it in a notification

Elv13 avatar Oct 09 '16 22:10 Elv13

Well @slavaGanzin you were right. Thanks @Elv13 btw for the tip : apparently they do not set the client class prop right away. I did a basic

    preset = naughty.config.presets.debug,
    name = "Client class name",
    text c..class })

and all I have for Spotify is an empty notif, whereas for every other app opened, it works just fine

EDIT : Quick update: Spotify uses CEF which sets WM_NAME and WM_CLASS too late. I found on github a library (spotifywm) to help out this problem, thanks to the Spotify Community. Just added an awful.rule to give the client a class to be matched.

Wonskcalb avatar Feb 28 '17 21:02 Wonskcalb