Tuxtimer – Integratable terminal stopwatch

In the last few days, schitzu and I wrote a new stopwatch script in Bash. It simply prints ongoing time in hours, minutes and seconds format. Running the same script again in a separate process, pauses the timer. Running ./sw --stop resets it. The output format is in Json, so you can use it in third-party apps.

Stopwatch module in Waybar

Personally I use this module in the Wayland statusbar Waybar as a custom module. The configuration part will look like this:

"custom/stopwatch": {
    "format": "   {} ",
    "exec": "~/.config/waybar/sw",
    "on-click": "~/.config/waybar/sw",
    "on-click-right": "~/.config/waybar/sw --stop",
    "return-type": "json"

You have to adapt the paths to the executable script above. The stopwatch script itself is available here inside my NixOS configuration repository.

💬 Are you interested in our work or have some questions? Join us in our public Signal chat pi crew 👋
🪙 If you like our work or want to supprot us, you can donate MobileCoins to our address.

Leave a Reply

Your email address will not be published. Required fields are marked *