0

I'm trying to auto-start Spotify on workspace 8. I'm currently on Manjaro i3, so i3 was pre-configured pretty well, I only changed the config to have mod+f2 open Firefox. Here's the layout file:

{
    "border": "pixel",
    "current_border_width": 1,
    "floating": "auto_off",
    "geometry": {
       "height": 600,
       "width": 800,
       "x": 0,
       "y": 0
    },
    "name": "Spotify",
    "percent": 1,
    "swallows": [
       {
       "class": "^Spotify$",
       "instance": "^spotify$"
       }
    ],
    "type": "con"
}

and I'm currently loading it with this command:

$ i3-msg "workspace 8; append_layout /home/laurin/.i3/workspace-8.json; workspace 1"

The file is loaded without errors and the placeholder window is opened in workspace 8. However, when I open Spotify, instead of replacing the placeholder it opens a completely new window. How can I make i3 actually replace the placeholder?

1 Answer 1

0

Like the manual states:

Another known issue is with Spotify, which doesn’t set the class hints when mapping the window, meaning you’ll have to use a for_window rule to assign Spotify to a specific workspace.

I.e. place this line inside your ~/.config/i3/config file:

for_window [class="^(?i)spotify$"] move container to workspace 8
2
  • So should I remove my workspace-8.json file? EDIT: I answered it myself. I can remove it. Thanks for the answer, it works perfectly
    – Luna
    Commented Sep 27, 2019 at 8:20
  • Yes, if Spotify is the only application you want to have on workspace 8, there is no need for a layout file.
    – dirdi
    Commented Sep 27, 2019 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .