I moved from Windoze to Manjaro last year and am really pleased overall.
However, one feature I would dearly love is that the system disables networking if the user is inactive for a period, and reactivates it when they resume activity (‘activity’ defned as using the keyboard/mouse…)
In my situation there is no value in the laptop having network access while I am away from my desk, and I would rather it is actually disabled while I am not there!
I have searched a lot but not found anything like this…
(On windows, this feature used to be part of ‘Zonealarm’)
I’m afraid you’ve got some strange ideas regarding network functionality. And most likely, your strange ideas are the result of your experience with Microsoft windows.
First and foremost, in Microsoft Windows, network connectivity often is a security concern because of the vulnerabilities of said platform, and its bad design as an operating system. And then there’s the “phoning home”.
UNIX systems are different. There is nothing phoning home, and having the network connection open does not mean that there would be any other network activity going on than a periodic ping from the router to ensure that your machine is still connected.
Also, in Manjaro concretely, there is nothing accepting any incoming network traffic unless you initiate it through a specific type of connection ─ e.g. a browser pulling in a web page, or an email client polling for new emails at a POP3 mail server.
In short, your request doesn’t make any sense, and there is no way to implement what you want, except by suspending or hibernating the system, which halts all processes in the system. And certain desktop environments ─ I can’t speak for all of them ─ do allow for an automatic suspend-to-RAM after a given timeout.
But that said, suspending the network connection only is not possible, nor is it a rational request. Furthermore, if you’re on WiFi, then every sufficiently long enough interruption in network connectivity may cause your DHCP server to issue you with another IP address than the one you had before. And then this in turn could lead to problems with open applications that were still relying on that network availability.
It was trivially easy. For manual network control I set up two custom key commands:
Disable: sudo nmcli networking off
Enable: sudo nmcli networking on
But also as an automatic system I also had a custom script reading when the mouse changed position and clearing a timer. If the timer reached the timeout point (two minutes for me) then it uses the network disable command.