X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; q=dns; s=default; b=B1rJCno1nPWNAD7cJWuKH1Mi94wLu yR8NE/qVzRwQcMowFjiwggYfX4WMi7mOJ/yEbAWBp6PN4Iv4tDyhd5jH8vN/86jX aCPY4vSsZgHwr2DkKENDt7nRz/HVx14AjnnT3lAvDcGvo73WXrkQIqA9xKs9vEZY A6V84AOmy0klcw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:references :in-reply-to:content-type:content-transfer-encoding :mime-version; s=default; bh=6dLkdj0JLQPJgDHWNpm/yKNVlXE=; b=ZtR 3IwgkDP8kY9H7O7bFgVMUWWUCYpT6tOlqmJO7QorLE4+N98MY+P0QBuj/EVGWT9R NhtXa7XQ+vri0lgEJueni5xW58V20YS5NVQFoJ9cJGLwalSe9ZpQm0Spu2Z37TG9 RdqcShmPL1YVE0xLeJ9DtMMMU3mmgd7QftsnHGzU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,MIME_BASE64_BLANKS autolearn=no version=3.3.2 X-HELO: USA7109MR005.ACS-INC.COM From: "Nellis, Kenneth" To: "cygwin AT cygwin DOT com" Subject: RE: how to detect whether a laptop is docked Date: Thu, 27 Aug 2015 14:18:48 +0000 Message-ID: <0D835E9B9CD07F40A48423F80D3B5A702E917DE3@USA7109MB022.na.xerox.net> References: <1440618651 DOT 6808 DOT 33 DOT camel AT cygwin DOT com> In-Reply-To: <1440618651.6808.33.camel@cygwin.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id t7REJ2aq032576 From: Yaakov Selkowitz > On Wed, 2015-08-26 at 19:27 +0000, Nellis, Kenneth wrote: > > I am looking for a method by which I can determine within a shell script > > whether my laptop is docked or not. Google provided some answers for Linux > > and Windows users, but the several ways I tried did not work out. > > > > One Windows solution * provided a VB script that accessed a registry variable ‡, > > but my registry value remains the same whether or not I'm docked. > > > > The Linux solutions required either a file I don't have (/var/run/stab) or a tool > > that I don't have and couldn't find in a Cygwin search (acpid or lsusb). > > lsusb is part the usbutils package, which is currently in Ports. Great! I now have a workable script: lsusb | grep -qi keyboard I found it frustrating figuring out cygports until I found http://www.cygwinports.org/, which clearly told me what to do. I wasn't able to find any reference to cygwinports on the cygwin site. Thank you, Yaakov. ☺ --Ken Nellis