2

I would like to have my awesome WM to add items to the tasklist the same way as other window managers. Basically when you open applications in awesome it will put it in the tasklist preceding the previous application.

For example, if you open xterm, gvim and firefox in that order, on the tasklist will appear first firefox, then gvim and finally xterm.

The mayority of window managers like Gnome and KDE will add items in the same order as they are open.

Is it possible to achieve this behaviour in AWESOME?

Thank you.

milarepa
  • 759
  • 9
  • 28

3 Answers3

2

I need to add rule:

{ rule = { }, properties = { }, callback = awful.client.setslave }

milarepa
  • 759
  • 9
  • 28
2

You need to change the handler function tasklist_update in this file:

~/.config/awesome/awful/widget/tasklist.lua

Find table.insert(clients, c) and replace it with table.insert(clients, 1, c).

ccjmne
  • 9,333
  • 3
  • 47
  • 62
Faiver
  • 21
  • 2
  • That's just a representation of the tasks in the task list, but their indexes are still in the order of their opening, so if you want to Super-Tab them - you'll need to apply same order to the clients on every Super-Tab press. – KhaimovMR Jul 17 '19 at 10:19
1

Faiver's solution solve the problem. However tasklist.lua won't show up in ~/.config/awesome dir by default.

At least in recent awesome package, this file will appear in /usr/share/awesome/lib/awful/widget/tasklist.lua. You may copy it to you ~/.config/awesome/awful/widget/ dir.

You may look it up: https://apps.fedoraproject.org/packages/awesome/ & http://packages.ubuntu.com/trusty/amd64/awesome/filelist

jack
  • 76
  • 5