This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: how to detect whether a laptop is docked
- From: "Nellis, Kenneth" <Kenneth dot Nellis at xerox dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 27 Aug 2015 14:18:48 +0000
- Subject: RE: how to detect whether a laptop is docked
- Authentication-results: sourceware.org; auth=none
- References: <1440618651 dot 6808 dot 33 dot camel at cygwin dot com>
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