Hi
I have little problem: I want to run on startup (and only on startup) few xterms (ie with 'cd /tmp', 'ls' etc commands) and each of them in different tag. Because after startup I want to run xterm in current tag, resolving this problem with awful.rules.rules table isn't a good way (or easy).
I try sth like this in the end of my rc.lua:
Code:
awful.tag.viewonly(tags[1][1])
awful.util.spawn_with_shell("xterm -e cmatrix")
os.execute("sleep 2")
awful.tag.viewonly(tags[1][2])
awful.util.spawn_with_shell("xterm -e 'cd /tmp && /bin/bash'")
But both xterms run in second tag. I put sleep because I thought that tags are changing so fast that "xterm -e cmatrix" is finish executing after change to second tag. But after restart awesome its only hang for 2 sec and run both xterms in second tag.
awful.util.spawn_with_shell() function has second argument to determine on which screen run command, but not on which tag.