You are not logged in.
Pages: 1
Hi there,
Is there any way I can start multiple terminal programs using Awesome WM?
I'd like to start htop, alsamixer, cmatrix, irssi, moc and xfce-4 terminal. So essentially I'd like to start six alternate versions of xfce4-terminal on startup.
Offline
Offline
Thank you very much. I'll give it a go and let you know how I get on.
Offline
I installed it from the official repositories but could not find the configuration files in ~/.tmux.conf,a /etc/tmux.conf or /usr/share/tmux/. I re-installed through yaourt (installing the git version) and have the same issue.
Edit:
Sorry for the double post.
Last edited by Gwynplaine (2014-11-14 02:19:43)
Offline
You create ~/.tmux.conf yourself.
Offline
Wait, what? Do you WANT to use tmux? You didn't say anything about tmux in your original post... Everything you want to do in your original post can be done without tmux.
Terminal emulators come with a standard command line option: "-e" It will execute a command. When the command ends, it will close the window.
xfce4-terminal -e alsamixer
Does that do what you need?
As for your other question, you have to create the tmux configuration files yourself.
Offline
Wait, what? Do you WANT to use tmux?
That is a rhetorical question, right, Dr C? Of course OP wants tmux. It's like asking someone if they want Vim...
Offline
Wait, what? Do you WANT to use tmux? You didn't say anything about tmux in your original post...
I didn't know it existed until Jasonwryan's post.
Terminal emulators come with a standard command line option: "-e" It will execute a command. When the command ends, it will close the window.
xfce4-terminal -e alsamixer
Does that do what you need?
This does do what I wanted, but the issue is that I need to call it in rc.lua for Awesome WM. What I have is this:
-- {{{
--Autostart Programs
awful.util.spawn_with_shell("xfce4-terminal -e htop")
awful.util.spawn_with_shell("xfce4-terminal -e cmatrix")
...
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "xfce4-terminal" },
properties = { tag = tags[1][5] } },
...
--}}}
This works fine, but I want three programs to open in one tag, and the other three in another tag.
Is there a way I can change the WM_CLASS(STRING) for each version of xfce4-terminal? Or would it be better to use Tmux?
Offline
Is there a way I can change the WM_CLASS(STRING) for each version of xfce4-terminal? Or would it be better to use Tmux?
While I am a fan of tmux, I'd suggest not bothering with it (yet). Tmux will not help you with your current goals.
With most terminal emulators you can set the resource class name, but I just checked the xfce4-terminal man page and I didn't see such an option. Are you sold on using xfce4-terminal, or would urxvt suffice?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm willing to use other terminals. I've just been using xfce4-terminal for a number of years.
I'll check out the one you just mentioned.
Edit:
It'll probably take me a long time to customise this and get this up and running.
Looking through the arch wiki though, I can't see anything regarding setting the window class?
Last edited by Gwynplaine (2014-11-14 03:29:54)
Offline
That is a rhetorical question, right, Dr C? Of course OP wants tmux. It's like asking someone if they want Vim...
You know, I really can't argue with either of those points.
...Although maybe not Arch Linux and Vim and tmux all at once. I mean, sure, I want a cake, a pie, brownies, and chocolate chip cookies, but not all in one evening. Just one at a time, little by little.
Offline
So I'm trying to work this out. I've read this page https://wiki.archlinux.org/index.php/X_resources and understand how to change the resource class of the terminal, but how do I give different terminals different resource classes?
Offline
https://bbs.archlinux.org/viewtopic.php?id=83663
Does this answer your question?
Offline
You wouldn't want to set it in the Xresources file, you'd want to set it on the command line. This is what I was the ability I was referring to that I think xfce4-terminal lacks. Several other terminals (including urxvt) can have these options selected on the command line, so you could do something like the following (note I don't use awesome, I'm just revising your previously posted excerpt - particulalry I don't know why "tags" is a 2-d array, and I don't know which index should change):
-- {{{
--Autostart Programs
awful.util.spawn_with_shell("urxvt -name awesomeTag1 -e htop")
awful.util.spawn_with_shell("urxvt -name awesomeTag2 -e cmatrix")
...
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "awesomeTag1" },
properties = { tag = tags[1][5] } },
{ rule = { class = "awesomeTag2" },
properties = { tag = tags[2][5] } },
...
--}}}
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
tmux would kill here: autostart all your programs in two named tmux sessions, and send the respective tmux sessions to the awesome tags you want...
It also means you only have to edit your tmux.conf to add new programs to either session.
Don't listen to the others, they are lying: YOU WANT TMUX!!*
*Use my referral code, jwr, when installing for a 10% discount. ACT NAOW!
Offline
Hi everyone.
I now have multiple terminal programs running using urxvt -name, which works great. However, I can't get them to shift to different tags. I've tried quite a few different methods, but I can't seem to get it working.
Using xprop I can determine that the window class is (using ranger as an example) is:
WM_COMMAND(STRING) = { "urxvt", "-name", "RANGER", "-e", "ranger" }
but in the rules section, I've tried multiple variations and nothing seems to work.
-- {{{
--Autostart Programs
awful.util.spawn_with_shell("urxvt -name HTOP -e htop")
awful.util.spawn_with_shell("urxvt -name RANGER -e ranger")
awful.util.spawn_with_shell("urxvt -name CMATRIX -e cmatrix")
--awful.util.spawn_with_shell("urxvt")
--awful.util.spawn_with_shell("")
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "HTOP" },
properties = { tag = tags[1][4] } },
{ rule = { class = "urxvt -name RANGER -e ranger" },
properties = { tag = tags[1][4] } },
{ rule = { class = "urxvt", "-name", "CMATRIX", "-e", "cmatrix" },
properties = { tag = tags[1][4] } },
...
-- }}}
Also, Trilby with Awesome WM tag essentially refers to a virtual desktop. With regards to the 2-D array, I believe the first digit refers to the monitor but the second refers to the tag you want to place it in.
Edit:
I think I will give Tmux a go. It does seem incredibly useful.
Last edited by Gwynplaine (2014-11-14 20:15:51)
Offline
In dwm (Awesome's superior precursor ), I use titles:
{ "urxvtc", "-title", "mutt", "-e", "mutt", NULL };
Offline
Pages: 1