User Tools

Site Tools


conemu_notes

This is an old revision of the document!


tasks

tags | conemu star an ssh session, specify startup directory for ssh

To start a git bash terminal

> -cur_console:d:C:\Users\raju "%ProgramFiles%\Git\git-cmd.exe" --no-cd --command=usr/bin/bash.exe -l -i

To start two git bash terminals in two directories

> -cur_console:d:C:\Users\raju\dir1 "%ProgramFiles%\Git\git-cmd.exe" --no-cd --command=usr/bin/bash.exe -l -i

-cur_console:d:C:\Users\raju\dir2 "%ProgramFiles%\Git\git-cmd.exe" --no-cd --command=usr/bin/bash.exe -l -i

To start an ssh session

> -cur_console:d:C:\Users\raju "%ProgramFiles%\Git\git-cmd.exe" --no-cd --command=usr/bin/ssh.exe username@server

To start an ssh session and go to a directory

> -cur_console:d:C:\Users\raju "%ProgramFiles%\Git\git-cmd.exe" --no-cd --command=usr/bin/ssh.exe -t username@server "cd ~/dir1 && bash"

To name the tabs, add something like -cur_console:n:t:blah, -cur_console:n:t:“blah blah”. For example

> -cur_console:d:C:\Users\raju "%ProgramFiles%\Git\git-cmd.exe" --no-cd --command=usr/bin/ssh.exe -t username@server "cd ~/dir1 && bash" -cur_console:n:t:"Tab name"

See also:- https://github.com/tovletoglou/comenu-pane-templates → search for “Task examples”

run task from command line

/C/Program\ Files\ \(x86\)/GitHub/ConEmuPack/ConEmu.exe -run {taskname}

Ref:- https://conemu.github.io/en/ConEmuArgs.html

grouping windows for alt tab

tags | conemu alt tab, group tabs, club windows

If there are N conemu windows with M tabs in each (on average), the following setting will let you cycle through N icons instead of N*M icons.

Settings -> General -> Task bar -> Taskbar buttons -> Active console only (ConEmu window)

Sample use case 1:- I usually open a separate conemu window per “task” and multiple tabs within each window for a “subtask”.

Sample use case 2:- Say we are working on two machines (ex:- dev and uat). We can open two conemu windows for each of them. On each machine we can have three tabs pointing to three different directories, for example source code, input, and output. With the default settings, clicking on the conemu icon in the taskbar or alt+tab will show 6 conemu icons. But with the above setting, we will only see 2 icons.

See also:- https://github.com/cmderdev/cmder/issues/758

launch conemu windows

$ cat launch_windows.bat
REM Script to launch different conemu task windows by double clicking in file
REM explorer.

REM start /B is like Linux's &.  If you do not use it, then {uat} will only be
REM started when all the windows from {PC} are exited.
start /B cmd.exe /c ""C:\Program Files (x86)\GitHub\ConEmuPack\ConEmu.exe" -run {PC}"
start /B cmd.exe /c ""C:\Program Files (x86)\GitHub\ConEmuPack\ConEmu.exe" -run {uat}"
start /B cmd.exe /c ""C:\Program Files (x86)\GitHub\ConEmuPack\ConEmu.exe" -run {notes}"

REM The launching shell remains open and has to be manually closed. Afterwards,
REM see if there is a way to close it automatically.

Here PC, uat, notes are conemu tasks that launch a conemu window with multiple tabs of their own.

conemu_notes.1611465598.txt.gz · Last modified: 2021/01/24 05:19 by raju