1

On i3 start up I'd like HexChat to automatically start in my fifth workspace.

I know how to edit my config (~/.i3/config) to start HexChat on i3 start up, namely by adding exec hexchat line to it, but that starts it in my first workspace, when I want it started in my fifth workspace (i.e. $workspace5 in my i3 config). Despite this, I want workspace 1 to be the one I'm shown on i3 start up (which is what I'm shown with my current config).

My i3 configs are here and my distribution is openSUSE Tumbleweed.

2

You need to find some criteria that matches your window, then you can configure a workspace for it. I don't know HexChat, so here is an example for xclock. If you run this well-know X11 application, then run xprop and click on the clock window you will get output showing you the window class is XClock:

WM_CLASS(STRING) = "xclock", "XClock"

So in your config you would have

assign [class="^XClock$"] 5
exec --no-startup-id xclock

This matches the class with a regular expression, hence the ^ and $, but in most cases you can be less explicit.

  • Is there a way to get multiple apps to open in multiple different workspaces on start up? This allows HexChat to start in its own workspace, but if I add a few extra apps (with both lines of code you shared copied and tailored to the app, including the class line) that are meant to open each in their own workspace, I end up with a situation wherein they all, except for HexChat, open in workspace 1. Here's my updated config file -- gist.github.com/08b58520ebccec21d18cb4f7bf9a78ac. – BH2017 Nov 5 '18 at 20:16
  • 1
    You need to be careful with the class names, as i3 only uses the 2nd string from the WM_CLASS X11 property, so your assigns are not matching. For example, for xterm it is XTerm. – meuh Nov 5 '18 at 21:43
  • Your methods have really improved my i3 experience mate, tyvm for it. I honestly thought this question would receive no answers, but luckily you found this question and provided a first-class answer. :) – BH2017 Nov 6 '18 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.