English | ไธญๆ
A smart Obsidian plugin that seamlessly integrates with the Toggl time tracking service, allowing you to easily track time while taking notes.
- Automatic Note Content Analysis: Automatically suggests appropriate projects and descriptions based on current note's filename, heading hierarchy, list structure, and tags
- Historical Record Recommendations: Provides related timer suggestions based on previous time entries
- One-Click Quick Start: Select text or right-click to quickly start timing
- Real-time Timer: Display current running timer in the sidebar with live elapsed time
- Quick Operations: Easily start, stop, and edit time entries
- Visual Interface: Modern user interface built with Svelte
- Weekly Statistics: Display total time for the current week
- Daily Breakdown: Show time entries grouped by date
- Project Identification: Use colors to distinguish different projects
- Tag Support: Full support for Toggl tag system
- Auto Sync: Automatically synchronize data with Toggl service
- Offline Detection: Provide reconnection options when network is down
- Error Handling: Comprehensive error notifications and handling mechanisms
- Status Bar Timer: Display Toggl icon and current timing status in the bottom status bar
- Quick Access: Click status bar icon to quickly open timer panel
- Real-time Display: Status bar shows current timing task name and elapsed time in real-time
- Plugin Integration: Provide API for other plugins to call timer start functionality
- Programmatic Control: Support programmatic control of timer start and stop
Since this plugin is not yet available in the official Obsidian community plugin marketplace, we recommend using BRAT for installation:
-
Install BRAT Plugin:
- Open Obsidian Settings
- Go to "Third-party plugins" โ "Community plugins"
- Turn off "Safe mode"
- Search and install "Obsidian42 - BRAT"
- Enable BRAT plugin
-
Install Smart Toggl Tracker via BRAT:
- Open Command Palette (
Ctrl/Cmd + P) - Type "BRAT: Add a beta plugin for testing"
- Enter GitHub repository URL:
DesmondSylin/smart-toggl-tracker - Click "Add Plugin"
- Wait for installation to complete, then enable the plugin
- Open Command Palette (
-
Enable Plugin:
- Go to "Settings" โ "Third-party plugins"
- Find "Smart Toggl Tracker" and enable it
If you prefer not to use BRAT, you can also install manually:
- Go to GitHub Releases page
- Download the latest
smart-toggl-tracker.zipfile - Extract to your Obsidian plugins folder:
<vault>/.obsidian/plugins/smart-toggl-tracker/ - Reload Obsidian (
Ctrl/Cmd + R) - Enable the plugin in settings
Note: The advantage of using BRAT is automatic plugin updates, while manual installation requires manually downloading new versions.
- Log in to your Toggl Track account
- Go to Profile page
- Copy your token from the "API Token" section
- Find "Smart Toggl Tracker" in Obsidian Settings
- Paste your Toggl API Token
- Click "Connect" button
- Once connected successfully, you can start using the plugin
-
Using Command Palette:
- Press
Ctrl/Cmd + Pto open Command Palette - Type "Start Toggl Timer"
- Choose appropriate project and description
- Press
-
Using Right-click Menu:
- Right-click in the editor
- Select "Start Timer"
- Choose from the suggestion list
-
Using Sidebar:
- Open "Toggl Timer" panel
- Click "Start a new timer"
- Fill in timer details
The plugin automatically generates suggestions based on:
- Filename: Use filename as project name candidate
- Heading Hierarchy: Analyze current position's heading hierarchy as project structure
- List Structure: Suggest projects based on list level relationships
- Folder Path: Use folder names as project candidates
- Tag Content: Convert note tags to Toggl tags
- Edit Entries: Click any time entry to edit
- Repeat Timer: Click play button to restart the same timer
- Stop Timer: Click stop button to end current timer
- Sync Data: Manually sync Toggl data
- Quick Access: Display Toggl timer icon (โฑ๏ธ) in the bottom status bar
- Real-time Status: Show current timing task name and elapsed time
- One-Click Open: Click status bar icon to quickly open timer panel
- Auto Update: Update timing status every second without manual refresh
Note: Status bar feature is only available in desktop version of Obsidian
The plugin provides the following commands (accessible via Command Palette):
Show Tracker: Display timer panelSync Now: Immediately sync Toggl dataOpen Timer Panel: Open timer panelStop Toggl Timer: Stop currently running timerStart Toggl Timer: Start new timer
Enter your Toggl API Token to connect to Toggl service.
Enabling debug mode allows you to:
- Display detailed debug information
- Disable automatic sync functionality
- Output detailed logs to console
- Invalid Token: Please verify that your Toggl API Token is correct
- Network Error: Check network connection, plugin will automatically detect offline status
- Too Many Requests: If you receive a 429 error, please try again later
- Data Not Syncing: Click "Sync" button to manually sync
- Missing Records: Check record status on Toggl website
- Slow Loading: Large amount of historical records may affect loading speed
- Memory Usage: Plugin loads records from the last 7 days
- Plugin only communicates with official Toggl API
- All data is transmitted using HTTPS encryption
- API Token is stored locally only
- No personal data is collected or sent to third parties
If you encounter issues or have feature suggestions, please:
- Check GitHub Issues
- Submit a new Issue describing the problem
- Share your experience in the community
- Frontend Framework: Svelte
- Development Language: TypeScript
- API Integration: Toggl Track API v9
- Data Storage: IndexedDB (via idb)
The plugin provides public API for other plugins to use:
Start a new time tracking record.
Parameters:
description(string): Task descriptionproject(string): Project name (will automatically search for matching projects)tags(string[]): Array of tags
Return Value:
Promise<{ok: boolean}>: Returns{ok: true}on success,{ok: false}on failure
Usage Example:
// Get Smart Toggl Tracker plugin instance
const smartTogglPlugin = this.app.plugins.plugins['smart-toggl-tracker'];
// Start timing
const result = await smartTogglPlugin.startTrackingByAPI(
'Writing documentation',
'Project Name',
['tag1', 'tag2']
);
if (result.ok) {
console.log('Timer started successfully');
} else {
console.log('Failed to start timer');
}Notes:
- Toggl API Token must be set first
- Project name will be searched in existing projects, if multiple matches found, the last one will be used
- If project doesn't exist, the time entry will not be associated with any project
src/
โโโ main.ts # Main plugin logic
โโโ setting.ts # Settings page
โโโ view.ts # View management
โโโ SuggestModal.ts # Suggestion modal
โโโ lib/
โ โโโ toggl.js # Toggl API integration
โ โโโ store.js # Data storage management
โ โโโ tool.js # Utility functions
โโโ view/
โโโ Timer.svelte # Main timer interface
โโโ EntryMenu.svelte # Timer suggestion menu
โโโ EntryMenuItem.svelte # Timer item component
# Install dependencies
npm install
# Development mode
npm run dev
# Build production version
npm run buildThis project is licensed under the MIT License. Please refer to the LICENSE file for details.
- ๅ็ด Obsidian plugin ็ๆฌ่่ณ 0.1.9
- ๅ ถไป็ดฐ็ฏๅชๅ่ไฟฎๆญฃ
- Improved smart suggestion algorithm
- Fixed sync issues
- Optimized user interface
- Improved smart suggestion algorithm
- Fixed sync issues
- Optimized user interface
- Added right-click menu functionality
- Support for automatic tag suggestions
- Improved error handling
Author: Desmond Sylin Project Homepage: GitHub Repository