Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Latest commit

 

History

History
134 lines (116 loc) · 5.24 KB

README_EN.md

File metadata and controls

134 lines (116 loc) · 5.24 KB

Powered by Akasha Terminal

展示图

Turn your Windows terminal into the Akasha Terminal!
LICENSE: MIT

中文 | English

Effects

[In PowerShell]
A diagram showing the effect in PowerShell

[In cmd]
A diagram showing the effect in cmd

How to achieve

PowerShell

  • Permanent
    • Originally no configuration file
      You can download Microsoft.PowerShell_profile.ps1 in the Repository Releases,Then place this file in C:\Users\user_name\Documents\WindowsPowerShell\.(Create a new folder if it doesn't exist)
      This code can be added if you wish to change the title along with it:
      $host.UI.RawUI.WindowTitle = "Akasha Terminal"
      • In case of an error
        If an error like this occurs:
      . : File C:\Users\user_name\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
      
      Please try:
      * Start PowerShell as Administrator
      * Run the following command to view the current enforcement policy:
      Get-ExecutionPolicy
      If the returned result is not RemoteSigned or Unrestricted, then PowerShell is running an execution policy that restricts script execution. You can use the following command to change the execution policy:
      Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
      This will allow the current user to run self-signed script files locally without asking the user for confirmation.
      Finally, a restart of PowerShell should fix the problem.
      • If you encounter any other errors please submit Issues
    • Originally had a configuration file
      You can run the following command to open the PowerShell configuration file:
    notepad $PROFILE
    Add the following code to the open configuration file:
    function prompt {
      Write-Host "[Powered by Akasha Terminal] " -NoNewline -ForegroundColor Cyan
      return "PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) "
    }
    # Code by DuckStudio
    # Version 1.0
    Save and close the configuration file and restart PowerShell.
    You can add the following code if you want to change the title along with it:
    $host.UI.RawUI.WindowTitle = "Akasha Terminal"
  • one-time-only
    If you don't want to have [Powered by Akasha Terminal] every time, and only want the current PowerShell to have [Powered by Akasha Terminal], then you can run the following command in PowerShell:
function prompt {
    Write-Host "[Powered by Akasha Terminal] " -NoNewline -ForegroundColor Cyan
    return "PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) "
}
# Code by DuckStudio
# Version 1.1
# Note: this is multi-line code

You can add the following code if you want to change the title along with it:

$host.UI.RawUI.WindowTitle = "Akasha Terminal"

This will only work in the current PowerShell session.

cmd

  • one-time-only
    If you don't want to have [Powered by Akasha Terminal] every time, and only want the current cmd to have [Powered by Akasha Terminal], then you can run the following command in cmd:
prompt [Powered by Akasha Terminal] $P$G

You can add the following code if you want to change the title along with it:

title Akasha Terminal

This will only work in the current cmd session.

How to cancel if set to permanent

  1. Run the following command to open the PowerShell configuration file:
notepad $PROFILE
  1. Remove the code added in the configuration file
  2. Save and close the configuration file and restart PowerShell.

How to change the content

What? You don't like Akasha Terminal?
Just change the [Powered by Akasha Terminal] part of the code.

Note

Note that the PowerShell code has a single space after the content.

Example:

  • In PowerShell
function prompt {
    Write-Host "[Powered by Nahida] " -NoNewline -ForegroundColor Cyan
    return "PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) "
}
# Code by DuckStudio
# Version 1.1
# Note: this is multi-line code

Effect:
Powered by Nahida

  • In cmd
prompt [Powered by Nahida] $P$G

Effect:
Powered by Nahida

About translation

Use DeepL to assist with translation.