I would like to have an alias command in my .bashrc that could be ran at startup. That states: If computer is inactive for X minutes then turn off wifi. How would I do that?I am currently using netctl as my network manager. I already have an alias for turning my wifi off: alias woff='sudo netctl stop network'But I'm not sure how I would do the if-then statement in my bashrc.
Cron job  If computer inactive for x minutes turn wifi off
wifi;cron;monitoring;screensaver