0.1.0 • Published 3 years ago
aw-watcher-workspace v0.1.0
aw-watcher-workspace
A lightweight Activity Watcher module to track the active workspace, each logged activity will have the workspace context.
Compatibility:
- Tested on Ubuntu/Debian GNOME
 
Install
- Clone
 
git clone https://github.com/nya1/aw-watcher-workspace.git`- Install modules
 
yarn install- Start the watcher
 
yarn run startData sent to Activity Watch
Fields sent to AW:
titleFocused window titleappFocused app nameworkspaceActive workspace name
How to set the workspace names
There are two ways
- GNOME Tweaks application
Extensions->Workspace indicator
 - Terminal
gsettings set org.gnome.desktop.wm.preferences workspace-names "['games', 'university', 'work-acmecorp']"
 
Supported env variables
AW_WATCHER_WORKSPACE_IGNORE- type: stringified array
 - default: '[]'
 - description: completly ignore the workspace names provided, no data will be sent
 
AW_WATCHER_WORKSPACE_REDACT- type: stringified array
 - default: '[]'
 - description: redact the window title (field 
title) of the workspace names provided, the keywordexcludedwill be used instead of the original value 
AW_WATCHER_WORKSPACE_CLIENT_NAME- type: string
 - default: 'aw-watcher-workspace'
 - description: override the default client name, (hostname will be always appended)
 
AW_WATCHER_WORKSPACE_TESTING- type: boolean
 - default: (not set)
 - description: enable the client testing mode
 
Dependencies
Node modules
- official 
aw-clientnpm module to send the data to AW server 
External / shell
xdotoolto get the focused windowxpropto get the list of workspace names, focused window informationgdbusas a fallback toxdotoolto get the focused app (e.g.xdotoolfails when the gnome terminal is focused)
0.1.0
3 years ago