This is the mail archive of the
cygwin
mailing list for the Cygwin project.
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: Wed, 26 Aug 2015 19:27:46 +0000
- Subject: how to detect whether a laptop is docked
- Authentication-results: sourceware.org; auth=none
Dear Cygwin Users:
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).
* https://www.autoitscript.com/forum/topic/147332-how-do-you-detect-a-docking-station/
‡ /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/IDConfigDB/CurrentDockInfo/DockingState
--Ken Nellis
--
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