You are not logged in.
I'm having trouble getting two or more urxvt's in different spots in openbox. I've edited rc.xml for the first one to put it in the bottom left corner, but how would I add another one to say the upper right corner or somewhere else? Right now I open another one and it just goes on top of the first one, I want it in a different spot. Anyone know how to achieve this?
Offline
You might use different -name options for your urxvts so that you can set up different application rules in your rc.xml.
Maybe write a frontend that figures out which of your urxvts is already running (using "wmctrl -l" or "xdotool search") and start the next urxvt in the next free place. (e.g. use names like "urxvt_top_left" "urxvt_bottom_left" etc...)
Offline
How would I name them then and how would I specifiy what name to position in rc.xml?
Offline
Put this in your rc.xml:
<application name="urxvt_top_left" class="URxvt">
<decor>no</decor>
<position><x>0</x><y>0</y></position>
</application>
<application name="urxvt_top_right" class="URxvt">
<decor>no</decor>
<position><x>527</x><y>0</y></position>
</application>
<application name="urxvt_bottom_left" class="URxvt">
<decor>no</decor>
<position><x>0</x><y>451</y></position>
</application>
<application name="urxvt_bottom_right" class="URxvt">
<decor>no</decor>
<position><x>527</x><y>451</y></position>
</application>Adjust the postitions to your urxvt size... Now you can run
urxvt -name urxvt_bottom_rightTo start the urxvt in the bottom right corner. Since this is not too convenient, you can use the following script as a frontend for launching your urxvts:
#!/bin/sh
NAMES=(urxvt_top_left urxvt_top_right urxvt_bottom_left urxvt_bottom_right)
NEXT=0
for NAME in ${NAMES[@]}; do
if [ "$(xdotool search --name $NAME)" != "" ]; then
let NEXT++
fi
done
if [ $NEXT -lt ${#NAMES[@]} ]; then
NAME=${NAMES[$NEXT]}
else
NAME="urxvt"
fi
echo "starting urxvt -name $NAME"
urxvt -name $NAME &It will start a urxvt in the next free position by using the appropriate -name option. If all slots are taken it just starts urxvt with the default name ("urxvt"). The script requires xdotool, which is available in the community repo...
As far as I see it there's no way to do this otherwise in openbox, but i may be mistaken...
Offline
If you want these terminals to start for every session, you can also use urxvt's -geometry option, and run them all from ~/.config/openbox/autostart.sh, or even ~/.xinitrc
Offline
Thanks, I'll give this a try when I get back home. Thanks for that piece of code and the explanation.
Offline