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

  • From: "Guillaume Maudoux (Layus)" <layus.on@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Tue, 22 Jan 2019 16:10:45 +0100

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 <mailto: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.

Other related posts: