Wifi automatic power-on/off at set times

Hi everyone!
I was trying to auto power-on/off my WIFI connection on Manjaro Gnome at set times (something like some Androids have) but I do not find any solution.
Any hint?
Thank You

Hi @alimurgia,

If you know the command, you could create a systemd timer unit, both for disabling and enabling the device.

I don’t know if this is the best way, or even a good way, but it is

Hope this helps!

You can write a small bash script.
On KDE, you could set an event in KAlarm to run the script to enable/disable it.
You need to schedule nmcli radio wifi off and nmcli radio wifi on

You could use a cron job, or a simple alarm to run a script.

You could also set a timer in your terminal… I don’t use Gnome though.

I would do this:


commands () {
echo WiFi OFF
sleep 1; date +"It's now %R" | cowthink

echo "How long until turning off WiFi?"; read TIME

echo $TIME set!; sleep $TIME; nmcli radio wifi off

export -f commands

konsole -e "bash -c 'commands'"

Make it executable, and drag a shortcut to a panel.
Or, move it to your PATH and call it ‘Timer-WifiOFF’.

You could do a similar script with no timer…

nmcli radio wifi off

Here’s now KAlarm sets my RTCWake to wake up my computer in the morning before my wakeup alarm…

Or combine this :point_up_2: with a systemd timer. They’re quite easy to make.

best solution ever! :slight_smile:

Haha yes, I looked at systemd timers and - well a few steps needed.

Or, perhaps, a slinky GUI :wink:

Or you can do it like I like doing it. Manually creating the file:


It might sound complicated, but it’s actually easier than cron jobs according to me.

…a Gtk GUI :stuck_out_tongue:

Yay - well not quite so GUI as I’d hoped… but I got it sorted.

  1. Created script ~/bin/rtcwake0600.sh
echo MYPASSWORD | sudo -S rtcwake -m no -l -t $(date +%s -d 'tomorrow 0559')
  1. Mkdir and CD ~/.config/systemd/user/


Description=A job to set rtcwake with a systemd timer




Description=Schedule rtcwake every morning

#Execute job if it missed a run due to machine being off
#Run 120 seconds after boot for the first time
#Run every 30 minutes
#File describing job to execute


And because these timers are kind of invisible, I added a conky entry:

rtcwake: ${execi 3500 ~/.local/bin/sudo-rtccheck.sh}

And the script to check and display is:

echo MYPASSWORD | sudo -S rtcwake -m show -l -v |rg alarm: | cut -c 12-30


ROFL quite a bit of messing, and much worse than having a simple option to click the clock - set an alarm/timer, select an option to wake up the machine if it’s off etc… but oddly satisfying :wink:

How did it go with the Wifi?