Repository URL to install this package:
|
Version:
0.4.8-1 ▾
|
#!/bin/bash
KEYBOARD_ID="0483:0010"
WAS_CONNECTED=0
de="$(echo $XDG_CURRENT_DESKTOP | grep -ioh gnome | awk '{ print tolower($0) }')"
case "$de" in
gnome)
echo "GNOME";
while true; do
if lsusb | grep -q "$KEYBOARD_ID"; then
if [ "$WAS_CONNECTED" -eq 0 ]; then
WAS_CONNECTED=1
sleep 0.5
gnome-randr --output eDP-1 --rotate normal
fi
else
WAS_CONNECTED=0
fi
sleep 1
done
;;
esac