Skip to content

Windows Terminal Support - #2877

Closed
daxgames wants to merge 70 commits into
cmderdev:masterfrom
daxgames:windows_terminal
Closed

daxgames wants to merge 70 commits into
cmderdev:masterfrom
daxgames:windows_terminal

Conversation

@daxgames

@daxgames daxgames commented Sep 25, 2023 •

Copy link
Copy Markdown
Member

Windows Terminal Support

First looks at Windows Terminal Integration

image

NEED TO FIX

  • Command line help is for ConEmu only and needs to be updated.
  • Probably more.

NEED TO ADD:

  • Nothing that I know of.
  • Maybe more.

Progress So Far:

Cmder.exe Launcher:

  • Runs %cmder_root%\vendor\windows-terminal\WindowsTerminal.exe instead of ConEmu if %cmder_root%\vendor\windows-terminal exists.
  • Supports all existing command line arguments but /title, and /single.
  • Pass ALL arguments following -- argument directly to WindowsTerminal.exe to use the full power of Windows Terminal from the command line.
  • Modified Cmder.bat to launch windows terminal by default if it exists and put the default config file where it needs to be before launching Windows Terminal

Scripts:

  • Added an argument to build.ps1 that allows building with Windows terminal instead of Conemu.

Config:

  • Created a '%cmder_root%\vendor\WindowsTerminal_settings_default.json' that results in the WindowsTerminal Session and profiles shown above. NOTE: Non-Cmder sessions are auto-generated by Windows Terminal.
    • All sessions work as they do today in Cmder using Conemu.
  • Changes to the word separator settings so it works more m=like we would expect it ti work.
  • Added Windows Terminal to %cmder_root%\vendor\sources.json

@daxgames

Copy link
Copy Markdown
Member Author

I identified an error with Windows terminal support and profiles set to run as Administrator. The %CMDER_ROOT% env var is not set and we have no way of figuring out what the root path for Cmder is on Administrative profiles.

I have requested a feature in Windows Terminal microsoft/terminal#16295 that has the potential to resolve this the same way ConEmu does. Our init scripts could then look for %WT_FOLDER_PATH% the same way we do for %ConEmuDir%

@MartiUK

MartiUK commented Nov 15, 2023

Copy link
Copy Markdown
Member

I identified an error with Windows terminal support and profiles set to run as Administrator. The %CMDER_ROOT% env var is not set and we have no way of figuring out what the root path for Cmder is on Administrative profiles.

I have requested a feature in Windows Terminal microsoft/terminal#16295 that has the potential to resolve this the same way ConEmu does. Our init scripts could then look for %WT_FOLDER_PATH% the same way we do for %ConEmuDir%

Looks like it's slated for the WT 1.20 release, are you happy to wait or shall we try and find another solution?

@daxgames

Copy link
Copy Markdown
Member Author

We can wait

@daxgames

Copy link
Copy Markdown
Member Author

For those that want admin profiles before then you can set CMDER_ROOT globally via Windows env vars to fix the issue.

Comment thread Cmder.bat Resolved
Comment thread scripts/build.ps1 Outdated
[switch]$noVendor,

# Using this option will specify the emulator to use [all, conemu-maximus5, or windows-terminal]
[string]$emulator = 'all',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daxgames Would $terminal be a more claritive name to use for this switch?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to Terminal

Comment thread scripts/build.ps1 Resolved
Comment thread scripts/build.ps1 Outdated
Comment on lines +159 to +160
move-item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null
remove-item -ErrorAction SilentlyContinue $windowTerminalFiles >$null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please correct the indentation for these two lines? (Tab/Space mismatch) Sorry for the nitpicking

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread scripts/pack.ps1 Resolved
Comment thread vendor/init.bat Resolved
Comment thread vendor/init.bat Resolved
@DRSDavidSoft

Copy link
Copy Markdown
Contributor

@daxgames I've merged this and the speed optimization PRs into development branch for testing purposes.
So sorry it's taking this long to review, I'm still unimaginably busy with some projects and IRL issues, but I'm super eager to test these great additions and apply them in master soon.
Hoping for a speedy Cmder 1.4 release!

@daxgames

Copy link
Copy Markdown
Member Author

@DRSDavidSoft We can't really release 1.4 until microsoft/terminal#16295 gets released.

@daxgames daxgames closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants