Hey there, fellow clicking enthusiasts!
Today, I want to share this little trick I found out to make life a bit easier with Takt on macOS. If you’re like me and want a convenient button to check in and out of work while also seeing useful info about your hours, you’re in for a treat.
Note:
Takt
is a simple time tracking CLI I made to meet my needs.
So, a while back, I was using this dashboard widget called Übersicht. It was… okay-ish. Decent. But something just didn’t click. Enter SwiftBar—my shiny new toy (and solution)!
Now, let’s dive right in and let me show you how awesome it is. Buckle up!
What is SwiftBar?
Picture this: It’s like a Swiss army knife for your menu bar. Despite using
yabai
and skhd
(yeah, I know, fancy names), setting up shortcuts on macOS
compared to Linux plus i3—good luck! SwiftBar seems to bring a perfect
compromise.
Getting Started: Bash + SwiftBar = ❤️
Once SwiftBar is installed, you need to create a plugin, which is basically a bash script. Don’t worry if you’re not a script wizard. I’ve got you covered!
Here’s what I did:
I placed my plugin in ~/.swiftBar/plugins
because organization, right? Plus,
the filename and the number (takt.1m.sh
, the ‘1m’ indicates it refreshes
every minute!) are crucial in the SwiftBar world.
Let’s jump straight into the script:
|
|
With a few lines of bash, you can have your own Takt button on your menu bar.
This script does everything you need. It shows the current status and working hours. It has buttons for checking times and viewing worked hours on different time spans (daily, weekly, monthly). There’s also a refresh option and an edit button to tweak the timestamp if needed.
So go ahead, give it a spin. Your macOS menu bar will thank you. Happy clicking!
Cheers, Max