awesome-wm: binding programs to workspaces

Could you please suggest some simple method of binding certain programs/windows to their own workspaces? E. g. firefox is always to be started on workspace 1, chromium - workspace 2, terminal - workspace 3 etc.

Thank you!


You can use Awesome native rules:

awful.rules.rules = {
  { rule = { class = "Firefox" },
  properties = { tag = tags[1][1] , switchtotag=true } },
  { rule = { class = "Chromium" },
  properties = { tag = tags[1][2] , switchtotag=true } },
  { rule = { class = "Terminal" },
  properties = { tag = tags[1][3] , switchtotag=true } },
}

You can confirm class names with wmctrl -lx.


I would recommend using Shifty:

Shifty is an Awesome 3 extension that implements dynamic tagging. It also implements a client matching configuration that simplifies tag-client matching. Here are a few ways of how shifty makes awesome awesomer:

  • On-the-fly tag creation and disposal
  • Advanced client matching
  • Easy moving of clients between tags
  • Tag add/rename prompt in taglist completion
  • Reordering tags and configurable positioning
  • Tag name guessing, automagic no-config client grouping
  • Customizable keybindings per client and tag
  • Simple yet powerful configuration