# aw-watcher-workspace

> ActivityWatch watcher to automatically categorize applications usage based on the active workspace

Latest version **0.1.0** (published 2023-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install aw-watcher-workspace
pnpm add aw-watcher-workspace
yarn add aw-watcher-workspace
bun add aw-watcher-workspace
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-03-05 |
| First published | 2023-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | nya1 |
| Maintainers | nya |
| Keywords | aw, activitywatch, watcher, workspace |

## Links

- npm: https://www.npmjs.com/package/aw-watcher-workspace
- Repository: https://github.com/nya1/aw-watcher-workspace
- Homepage: https://github.com/nya1/aw-watcher-workspace#readme
- Issues: https://github.com/nya1/aw-watcher-workspace/issues
- npm.io page: https://npm.io/package/aw-watcher-workspace

## Dependencies (1)

- [aw-client](https://npm.io/package/aw-client.md) ^0.3.3

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2023-03-05

## README

# 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

1. Clone
```sh
git clone https://github.com/nya1/aw-watcher-workspace.git`
```
2. Install modules
```sh
yarn install
```
3. Start the watcher
```sh
yarn run start
```

## Data sent to Activity Watch

Fields sent to AW:

- `title` Focused window title
- `app` Focused app name
- `workspace` Active 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 keyword `excluded` will 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-client` npm module to send the data to AW server

### External / shell

- `xdotool` to get the focused window
- `xprop` to get the list of workspace names, focused window information 
- `gdbus` as a fallback to `xdotool` to get the focused app (e.g. `xdotool` fails when the gnome terminal is focused)

---
_Source: https://npm.io/package/aw-watcher-workspace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
