There are quite a few ways to run tasks automatically after a timer in Linux. But for beginners, a graphical application with easy to use user interface is always preferred.
In this tutorial, I’m going to show you a new app called ‘Time Switch‘. It’s a free and open-source tool built with GTK4 and LibAdwaita, meaning for not only Linux desktop but should also works Linux mobile devices, such as PinePhone.
It follows system color scheme by switching between light and dark automatically, and allows user to set time in both “countdown” and “clock” mode. Meaning user can easily run custom actions in next 100 hours (countdown mode) or 24 hours (clock mode).
Actions include power off, restart and suspend your computer, send notification with any text with or without sound, and run custom command.
Once you click start, it shows you the page with a timer, as well as pause and stop buttons. As it mentions, user can close the app window while timer is still working in the background.
How to Install Time Switch
The application is available to install as universal Flatpak. Linux Mint user can directly search for and install it from Software Manager.
While other Linux need to do following steps one by one to setup Flatpak support and install Time Switch:
- Firstly, press Ctrl+Alt+T on keyboard to open terminal and run command to install the flatpak daemon (Ubuntu only):
sudo apt install flatpak
Other Linux can follow the official setup guide to enable Flatpak support.
- Then, open a terminal window and run command to install the app as Flatpak:
flatpak install https://dl.flathub.org/repo/appstream/io.github.fsobolev.TimeSwitch.flatpakref
After installation, search for and open it from start menu or ‘Activities’ overview depends on your desktop environment and enjoy!
Uninstall Time Switcher
Linux Mint user can remove the application from software manager, while other can open terminal and run the command below to remove it:
flatpak uninstall --delete-data io.github.fsobolev.TimeSwitch
Also remove useless runtime libraries via
flatpak uninstall --unused command.