YouHaveBeenStaring

unlisted

by Felix Almer

This plugin tells you in the status bar for how long you've been staring at your obsidian vault. Well - at least how long your vault is open.

Updated 11d ago
View on GitHub

YouHaveBeenStaring (continued)

Two status-bar counters: how long this session has been running, and how long you have stared at this vault in total.

This is a maintained continuation of fxal/obsidian-youhavebeenstaring-plugin, which stopped loading on current Obsidian.

Install

Community plugins — search for "YouHaveBeenStaring (continued)" in Settings → Community plugins → Browse.

Before it is listed, or to track this branch: use BRAT with triuzzi/obsidian-youhavebeenstaring.

Manually: download main.js and manifest.json from the latest release into <vault>/.obsidian/plugins/youhavebeenstaring-continued/, then enable the plugin.

The plugin id is youhavebeenstaring-continued, so it installs alongside the original youhavebeenstaring-plugin rather than overwriting it. Settings and recorded uptime live in data.json and are compatible with the original: copy that file across to keep your total.

Why this exists

The original plugin was last released as 1.2.2 in 2021 and no longer loads on current Obsidian. Its TypeScript build targets ES5, so the emitted __extends helper instantiates the base class with _super.apply(this, arguments). obsidian.Plugin is a native ES class now, and calling a native class without new throws:

Plugin failure: youhavebeenstaring-plugin
TypeError: Class constructor ... cannot be invoked without 'new'

main.js here is that plugin rewritten as native ES classes. Behaviour, settings keys, status-bar texts and the data.json layout are unchanged. There is no build step — main.js is the source.

The same root cause is fixed at the source upstream in fxal/obsidian-youhavebeenstaring-plugin#13 (a one-line tsconfig.json target change), reported in #14.

Changes relative to 1.2.2:

  • Native ES classes instead of the ES5 __extends output, so it loads again.
  • moment comes from the obsidian module instead of window.moment.
  • The ribbon button uses the eye icon; 1.2.2 passed any-key, which is not a valid Lucide id, so the button rendered empty.
  • The 1-second tick no longer runs the accumulation through a comma expression.

Behaviour

  • Status bar, left item: session uptime, ticking every second. Pausing the counter replaces it with the paused text.
  • Status bar, right item: total recorded uptime for this vault (opt-in, see settings).
  • Ribbon button (eye): start/stop counting. Pausing stops accumulation but keeps the total.
  • Settings are written to data.json on change, every 10 minutes, and on unload.

Settings

SettingDefault
Show total staring durationoff
Display total recorded staring time as human readableon (2 months instead of HH:mm)
Status bar text of staring timeYou have been staring at your vault for
Status bar text of total staring timeYour total staring time in this vault is
Status bar text when staring counter is pausedYour staring counter is paused

Attribution

Original plugin by Felix Almer. This continuation keeps its id-independent behaviour and manifest fields, and is offered under the MIT license (see LICENSE). The upstream repository publishes no license file, although its package.json declares MIT; the attribution above is a request to honour, and this repository will be taken down if the original author objects.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.