Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmims/PSConsoleTheme
PowerShell module to manage Windows console colors and PSReadline token colors.
https://github.com/mmims/PSConsoleTheme
Last synced: 7 days ago
JSON representation
PowerShell module to manage Windows console colors and PSReadline token colors.
- Host: GitHub
- URL: https://github.com/mmims/PSConsoleTheme
- Owner: mmims
- License: mit
- Created: 2017-06-30T20:13:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-08T20:35:38.000Z (over 2 years ago)
- Last Synced: 2024-08-02T17:37:19.597Z (3 months ago)
- Language: PowerShell
- Homepage:
- Size: 148 KB
- Stars: 82
- Watchers: 6
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - mmims/PSConsoleTheme - PowerShell module to manage Windows console colors and PSReadline token colors. (PowerShell)
README
# PSConsoleTheme
PowerShell module to manage Windows console colors and PSReadline token colors.
![psconsoletheme](https://user-images.githubusercontent.com/534908/40373755-9d66200c-5db5-11e8-8a08-49c50bef3129.gif)
## Install
The recommended method for installing PSConsoleTheme is to use PowerShellGet. After the module is installed, there are some additional configuration steps recommended.
### Installing from PowerShell Gallery
PowerShellGet is included in Windows 10 and [WMF 5.0+](https://www.microsoft.com/en-us/download/details.aspx?id=54616). If you are using PowerShell V4 or V3, you will need to install [PowerShellGet](https://www.microsoft.com/en-us/download/details.aspx?id=51451).
Once PowerShellGet has been installed, simply run:
```Powershell
Install-Module PSConsoleTheme
```### Install PSReadline (Optional)
I would recommend using the PSReadline module for the best PowerShell console experience. This module is included by default on Windows 10 systems. If you are running an older Windows OS, follow the [installation](https://github.com/lzybkr/PSReadLine#installation) instructions from the PSReadline github repository.
### Post-Install Configuration
The last step is to edit your profile to import the PSConsoleTheme module. This step is optional, but highly recommended if you are also using the PSReadline module. If you are using the PSReadline module and ***do not*** add an import statement to your profile, the PSReadline token colors of your selected theme will ***not*** be configured when you start a new console session.
PowerShell provides multiple profiles that can be customized. Most users will want to edit the current user PowerShell profile. This profile can be found in the `$HOME\[My ]Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1` file.
You can open the profile in a PowerShell console using the following command:
```Powershell
notepad $PROFILE
```Then add the following to the profile:
```powershell
Import-Module PSConsoleTheme
```## Upgrading
To upgrade to the latest available version of PSConsoleTheme, simply run:
```powershell
Update-Module PSConsoleTheme
```## Usage
To start using, just import the module (if it has not already been imported):
```powershell
Import-Module PSConsoleTheme
```Check out the list of available themes:
```powershell
Get-ConsoleTheme -ListAvailable
```Set your console colors to your chosen theme:
```powershell
Set-ConsoleTheme 'Classic Dark'
```That's it! PSConsoleTheme will set the console color palette for all Windows console host applications (this includes cmd consoles) of the current user. PSConsoleTheme will also set the token foreground colors for PSReadline tokens if you're using a PowerShell console with PSReadline.