TaskDeck:Sources
A source is the group a task belongs to, for example Workspace for the tasks in tasks.json or npm for npm scripts. Task Deck lets you set for each source:
- whether it is shown
- its icon
- its color
- which of its tasks are shown
All of this is stored in the regular VS Code settings. Each setting is an object with the source name as key. Click the gear icon in the view title to open the Settings editor with only the Task Deck settings. The full list is on Commands and Settings.
Hiding and showing a source
Hover a source and click the eye icon (Hide Source). The source and all its tasks disappear from the view. Task Deck saves this as false in quickTasks.sourceEnabled.
To show a hidden source again, use one of these:
- Run Task Deck: Show Hidden Source… from the Command Palette and pick the source. If no source is hidden, a message says so.
- Set its entry in
quickTasks.sourceEnabledback totrue, or remove the entry.
Sources that are not listed in quickTasks.sourceEnabled are shown.
Hidden sources and their tasks are also left out of Find Task. Pinned tasks of a hidden source stay in the Pinned group. See Pinned Tasks.
Where the setting is saved
Hide Source and Show Hidden Source write to the workspace settings by default, so the choice only applies to the current project.
Set quickTasks.sourceSaveToUser to true for a source to save its visibility to your user settings instead. It then applies to all projects. When Task Deck writes the value, it removes the entry for that source from the other scope, so there is only one value left.
This only affects the two commands above. When you edit a setting yourself in the Settings editor, it is saved to the scope (User or Workspace) you have selected there.
Icon
quickTasks.sourceIcons sets the icon of the source group. Without an entry the source uses folder.
The Settings editor offers these icons in a dropdown:
folder, package, tools, checklist, gear, rocket, beaker, terminal, file-code, database, cloud, symbol-event, briefcase, combine.
Any other id from the Codicon list works too. Enter it with Edit in settings.json.
Color
quickTasks.sourceColors tints the source icon and the icons of its tasks. Without an entry the default color of your theme is used.
The Settings editor offers these colors in a dropdown:
charts.blue, charts.green, charts.orange, charts.red, charts.purple, charts.yellow, terminal.ansiBlue, terminal.ansiGreen, terminal.ansiRed, terminal.ansiYellow, terminal.ansiCyan, terminal.ansiMagenta.
Any other id from the Theme Color reference works too. Enter it with Edit in settings.json.
The warning triangle of a failed task always uses the warning color of the theme.
Filtering tasks by name
Two settings decide which tasks of a source are shown. Both take a list of name patterns and are edited with Edit in settings.json.
quickTasks.sourceInclude: if the list is not empty, only tasks that match one of the patterns are shown.quickTasks.sourceExclude: tasks that match one of the patterns are hidden. This also applies to tasks that match an include pattern.
Pattern rules:
*stands for any number of characters,?for exactly one character.- A pattern has to match the whole task name.
buildonly matches a task namedbuild,build*also matchesbuild:prod. - Upper and lower case don't matter.
The filters apply to the view and to Find Task, but not to the Pinned group. The task count next to the source still counts all its tasks.
Sources that are no longer found
A source can have settings even though it no longer exists, for example after you removed a task provider or deleted the last task from tasks.json. Task Deck keeps such a source in the view:
- It shows a warning triangle and the text
not found. - The tooltip explains that its stored settings are kept in case the source comes back.
- It has no tasks and can't be expanded.
This also applies to a hidden source. Once it is no longer found, it is shown again with the warning.
If you don't need the settings any more, right-click the source and choose Remove Source Configuration. After you confirm, Task Deck deletes the entries for this source from all Task Deck settings, in the user settings and in the workspace settings. An entry in the old quickTasks.sources setting is only removed from the workspace settings. Once no entry is left, the source disappears from the view.
Example
"quickTasks.sourceIcons": {
"Workspace": "checklist",
"npm": "package"
},
"quickTasks.sourceColors": {
"Workspace": "charts.blue",
"npm": "charts.green"
},
"quickTasks.sourceExclude": {
"npm": ["pre*", "post*"]
},
"quickTasks.sourceEnabled": {
"Gulp": false
}
This gives tasks.json tasks a blue checklist icon and npm scripts a green package icon, hides the npm scripts whose names start with pre or post and hides the Gulp source.
Old setting
Older versions stored all of this in a single setting, quickTasks.sources. It is deprecated, but Task Deck still reads it. A value in the new settings wins. For a source that has no entry in a new setting, the value from quickTasks.sources is used.
| Task Deck | |
|---|---|
| Start | Installation |
| Features | Task View · Sources · Pinned Tasks · Find Task |
| Reference | Commands and Settings · FAQ · Version History |
| Links | Project page on mutigeraffe.com · Install from the VS Code Marketplace |