X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4089B3851ABB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1692336445; bh=kHCRQF57PRUKWApPLJpkOLaOB2GWY3OLoNS8bVRgrjk=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=oK4Oz2lqa4Rp12FGgkowWkpck1N+W+owHxW1dQak/4zf/I3EFVbrVYVlkOh1RWM7z GXbTuNW/kdDla2meIOP6GaqUEmilTo4DjKzy/fwVARkKSRPgmBLCZAwM3AULazvCDz WIr5tf3Sy7qntswK5lPxfrnGAWchkseIKqtkTPiQ= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 91D203858296 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692336406; x=1692941206; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DNex/6hANGyyKrRKHnY+Noe/QeD9VEgplk39coCU5FQ=; b=id0DJi+wi4J95wQrPe9b1BQbxnEYcBOY23E396+VNTD1acoVrLgKk0Vl6T9Glt5spS yBsjY8gHVDcgU9lp9cWylqsPogkW3VPEJLvMDdvq51Q2NieSm5er7qEhHnotTkcbukza ES04MnYoMIxuLXF8S0me+H+rb7K9PHT6609eGHeMZJ03OGhhG9EVBFXhpWKrEbTj5MKp Jbl/wGmt3ZWTie4/frM6g5lm6cyJ4pKhnxjNnex4b9jxEDVQwL/wQAedKGPVv/CeJB9y GCyb7EJIvxWdiJVnvZD1G6yDYaqC6yXu2zqdDAX/CFvI7s5dXjb0uu8/1x2kdKPHjx8x MoaA== X-Gm-Message-State: AOJu0Yx77apt2xXPIEPfhSPiyWFdbrfDCaYBxs+9gKENRy04Snb4gixh Cg6c+5mp84jswQiRaXxNwQPwdpkIrWb/F60unf2wPggKqwc= X-Google-Smtp-Source: AGHT+IFORGgDWlphFTH2gXx5YZwx72tI3jqlgkA7hOBworqtmgTiXAn/7HEIskm5+r+vX3gJBYz6i2xaGC022iJTgq8= X-Received: by 2002:a17:907:7792:b0:99c:3b4:940c with SMTP id ky18-20020a170907779200b0099c03b4940cmr1084600ejc.7.1692336405724; Thu, 17 Aug 2023 22:26:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 17 Aug 2023 22:26:34 -0700 Message-ID: Subject: Re: Cygwin console: Different default background color when terminal runs as Admin? To: "[Cygwin]" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Jonathon Merz via Cygwin Reply-To: Jonathon Merz Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 37I5RQ4L000416 On Thu, Aug 17, 2023 at 7:13 PM Martin Wege via Cygwin wrote: > Just an idea: Could the default background color of the Cygwin console > be changed from black to grey (or RED) if the terminal has been > started with Administrator rights? > Assuming that: 1. The Administrators group is called "Administrators" 2. There aren't any non-administrative groups with "Administrators" in the name 3. You're using mintty for your terminal You can run the following in bash or zsh with the desired RGB values: if [[ `id -Gn` == *Administrators* ]] then echo -ne "\e]11;#FFBBEE\a"; fi -Jonathon -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple