You are not logged in.
I want to run a script whenever I connect or disconnect an external monitor from my laptop.
Is there a hook I can create somewhere to achieve this?
Last edited by Bruce Connor (2013-07-16 16:03:03)
Offline
Take a look at srandrd, it does EXACTLY what you want
Just put
srandrd /path/to/scriptin your .xinitrc and you're good to go
Offline
Unfortunately that doesn't seem to be working for me. =/
I've inserted
echo "Action was $SRANDRD_ACTION" >> $HOME/srandrd.outinto the script to attempt some debugging but I get no output. My guess is that the script isn't being run at all.
Last edited by Bruce Connor (2013-07-05 22:14:49)
Offline
And of course, I just decided to try it again and now it works.![]()
Thanks for the tip.
Offline