From nobody Tue Mar 15 15:44:25 2022 X-Original-To: freebsd-x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D9CAD1A2010A for ; Tue, 15 Mar 2022 15:44:33 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KHyQ868gcz4hNq for ; Tue, 15 Mar 2022 15:44:32 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f46.google.com with SMTP id y22so24770856eds.2 for ; Tue, 15 Mar 2022 08:44:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:references:in-reply-to :content-transfer-encoding; bh=5GneRdWPfxTH4LjmRme65kv/UnZwYiLfZ06khuoWkBs=; b=CSJTDufz/rvnBls7XXczoh9EulgVTy83iTTF9+g6eGoCRv+61mRaBQN+a1WTuzqh8r paikIrtnQBf906g3pDQwLRn4itjkQDrrbqv0FZmp7/AYEeC5c4zPa//0TZyS/lNZ8nkB LeGHYlX5EEgGXT8sSAWm97YLZ/PcscvA+lEEy1GE82BYpjofkYe1gpvE8HfzApvRGjWD FHqle0IjmssSzXu7j5ifhUeZ+rWOzRFz6og+yXVbgmtC3X2eRGduUN6/0UeNZIZXoxQW avhLL5Ao1eXkf/KrYLWOg4QaZUhezrcRxSEVFfa/XwTud8PbGJEzycaGluhoXIc+EnoJ 3Z3g== X-Gm-Message-State: AOAM533Oq4R+eVaSHwh9shhAWjBsSDOWBqChbzWg+IVHMJZNL2dn8oLM d/wozSMOvSHYDIta8LojcJAbJlzzJis= X-Google-Smtp-Source: ABdhPJwBbPiUPVP29W73hNoRKVGn7WgPFyIYAHd6fYBF5J95QV3ZQHhV4z4E5W0P/byrbehkD7RCqQ== X-Received: by 2002:aa7:d5d9:0:b0:416:1dd3:7714 with SMTP id d25-20020aa7d5d9000000b004161dd37714mr25808019eds.256.1647359066159; Tue, 15 Mar 2022 08:44:26 -0700 (PDT) Received: from ?IPV6:2a02:8109:9880:1d70:5e5f:67ff:fef4:ffd8? ([2a02:8109:9880:1d70:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id w14-20020a170906d20e00b006cee22553f7sm8300203ejz.213.2022.03.15.08.44.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Mar 2022 08:44:25 -0700 (PDT) Message-ID: <02533a19-d9c6-f824-afa5-bb62199968f3@FreeBSD.org> Date: Tue, 15 Mar 2022 16:44:25 +0100 List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: Dynamic multimonitor setup question Content-Language: en-US From: Mateusz Piotrowski <0mp@FreeBSD.org> To: Milan Obuch , freebsd-x11@freebsd.org References: <20220228093951.30914524@zeta.dino.sk> <20220314101646.0042335c@zeta.dino.sk> <665f28bc-42b5-f862-3211-01b90b070fd4@FreeBSD.org> <20220315120121.45db2c3c@zeta.dino.sk> <20220315140922.3f88c78c@zeta.dino.sk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4KHyQ868gcz4hNq X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.46 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-x11@freebsd.org]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.46:from]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; MLMMJ_DEST(0.00)[freebsd-x11]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.46:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-ThisMailContainsUnwantedMimeParts: N Hey, On 15/03/2022 14:41, Mateusz Piotrowski wrote: > On 15/03/2022 14:09, Milan Obuch wrote: >> On Tue, 15 Mar 2022 12:46:45 +0100 >> Mateusz Piotrowski <0mp@FreeBSD.org> wrote: >>> On 15/03/2022 12:01, Milan Obuch wrote: >> [ snip ] >> >>>> The main problem, however, still remains - action is done not when >>>> cable is being plugged/unplugged, but xrandr or arandr must be >>>> called manually, then intended action occurs. [snip] > > I'd say that you are looking for something like this project: > > https://github.com/phillipberndt/autorandr FYI, I've just committed autorandr to the ports tree: https://www.freshports.org/x11/autorandr/ With autorandr you can first create a couple of profiles as described in the project's readme and then start the autorandr-launcher daemon to have the daemon watch for display connect/disconnect events. The daemon switchs between defined profiles when triggered by an event. Best, Mateusz Piotrowski