Hi there,
i tried to modify the /usr/lib/acpid/thinkpad_handler script to execute “xrandr --auto” for autodetecting all display’s when pressing Fn+F7. Looking like this
#!/bin/bash
HOTKEY=$1
set $HOTKEY
EVENT=$1 # “ibm/hotkey”
ACPI=$2 # “HOTK”
WHAT=$3 # “00000080”
SERIAL=$4 # “0000100c” Fn+F12
bluetooth
if “$WHAT” = “00000080” -a “$SERIAL” = “00001005” ]; then
ACTION=“disable”
grep -q “disabled” “/proc/acpi/ibm/bluetooth” && ACTION=“enable”
echo $ACTION > “/proc/acpi/ibm/bluetooth”
fi
xrandr
if “$WHAT” = “00000080” -a “$SERIAL” = “00001007” ]; then
xrandr --auto
fi
The coloured lines were added by me. Unfortunately, nothing happens (my deactivated laptop-screen won’t get activated). I added a “echo “Test” > /txt” line to check, if the conditions are fulfilled. “/txt” is created - so keycodes seems to be right. I executed “xrandr --auto” in a “Konsole”-window and my deactivated laptop-screen gets activated. So what did I wrong ?
Regards, user2304.