This plugin will set your status to away if you detach your screen.
You only have to load the plugin.
/load screen_detach
Replace
Send delayed
Enter search terms or a module, class or function name.