Settings: Tasks
ConEmu’s Tasks are used to store predefined commands or shell’s command lines to run them anytime later by name or hotkey.
Predefined tasks (command groups)
Task name, surrounded by {…}, may be used in
[+]
menu,
Recreate dialog,
-run argument of ConEmu.exe
or even in prompt via ConEmuC.exe -c {task name}.
Hotkey
Choose hotkey for creating this Task (it’s not global and works in ConEmu only).
Default task for new console
Only one Task may be marked as default task, than it will be used when user starts new console
by [+]
button or Create new console hotkey (Win+W
by default).
Taskbar jump lists
Check this box if you want to use the Task from Task bar jump list. Don’t forget to save the settings and update jump list.
Default shell (Win+X)
Choose the Task which should be started by Win+X
hotkey (works in ConEmu only).
Task parameters
This field may contain some optional switches like startup directory or icon. Here you may set the tab icon, startup directory, control if Task should be started in existing or new ConEmu window, etc.
Full set of allowed switches is described here: Tasks parameters.
Example:
/dir "C:\\" -icon "cmd.exe" -single
Commands
Specify here an application, arguments and -new_console parameters.
One Task may start one console or group of consoles, one line in Commands starts one console. Delimit commands with empty lines.
For convenience some shortcuts are allowed here:
- Prefix
>
to mark active console, an alias for -new_console:f. - Prefix
*
to start console ‘As Administrator’, an alias for -new_console:a.
Example: run two consoles - Visual Studio and Powershell prompts. VS tab remains active, both are started elevated.
>* cmd /k ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsDevCmd.bat"" -new_console:t:"VS 2019"
* pwsh
Read about -new_console switches to undestand full set of possible options to control console start up.
One-level one-liner Tasks nesting is supported.
E.g. if you define the {MyTool}
task, you may create another task {ToolSet}
with nested tasks.
You may also run them in splits.
{MyTool} parameter-set-1
{MyTool} parameter-set-2
{MyTool} parameter-set-3
Add/refresh default tasks…
Default Tasks are some predefined Tasks generated by ConEmu for well known shells and toolsets.
This button refreshes default tasks asking for action: Add only new tasks (e.g. new Visual Studio version was installed) or refresh contents of existing tasks too.
Reload…
Reload Tasks from settings storage. Useful during experiments with configurations. Works till ‘Save settings’ button is pressed.
Clone
Create a copy of the selected Task. New Task is placed just below the current one.
+ (button)
Create a new empty Task.
- (button)
Delete the selected Task after confirmation.
Up
Move selected Task upwards.
Down
Move selected Task downwards.
Tab…
Open the New console dialog and append the result to Task Commands. Useful to configure multiple options and -new_console switches in a visual way.
Startup dir…
Open Windows choose folder dialog and append -new_console:d:”directory” switch to Task Commands.
File path…
Open Windows choose file dialog and append the path to Task Commands.
Active tabs
Append running in the ConEmu consoles to Task Commands. This is useful to configure multiple splitted consoles started manually before.