You are not logged in.
Hi, I'm new to Arch and I'm using the awesome window manager, I have set up rules in the rc.lua that force programs to run in a certain tag. I have been trying to do this for command line programs like weechat, so that for example weechat only runs in tag 7. but I have not been able to do this. is it possible to setup rules for command line programs? if so how do I do it?
Last edited by ictoancb (2011-06-21 12:42:49)
Offline
You can use the window properties: https://awesome.naquadah.org/wiki/FAQ#H … tifiers.3F
Offline
Also, all your command-line 'programs' actually appear to awesome to be instances of whatever terminal you're using. So you'd probably better define them based on terminal name.
Or you could just use tmux/screen and keep the whole terminal maximized.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
So the only way to do it is to setup the rule for the terminal?
Offline
In a manner of speaking, yes. A rule for the specific instance of the terminal, eg., launching urxvt -title weechat etc...
Offline
Thanks. What I wanted to do was to have different terminal based programs forced to different tags, but the only way to do that I think would be to use a different terminal for each program and then setup the rules for each individual terminal. Which doesn't quite work how I wanted. But thanks for the quick replies and the help.
Last edited by ictoancb (2011-06-21 03:12:14)
Offline
If I understand you correctly, you can have a rule for, eg,
urxvtc -title weechat --> tag 1
urxvtc -title mutt --> tag 2
urxvtc -title vifm --> tag 3
etc...
Offline
Thanks. What I wanted to do was to have different terminal based programs forced to different tags, but the only way to do that I think would be to use a different terminal for each program and then setup the rules for each individual terminal. Which doesn't quite work how I wanted. But thanks for the quick replies and the help.
Unless you're using a terminal emulator there's no other way than to have one or more different terminal for each application, is there?
Here's what I'd do:
.bashrc:
alias irssi="urxvt -name irssi -e irssi"
rc.lua
awful.key({modkey}, "a", function () exec ("urxvt -name irssi -e irssi") end),
[...]
{ rule = { name = "irssi" },
properties = { tag = tags[1][1], switchtotag = true }
},
Now, whenever you press Mod4+A or type irssi in your terminal a urxvt instance with irssi will get spawned on tag 1 of screen 1.
Personally, I'd use run or raise instead of a normal keybind.
awful.key({modkey}, "a", function () run_or_raise("urxvt -name irssi -e irssi", { instance = "irssi" }) end),
P.S.: Run-or-raise will look if there's already a window with the instance "irssi" and raise it, before spawning a new one, so you don't end up with multiple irssi instances.
Last edited by demian (2011-06-21 11:57:08)
no place like /home
github
Offline
Thanks demian that worked.
Offline