Hans Martin 5b70226dc3 mini | 5 yıl önce | |
---|---|---|
README.md | 5 yıl önce | |
tdock.sh | 5 yıl önce |
ThinkPad + Linux + Docking Station = 💔
ThinkPad + Linux + Docking Station + tdock = 🧡
Support ACPI event triggers when un-/docking a lenovo thinkpad
tdock.sh <install|uninstall|config|isdocked>
install
& uninstall
to install/uninstall the acpi event hooksconfig
to list the configured scriptsisdocked
returns '1' if the laptop is currently docked, '0' if notClone the repo
git clone https://git.swrzm.de/msc/tdock.sh
Add the executable to the $PATH variable (for the event actions)
Install the hooks & generate sample config
tdock.sh install
To uninstall the hooks again:
tdock.sh uninstall
To setup the scripts that should be executed on the un-/docking events, use the $HOME/.config/tdock/tdock.conf
configuration file.
Set it up with the following two lines and replace the paths to the scripts you want to have executed:
docked:/path/to/docked/script.sh
undocked:/path/to/undocked/script.sh
chmod +x
)Important: The un-/docking ACPI events can change from model to mode.
to change the event-code, the two variables can be changed in the tdock.sh
script as seen below:
# event-codes
event_ondock="ibm/hotkey LEN0268:00 00000080 00006030"
event_onundock="ibm/hotkey LEN0268:00 00000080 00004010"
To get the correct event-codes, proceed like following:
acpi_listen
ibm/hotkey LEN0???:00