I have several monitoring applications that we would like to project using a projector in the IT area of our office.

One of the apps is a Java application (so auto switching tabs in a browser will not work).

Is there a way to auto switch between workspaces at a timed interval?

OR

Is there a way to switch between full screen apps on 1 workspace?

share|improve this question

This can be achieved using xdotool:

sudo apt-get install xdotool

Use a script something like this to send the workspace switching keyboard shortcuts, assuming Unity workspace layout:

#!/bin/sh

while true
    do xdotool key ctrl+alt+Right
    sleep 5
    xdotool key ctrl+alt+Down
    sleep 5
    xdotool key ctrl+alt+Left
    sleep 5
    xdotool key ctrl+alt+Up
    sleep 5
done
share|improve this answer

This can also be achieved using wmctrl:

sudo apt-get install wmctrl

Script for wmctrl:

#!/bin/sh

while true
    do wmctrl -s 0
    sleep 5
    wmctrl -s 1
    sleep 5
    wmctrl -s 2
    sleep 5
    wmctrl -s 3
    sleep 5
done

wmctrl is a more elegant solution; it sends messages to the window manager and can do other things like move windows to a specific workspace or raise them which may also be useful to you. However, the window manager is free to ignore these messages so it is perhaps not the most portable solution.

wmctrl's -a option is the most suitable for your use: it will switch to the correct workspace and then raise the window. This avoids having to keep the windows on the correct workspaces, not minimized, and not obscured by other windows etc.

share|improve this answer
1  
Can I use it on a single monitor? – dierre Nov 25 '15 at 17:48
    
Yes. I use it on a single monitor. – Paulo Dec 28 '17 at 17:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.