Track your working hours with Toggl directly in Visual Studio Code ⌚
toggl.startEntry
: starts a new entry on toggl.com with the provided inputtoggl.startExistingEntry
starts an existing entry on toggltoggl.stopEntry
: stops the current entrytoggl.openToggl
: opens toggl.com in the browsertoggl.fetchToggl
: fetch current toggl entry from toggl.com
- add new entries or choose from existing entries from your toggl account
- text for new entry can be selected in editor (just select the text and execute the "Toggl: Start with new entry." command)
- status bar shows current task and opens toggl.com when clicked
- clicks on the status bar can execute custom command (see
toggl.statusBarCommand
setting below) - polling: fetches data periodically from toggl to show the current task in the status bar
Currently the extension does provide the following settings:
toggl.apiKey
: your private Toggl API keytoggl.defaultProjectId
: all created tasks will use this as assigned project. You can get the id from the projects overview. Simply select the project and obtain the id from the url. Example: the id ofhttps://www.toggl.com/app/projects/xxxxx/edit/12345678
would be12345678
toggl.pollingTimeout
: timeout between polling intervals, when the extension fetchs the latest current task from toggl. In order to not hit toggl's rate limit you cannot set it below 3 seconds (default: 3).toggl.maxChars
: Max. number of chars of the entry title shown in the status bar (default: 50).toggl.statusBarCommand
: Choose command to be executed when Toggl status bar item is clicked (default: toggl.openToggl).
node ^12.12.0
vscode ^1.27.1
In order to run the VS Code in debugger mode execute the View: Show Debug
command and start the Extension
task (see configuration in
.vscode/launch.json).
A new VS Code Window in debugger mode will open. When you changed something in
the code, you have to execute Reload Window
to see the changes.
A guide about "Creating a VS Code Extension" can be found here.
Either open the debug tab in your VS Code and start the Extension Test
task,
or run npm t
in the terminal. When you run it in the terminal, make sure no
other VS Code instance is running.
Jest is used for testing, and the implementation is inspired by the Unibeautify/vscode package.
Simple execute the commands below or read more about Publishing first.
npx vsce package
npx vsce publish
I have not yet tested these tools, but I'll keep them here for the future.
There are some further ideas and tasks left to make this extension better. You can take a look at the projects tab to see what I have in mind, planned and what is still left. Feel free to contribute! 💪
This extension is not affiliated, associated, authorized, endorsed by or in any way officially connected to Toggl (toggl.com).
Thanks goes to these wonderful people (emoji key):
Stefan Natter 💻 📖 🤔 |
Pavel Suk 💻 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!