It’s easy to spend hours sitting in front of a screen without knowing where the time went. You only have 24 hours to spend each day, and you can either choose to spend your time working on important tasks or wasting it on unnecessary activities.
Fortunately, tracking your screen time on Linux to identify activities that might be causing you to lose focus is effortless. Perhaps you want to monitor your kid’s activity on the internet and need an effective tool that can do that for you. ActivityWatch is an open-source app that helps you check your screen time on Linux.
Key Highlights of ActivityWatch
Tracking your active screen time is one of the best ways to increase your productivity and get more things done in less time.
Rather than simply tracking the time you spent on your screen, ActivityWatch brings some additional features to the table, like:
- Category-wise activity grouping
- Tracking screen time by window/application
- Web usage monitoring using browser extensions
- Stopwatch feature for manual activity tracking
- Cross-platform support for Windows, macOS, Linux, and Android
- Export data in JSON and CSV formats
The best part is, since ActivityWatch runs as a local server, it stores your data locally, offering you complete control over your privacy.
To start using ActivityWatch, first, you need to install it on your system.
How to Install ActivityWatch on Linux
ActivityWatch isn’t available in the official repositories of most Linux distributions, therefore, you’ll have to manually download the binaries from the project’s website. Head over to the ActivityWatch website and download the latest version for your system.
Arch Linux users can download ActivityWatch from the Arch User Repository (AUR) using yay:
yay -S activitywatch
The first step is to fire up ActivityWatch. You won’t find it listed in the applications menu since you didn’t install it from your distro’s repositories. It’s easy to create application shortcuts for any program on Linux, though.
If you’ve downloaded the app from the AUR, you can launch it from the applications menu since AUR helpers create a menu entry for the installed software.
To start, head over to the Downloads folder and extract the ZIP file you just downloaded:
sudo unzip activitywatch-*.zip
Change the current directory to the extracted folder using:
Then, to launch ActivityWatch, enter the following command:
Tracking Screen Time on Linux With ActivityWatch
By default, ActivityWatch starts in the background, and there’s no app interface you can use to set it up. Since it runs as a server, you get a web-based dashboard to view and modify the data.
To access the ActivityWatch dashboard, right-click the ActivityWatch icon in the system tray and select Open Dashboard.
Every time you launch the app, you’ll be automatically taken to a Welcome page containing all the important details about the project and some platform links to support the developer.
To change this default behavior and open the Activity dashboard on startup, click Settings from the top-right corner and select Activity from the Landing Page dropdown menu.
Monitoring Your On-Screen Activity
Most of your tracking workflow will revolve around the Activity and Timeline views. The Activity tab displays your screen time grouped by applications, categories, and windows.
You’ll also have some neat pie and bar charts visualizing your data, but most of it will be empty initially. Therefore, let ActivityWatch run in the background for a couple of hours before you consider opening the dashboard again.
At the top, you’ll find options to select the date and time to filter the data. By default, ActivityWatch will display the data for the current day, but you can easily change it using the day and date filters. You can also filter the data by category or choose to exclude AFK time, but you’ll have to click on the Filters button to access those options.
Located right below is the actual data. You can find your activities grouped by applications, window titles, and work categories.
ActivityWatch does a great job at identifying the category based on the window or application name. For example, if you’re using an editor like Visual Studio Code, all the activity and screen time for that app will fall under the Work>Programming category.
You can add additional visualizations by clicking Edit view and then Add visualization. In the new section that appears, click the Settings drop-down and select the kind of visualization you want to include in the dashboard. Then, hit Save to continue.
If you wish, you can also export your data in JSON or CSV format by clicking Raw Data, then selecting the relevant Export option from the More drop-down menu located next to each bucket.
Viewing the Activity Timeline
You can switch to the Timeline tab from the top to access your entire work history. You get a neat horizontal timeline with two different rows: one is the AFK tracker that keeps track of the time you were away from the keyboard, and the other is the window watcher, which monitors your activity and tracks the apps you use.
You can use the filter options above the timeline to sort and fine-tune the data. It’s all yours to play with!
Manually Tracking an Activity With ActivityWatch
Another great facet of ActivityWatch is the Stopwatch feature. Although it’s currently in an experimental phase, you can still use it to track the hours you spend doing a custom activity.
Click the Stopwatch option to access this feature. All you need to do is enter an activity and click Start, and ActivityWatch will start a stopwatch to track the time you spend doing that. Remember to stop the stopwatch right after you’re done with the task, though.
Keeping Track of Your Time on Linux
Monitoring your on-screen activities for wasted time is an indispensable habit you should adopt right now. Knowing what distracts you when you’re at work and reducing your chances of slipping out of your “flow” is a fantastic way to steal some extra hours from your day.
We’re currently living in a busy world, where even a single hour saved means you’ve extra time to spend with your loved ones, work on your personal interests, or even learn a new skill that will make you competent and irreplaceable at your workplace.