2

Is it possible to have xrandr at --right-of the screen in workspace1 and --same-as at workspace2? (I'm using openbox)

If you interested why I want to do this:
I'm having a presentation and I need to show my slides at --right-of the screen while at the same time I have access to my slides notes in my own monitor. The other thing is: I need to switch between slides and my IDE, so I can write codes and describe what it does while both me an audience can see what's happening.

2
  • Can you make Openbox's workspace-switching command call xrandr? (I don't think there's another solution: the monitor configuration applies to a display, not to a workspace.) – Gilles 'SO- stop being evil' Nov 29 '15 at 23:32
  • Not perfectly, but it works... – Ravexina Nov 30 '15 at 16:00
1

So I have a simple solution. You can add a key binding to your 'rc.xml' that executes the GoToDesktop command and also execute the xrandr command.

Here is the example for the key combination Windows key + F1 and it switches to desktop one and sets the monitors with --same-as.

<keybind key="W-F1">
    <action name="GoToDesktop"><to>1</to></action>
    <action name="Execute">
      <command>xrandr --output DP1-2 --same-as eDP1</command>
    </action>
</keybind>

Something similar can be done for Desktop two.

Sadly this only works when you press the specific key binding and not when you use another method for switching the desktop/workspace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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