[i3-discuss] Re: Mirror display across two monitors

  • From: cornerman <cornerman@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Wed, 23 Jan 2019 18:07:28 +0100

Hi,

I have found this automirror tool very useful for presentations (https://github.com/schlomo/automirror):

"automirror automatically configures the attached monitors in a mirror configuration that is optimized for the primary display and makes all other outputs scale to that."

So, you can just run `automirror HDMI3`. Then, it will mirror the screen on all monitors, while automatically choosing the native resolution of HDMI3 and using scaling to fit it on all other attached monitors.

For me, starting a presentation is just running automirror and everything is setup.

Have fun
Johannes

On 1/23/19 5:50 PM, Jeff Jibson (Redacted sender jeff for DMARC) wrote:

I have a small shell script that I use for dealing with multiple monitors:

#!/bin/bash

LAPTOP_OUTPUT='LVDS-1'
LAPTOP_MODE='1366x768'

MONITOR_OUTPUT="$(xrandr | grep ' connected' | grep -v $LAPTOP_OUTPUT | cut
-f1 -d' ')"
MONITOR_MODE="$(xrandr | grep -A1 """$MONITOR_OUTPUT connected""" | tail -1
| cut -f4 -d' ')"

# Initialize X and Daemons
if [ $MONITOR_OUTPUT ] ; then
   xrandr --output $LAPTOP_OUTPUT  --mode $LAPTOP_MODE  --primary \
          --output $MONITOR_OUTPUT --mode $MONITOR_MODE --right-of
$LAPTOP_OUTPUT
#         --output $MONITOR_OUTPUT --mode $MONITOR_MODE --above
$LAPTOP_OUTPUT
fi


On Wed, Jan 23, 2019 at 9:45 AM Jeff Abrahamson <jeff@xxxxxx> wrote:

I'm afraid the only reliable technique I've found is to logout and login
again.  Neither xrandr --output --auto nor arandr reliably do the right
thing for me, though they often do with some fiddling.

This is usually viewed as a "not i3" issue, which, while technically
correct, of course doesn't address the point you make that coming from many
other environments this is automatic and so we don't see it.

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/http://transport-nantes.com/


On 23/01/2019 17:40, Luí­s Moreira de Sousa (Redacted sender luis.de.sousa
for DMARC) wrote:

Hi all,

thank you all for the replies. I often connect my laptop to monitors or
beamers I haven't connected before. Using the methods suggested below, I
would need to use xrandr to identify the monitor name and resolution and
then issue the right command to mirror. This is a bit of an overkill. I am
coming from Unity, and in that DE all of that is done automatically by the
Settings application. Isn't there some similar application for i3?

Thank you.

--
Luís

Sent with ProtonMail <https://protonmail.com> Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, 22 January 2019 16:10, Guillaume Maudoux (Layus)
<layus.on@xxxxxxxxx> <layus.on@xxxxxxxxx> wrote:

May I suggest using arandr in a first step. This gives a good GUI to
understand what theses xrandr commands do.

You will see that to mirror displays you need to overlap them in arandr,
and set them to the same resolution.

Afterwards, you can write tailored xrandr bindings for your preffered
setups.

-- Layus.
On 21/01/19 20:43, Matt Ball wrote:

I typically use xrandr to switch configurations, and then bind each
configuration to a shortcut.  Examples:

# Turn on just one screen:
bindsym $mod+comma exec "xrandr --output eDP1 --off --output DP1 --auto"

bindsym $mod+Control+comma exec "xrandr --output eDP1 --auto --output DP1
--mode 1920x1080"

# Select a particular resolution
bindsym $mod+period exec "xrandr --fb 1920x1080 --output eDP1 --mode
1920x1080"

# This will automatically activate all monitors
bindsym $mod+slash exec "xrandr --auto"

Make sure to replace eDP1, DP1, or HDMI3 with the actual monitor names
returned by xrandr.

One issue I run into is that if I have my laptop docked with a main
monitor on and the laptop monitor off, if the laptop is locked and I undock
it, the screensaver doesn't turn the laptop monitor on, so I have to unlock
it with no visual feedback.

On Mon, Jan 21, 2019 at 12:10 PM Luí­s Moreira de Sousa <
dmarc-noreply@xxxxxxxxxxxxx> wrote:

Hi all,

I would like to mirror the screen of a laptop with an external monitor,
for instance to have a presentation. In other DEs this is usually provided
by an Fn key combination, but i3 ignores such signals. And is it possible
to complete switch off one of the monitors?

Thank you.

--
Luís

Sent with ProtonMail <https://protonmail.com> Secure Email.


--

Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255
http://p27.eu/jeff/http://transport-nantes.com/




Other related posts: