Files
deskmeter/gnome-extension/README.md
2025-12-19 20:18:38 -03:00

1.9 KiB

Deskmeter GNOME Task Indicator

A GNOME Shell extension that displays your current deskmeter task in the top panel, positioned to the left of the panel indicators.

Prerequisites

  • GNOME Shell (versions 40-47 supported)
  • Deskmeter web server running on http://localhost:10000
  • The /api/current_task endpoint must be accessible

Installation

  1. Copy the extension to your GNOME extensions directory:
cp -r /home/mariano/wdir/dm/gnome-extension/deskmeter-indicator@local \
  ~/.local/share/gnome-shell/extensions/
  1. Restart GNOME Shell:

    • On X11: Press Alt+F2, type r, and press Enter
    • On Wayland: Log out and log back in
  2. Enable the extension:

gnome-extensions enable deskmeter-indicator@local

Or use GNOME Extensions app (install with sudo apt install gnome-shell-extension-prefs if needed).

Configuration

The extension polls the API every 3 seconds. You can adjust this in extension.js:

const UPDATE_INTERVAL = 3000; // milliseconds

The API URL is set to:

const DESKMETER_API_URL = 'http://localhost:10000/api/current_task';

Uninstallation

gnome-extensions disable deskmeter-indicator@local
rm -rf ~/.local/share/gnome-shell/extensions/deskmeter-indicator@local

Then restart GNOME Shell.

Troubleshooting

Extension not showing

  1. Check if the extension is enabled:

    gnome-extensions list --enabled
    
  2. Check for errors:

    journalctl -f -o cat /usr/bin/gnome-shell
    

Shows "offline" or "error"

  • Ensure dmweb Flask server is running on port 10000
  • Test the API endpoint:
    curl http://localhost:10000/api/current_task
    
    Should return JSON like: {"task_id":"12345678","task_path":"work/default"}

Task path too long

The extension automatically truncates paths longer than 40 characters, showing only the last two segments with a .../ prefix.