Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cmder auto start with windows and auto minimize to the status bar. #532

Closed
amosbird opened this issue Jun 14, 2015 · 12 comments
Closed

Comments

@amosbird
Copy link

I'm using quake style slide down feature and find it very ergonomic. It will be convenient that cmder auto start and let me call it out by ctrl + `.

@glucas
Copy link
Contributor

glucas commented Jun 18, 2015

You can copy the cmder shortcut to your Windows startup folder. On Windows 8 that would be:
C:\Users\<User Profile folder name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

@amosbird
Copy link
Author

@glucas How to make it auto minimize to TSA?

@glucas
Copy link
Contributor

glucas commented Jun 18, 2015

Open the ConEmu Settings dialog (e.g. Win + Alt + P) and look for:

Main - Task Bar - Auto minimize to TSA

Also you can edit the properties for your cmder shortcut and change the Run: option to start minimized.

--EDIT--

Actually, changing the shortcut to run minimized doesn't seem to work. The ConEmu settings has Main - Size & Pos settings to let you position the window, but I don't see an option to start minimized. ConEmu does support a command-line option to start minimized, but I don't see any way to pass that via Cmder.

@glucas
Copy link
Contributor

glucas commented Jun 18, 2015

A workaround to run cmder minimized.

Create a Cmder.bat in your root cmder folder, based on this: https://github.com/bliker/cmder/blob/master/Cmder.bat

Add /MIN to the arguments passed to ConEmu:

start %~dp0/vendor/conemu-maximus5/ConEmu.exe /MIN /Icon .....

Then create a shortcut to your bat file and drop it in your startup folder.

One downside of this approach is there is a cmd.exe window that flashes briefly when the script runs, but it does provide the behavior you want when combined with the 'Auto minimize to TSA' setting.

A potentially useful enhancement to Cmder would be to support a /MIN argument that gets passed through to ConEmu.

@aalvarado
Copy link

once you have your bat you can create a vbs script that will run it without a window:

Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run "cmd /c cmder_start.bat", 0, True
Set objShell = Nothing

So no downsides now :)

@babhishek21
Copy link

Personally, I feel the best non-invasive way to achieve this is using the built-in Windows Task Scheduler. It provides a very easy to use interface to set up startup tasks, with customized parameters.

@kylemd
Copy link

kylemd commented Apr 13, 2016

Perfect fix for this issue is a combination of glucas and babhishek21's answers, for my purposes.

You see ConEmus icon flash up very briefly in the taskbar, but there are no other signs that it's started until you hit your hotkey.

I did exactly this in Task Scheduler (of course your paths may be different, my cmder root was C:\tools\cmder):

Run when user logs on
Run: C:\tools\cmder\vendor\conemu-maximus5\ConEmu.exe
Arguments: /Icon "C:\tools\cmder\icons\cmder.ico" /Title Cmder /LoadCfgFile "C:\tools\cmder\config\ConEmu.xml"
Start in: C:\Users\Kyle

@bllngr
Copy link

bllngr commented Apr 17, 2019

One addition, since I just stumbled over this: To start minimized with @kylemd's solution in #532 (comment), make sure to enable the option "Auto-hide on focus lose" on the Quake style page.

@q00u q00u mentioned this issue Feb 7, 2020
2 tasks
@sidian123
Copy link

Let me summarize what you're talking about and it work perfectly.

  1. First, run Cmder by ConEmu with argument /min.
    create file Cmder.bat in Cmder home
    cmd /c "vendor\conemu-maximus5\ConEmu64.exe /min /Icon icons\cmder.ico /Title Cmder  /LoadCfgFile config\user-ConEmu.xml"
  2. to avoid console window opening, use vb script to disable it
    create file Cmder.vbs in Cmder home
    Dim objShell
    Set objShell = WScript.CreateObject( "WScript.Shell" )
    objShell.Run "cmd /c Cmder.bat", 0, True
    Set objShell = Nothing
  3. add the shortcut of Cmder.vbs to startup folder
    to open this folder, press win+r-->input shell:startup.

well, it's over~

@catalin560
Copy link

apparently you can do it right from the settings and don't need any bs workarounds...
Settings > Integration > Default term > check Register on OS startup
you can also do Force ConEmu as default terminal and any time you open a cmd or powershell it will open it in cmder instead...

the only thing that bugs me is that at system startup it opens up to an empty window and you have to manually open a shell you like with CTRL + T or from the menu... I would like for it to auto open a bash window...

@brunomolteni
Copy link

I just found out you can also just edit the shortcut and add /x -MinTSA at the end, move this shortcut into shell:startup and you're golden, it starts without flashing, minimized and with a console already open :)

@Grim3ntrix
Copy link

***** "Laragon Cmder /or ConEmu Automation in Startup Guide" *****

Steps:
1 Create a batch file "Cmder.bat" in cmder home (C:\laragon\bin\cmder)
Copy this Script:

cmd /c "vendor\conemu-maximus5\ConEmu64.exe /min /Icon icons\cmder.ico /Title Cmder /LoadCfgFile config\user-ConEmu.xml"

  1. Create a vbs file "Cmder.vbs" in cmder home (C:\laragon\bin\cmder)
    Copy this Script:
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run "cmd /c Cmder.bat", 0, True
Set objShell = Nothing
  1. Create a shortcut of (Cmder.vbs) and Copy
  2. Win + R and type "shell:startup"
  3. Paste the "Cmder.vbs" in the startup folder

***** "To Start Cmder /or ConEmu minimize to TSA" *****

  1. Open Cmder /or ConEmu Terminal
  2. Go Over terminal Settings
  3. Go to General > Task bar > Check the Auto hide to TSA > Save Settings
  4. Restart PC

Done!


"To add script in batch file and Execute NPM command"

  1. Modify "Cmder.bat" file
    Copy Script:
@echo off
cd /d "C:\laragon\www\Your-ProjectName-Here"
ConEmu64.exe /min /Icon icons\cmder.ico /Title Cmder /LoadCfgFile config\user-ConEmu.xml
npm run dev
  1. Save and Restart PC

Done! This will work like a charm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests