You are not logged in.
Hi,
I often open two or three aterms in fluxbox, and I want to get these to start at fixed places on the desktop. In the apps file of fluxbox I set dimensions for aterm, but it cannot handle multiple instances of aterm. The second is placed exactly on top of the first, just as the third, the fourth, etc.
Is it somehow possible to distinguish between the first, the second, the third (etc) instances of aterm and make it start at fixed places on the desktop?
Thanks!
Rogier
Offline
Not sure about "aterm" but when I launch urxvt I can give it a name, e.g. urxvt -name term1" . That should do it?
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
This is possible with the aterm option -title too. But the problem is that, when setting titles or names, you have to launch aterm differently each time. In a fluxbox menu, this means that I have to have different commands, aterm-1, aterm-2, aterm-3, aterm-4 (or something). I would like to have this automated, so that I only have 1 command in the menu.
Offline
It can be done with the help of xdotool:
#!/bin/bash
names=('aterm-1' 'aterm-2' 'aterm-3' 'aterm-4')
term=aterm
for n in "${names[@]}"; do
if ! xdotool search --name "$n" 2>&1 >/dev/null; then
exec "$term" -title "$n"
fi
done
exec "$term"But, in my opinion, it is better to use the window classname. This second version uses urxvt:
#!/bin/bash
names=('aterm-1' 'aterm-2' 'aterm-3' 'aterm-4')
term=urxvt
for n in "${names[@]}"; do
if ! xdotool search --classname "$n" 2>&1 >/dev/null; then
exec "$term" -name "$n"
fi
done
exec "$term"Offline