Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to make several console windows in one tab from task file? I want to make a grid 2x2 of consoles in one tab. I can do it by hands when create new consoles and select "To right" or "To bottom" options. But I want it to be created automatically on start up. Option "autosave/restore opened tasks" is unabled for some reason. So the only way is to create it in task. So, how can I create 2x2 grid in task?

share|improve this question
up vote 22 down vote accepted

This is your task contents. Checked in ConEmu build 120909.

>cmd -cur_console:n
cmd -cur_console:s1TVn
cmd -cur_console:s1THn
cmd -cur_console:s2THn

This is an example. Splitting in ConEmu may be as complex as you want, any configurations with any proportions are possible. Read project wiki for more information about -new_console and -cur_console switches.

To run all that without creating new Task

There is /cmdlist ConEmu.exe's switch.

Usage example for shortcut contents (on desktop, for example):

ConEmu -cmdlist cmd -cur_console:fn ||| cmd -cur_console:s1TVn ||| cmd -cur_console:s1THn ||| cmd -cur_console:s2THn

Need to run that from another cmd file? Here is consoles.cmd example:

start ConEmu -cmdlist cmd -cur_console:fn ^|^|^| cmd -cur_console:s1TVn ^|^|^| cmd -cur_console:s1THn ^|^|^| cmd -cur_console:s2THn
share|improve this answer
It worked, thank you. – doom123 Sep 14 '12 at 8:14
Can you tell me how to execute this command? I have tried and this is what I get. I have the latest build. – arin Feb 1 '13 at 19:38
The key word is "Task". Why you trying to run this from already started shell? Setup Tasks. – Maximus Feb 1 '13 at 20:04
@Maximus I had the impression that this was a shell command. Thanks. – arin Feb 4 '13 at 14:00
@arin You may use this from shell too, but that need -new_console:... instead of -cur_console – Maximus Feb 4 '13 at 16:03

I came up with the following implementation. I use it for web development projects. Consoles for task runners (ex: gulp), git, javascript compilers (ex: typescript), etc. The goal was to open 4 console windows and change directory to the directory where I executed the *.cmd. I did not want to have multiple copies of the batch script incase I had to change it. I did not want the shell to be batch and I wanted the shell to be bash. I'm on windows, so, cygwin is needed for bash shell.

I created an arbitrarily named .cmd file. I called mine 4 consoles.cmd. Cygwin is installed (the 64bit version in my case). Also the Cygwin chere package is installed and required.

4 consoles.cmd content:

@echo off

for %%i in ("%~dp0..\..") DO (set dirVar=%%~ni)
for %%i in ("%~dp0.") DO (set dir2Var=%%~ni)

set finalValue=%dirVar% %dir2Var%

start C:\"Program Files"\ConEmu\ConEmu64.exe -cmdlist ^
C:\cygwin64\bin\bash -c "/bin/xhere /bin/bash.exe" -cur_console:fna:t:"%finalValue%":C:"C:\cygwin64\Cygwin.ico" ^|^|^| ^
C:\cygwin64\bin\bash -c "/bin/xhere /bin/bash.exe" -cur_console:s1TVna:t:"%finalValue%":C:"C:\cygwin64\Cygwin.ico" ^|^|^| ^
C:\cygwin64\bin\bash -c "/bin/xhere /bin/bash.exe" -cur_console:s1THna:t:"%finalValue%":C:"C:\cygwin64\Cygwin.ico" ^|^|^| ^
C:\cygwin64\bin\bash -c "/bin/xhere /bin/bash.exe" -cur_console:s2THna:t:"%finalValue%":C:"C:\cygwin64\Cygwin.ico"

I put 4 consoles.cmd in a File hosting service for backup purposes incase my hard drive crashes. Also for some convenience when sharing between development machines.

The batch script will change directory for all 4 console windows to the directory where the .cmd exists. So I created Hard Symbolic links in the directory where I want all 4 console windows to change directory into. The symbolic links point back to the canonical 4 consoles.cmd.

Run a symbolic link and the 4 console shells working directories will be the location which the symbolic link is on the file system

My gulp task runner code for anyone that is interested


  "name": "MyApp",
  "version": "1.0.0",
  "description": "",
  "main": "gulpfile.js",
  "private": true,
  "devDependencies": {
    "del": "^1.2.0",
    "gulp": "^3.9.0",
    "gulp-batch": "^1.0.5",
    "gulp-concat": "^2.5.2",
    "gulp-imagemin": "^2.2.1",
    "gulp-minify-css": "^1.1.6",
    "gulp-ng-annotate": "^1.0.0",
    "gulp-plumber": "^1.0.1",
    "gulp-rename": "^1.2.2",
    "gulp-sourcemaps": "^1.5.2",
    "gulp-uglify": "^1.2.0",
    "gulp-watch": "^4.2.4",
    "imagemin-pngquant": "^4.1.0"
  "author": "Author",
  "license": "ISC"


  "name": "MyProject",
  "version": "1",
  "license": "MIT",
  "private": true,
  "ignore": [
  "dependencies": {
    "bootstrap": "~3.3.4",
    "jquery": "~2.1.3",
    "angular": "~1.4.0",
    "angular-route": "~1.4.0",
    "angular-animate": "~1.4.0",
    "font-awesome": "~4.3.0",
    "underscore": "~1.8.3",
    "bootstrap-datepicker": "~1.4.0",
    "angularjs-toaster": "~0.4.12",
    "angular-scroll": "~0.7.0",
    "moment": "~2.10.2",
    "angular-loading-bar": "~0.7.1"


'use strict';

var gulp = require('gulp');
var batch = require('gulp-batch');
var sourcemaps = require('gulp-sourcemaps');
var minifycss = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var concat = require('gulp-concat');
var del = require('del');
var plumber = require('gulp-plumber');
var watch = require('gulp-watch');
var imagemin = require('gulp-imagemin');
var pngquant = require('imagemin-pngquant');
var ngAnnotate = require('gulp-ng-annotate');

gulp.task('default', ['clean'], function () {
    gulp.start('images', 'vendorCss', 'applicationCss', 'fontIcons', 'vendorJavascript', 'applicationJavascript');

gulp.task('clean', function (cb) {
    del(['./dist/*'], cb);

gulp.task('images', function () {
    return gulp.src([
            optimizationLevel: 3,
            progressive: true,
            interlaced: true,
            svgoPlugins: [{ removeViewBox: false }],
            use: [pngquant()]

gulp.task('fontIcons', function () {
    return gulp.src([


gulp.task('vendorCss', function () {
    return gulp.src([
        .pipe(rename({ suffix: '.min' }))

gulp.task('vendorJavascript', function () {
    return gulp.src([

gulp.task('applicationCss', function () {
    return gulp.src([
        .pipe(rename({ suffix: '.min' }))

gulp.task('applicationJavascript', function () {
    return gulp.src([


gulp.task('watchApplicationJavascript', ['applicationJavascript'], function () {
    watch('./angular/**/*.js', batch(function (events, done) {
        gulp.start('applicationJavascript', done);

gulp.task('watchApplicationCss', ['applicationCss'], function () {
    watch(['./content/css/site.css', './content/css/animation.css'], batch(function (events, done) {
        gulp.start('applicationCss', done);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.