public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Michael Enright <mike@kmcardiff.com>
To: cygwin@cygwin.com
Subject: Re: how to detect whether a laptop is docked
Date: Wed, 26 Aug 2015 22:16:00 -0000	[thread overview]
Message-ID: <CAOC2fq9treK2Qt45723-=hyqrG3ftZJPQq+1i-bq+Drb8fYcuQ@mail.gmail.com> (raw)
In-Reply-To: <1440618651.6808.33.camel@cygwin.com>

On Wed, Aug 26, 2015 at 12:50 PM, Yaakov Selkowitz wrote:
> 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).
>

If you cat the path to the registry key it doesn't show anything but
if you hexdump it there is a '1' (in my case, 2 out of 2 systems)
stored as a DWORD I suppose. I think that value is wrong for at least
one of those (a docked laptop or a VM in a PC). I got the impression
the feature is not 100% solid.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2015-08-26 20:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 20:59 Nellis, Kenneth
2015-08-26 21:11 ` Yaakov Selkowitz
2015-08-26 22:16   ` Michael Enright [this message]
2015-08-27 15:45   ` Nellis, Kenneth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOC2fq9treK2Qt45723-=hyqrG3ftZJPQq+1i-bq+Drb8fYcuQ@mail.gmail.com' \
    --to=mike@kmcardiff.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).