Question:

Help with window manager replace script for gaming?

by  |  earlier

0 LIKES UnLike

So ok, when i start cedega on my system, i need to switch window managers from compiz to metacity. So far here is what i got:

#!/bin/bash

metacity --replace

cedega

that switches wm's and runs cedega i think, then im stuck

i need to find some way of letting bash know that when cedega is closed, its needs to switch back to compiz

 Tags:

   Report

1 ANSWERS


  1. You should just be able to add another line to your bash script:

    #!/bin/bash

    metacity --replace

    cedega

    compiz-tray-icon

    I grabbed that command off the Ubuntu installation guide, so of course, YMMV. I would have thought it was just 'compiz', go figure.

    When each command exits, bash will run the next one. Technically, you can do things like:

    echo "cat" && cal

    This mean that if 'echo "cat"' is successful, then run cal. Kinda pointless, but if you have a command that shouldn't run if something fails, then this is a useful construct. As an example of something that won't:

    false && cal

    if you 'man false' it says that it "do[es] nothing, unsuccessfully."

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions