This module will be used to further customize powershell prompts. stolen from mrled.pull/1/head
parent
c19218cede
commit
6f034735d8
@ -0,0 +1,119 @@
|
||||
#
|
||||
# Module manifest for module 'AsciiArt'
|
||||
#
|
||||
# Generated by: micah
|
||||
#
|
||||
# Generated on: 11/16/2016
|
||||
#
|
||||
|
||||
@{
|
||||
|
||||
# Script module or binary module file associated with this manifest.
|
||||
RootModule = 'AsciiArt.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.0'
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '977dc430-185d-4611-8af7-37c4128a9246'
|
||||
|
||||
# Author of this module
|
||||
Author = 'micah'
|
||||
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'Unknown'
|
||||
|
||||
# Copyright statement for this module
|
||||
Copyright = '(c) 2016 micah. All rights reserved.'
|
||||
|
||||
# Description of the functionality provided by this module
|
||||
# Description = ''
|
||||
|
||||
# Minimum version of the Windows PowerShell engine required by this module
|
||||
# PowerShellVersion = ''
|
||||
|
||||
# Name of the Windows PowerShell host required by this module
|
||||
# PowerShellHostName = ''
|
||||
|
||||
# Minimum version of the Windows PowerShell host required by this module
|
||||
# PowerShellHostVersion = ''
|
||||
|
||||
# Minimum version of Microsoft .NET Framework required by this module
|
||||
# DotNetFrameworkVersion = ''
|
||||
|
||||
# Minimum version of the common language runtime (CLR) required by this module
|
||||
# CLRVersion = ''
|
||||
|
||||
# Processor architecture (None, X86, Amd64) required by this module
|
||||
# ProcessorArchitecture = ''
|
||||
|
||||
# Modules that must be imported into the global environment prior to importing this module
|
||||
# RequiredModules = @()
|
||||
|
||||
# Assemblies that must be loaded prior to importing this module
|
||||
# RequiredAssemblies = @()
|
||||
|
||||
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
|
||||
# ScriptsToProcess = @()
|
||||
|
||||
# Type files (.ps1xml) to be loaded when importing this module
|
||||
# TypesToProcess = @()
|
||||
|
||||
# Format files (.ps1xml) to be loaded when importing this module
|
||||
# FormatsToProcess = @()
|
||||
|
||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||
# NestedModules = @()
|
||||
|
||||
# Functions to export from this module
|
||||
FunctionsToExport = '*'
|
||||
|
||||
# Cmdlets to export from this module
|
||||
CmdletsToExport = '*'
|
||||
|
||||
# Variables to export from this module
|
||||
VariablesToExport = '*'
|
||||
|
||||
# Aliases to export from this module
|
||||
AliasesToExport = '*'
|
||||
|
||||
# DSC resources to export from this module
|
||||
# DscResourcesToExport = @()
|
||||
|
||||
# List of all modules packaged with this module
|
||||
# ModuleList = @()
|
||||
|
||||
# List of all files packaged with this module
|
||||
# FileList = @()
|
||||
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData = @{
|
||||
|
||||
PSData = @{
|
||||
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
# Tags = @()
|
||||
|
||||
# A URL to the license for this module.
|
||||
# LicenseUri = ''
|
||||
|
||||
# A URL to the main website for this project.
|
||||
# ProjectUri = ''
|
||||
|
||||
# A URL to an icon representing this module.
|
||||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
# ReleaseNotes = ''
|
||||
|
||||
} # End of PSData hashtable
|
||||
|
||||
} # End of PrivateData hashtable
|
||||
|
||||
# HelpInfo URI of this module
|
||||
# HelpInfoURI = ''
|
||||
|
||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||
# DefaultCommandPrefix = ''
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
## Internal stuff
|
||||
function AsciiWriteHostWrapper {
|
||||
param(
|
||||
[parameter(Position=0)] [string] $message = "",
|
||||
[Alias('f')] $foregroundColor,
|
||||
[Alias('b')] $backgroundColor
|
||||
)
|
||||
$pp = @{}
|
||||
$pp['NoNewline'] = $true
|
||||
$pp['Object'] = $message
|
||||
if ($foregroundColor) { $pp['foregroundColor'] = $foregroundColor }
|
||||
if ($backgroundColor) { $pp['backgroundColor'] = $backgroundColor }
|
||||
|
||||
write-host @pp
|
||||
}
|
||||
set-alias whw AsciiWriteHostWrapper
|
||||
function Newline {write-host ""}
|
||||
$psv = "Powershell $($PsVersionTable.PSVersion.ToString())"
|
||||
try {
|
||||
$osv = [System.Environment]::OSVersion.VersionString
|
||||
}
|
||||
catch {
|
||||
$osv = /usr/bin/uname -a
|
||||
}
|
||||
|
||||
## Exported functions
|
||||
|
||||
function Show-AsciiHatchet {
|
||||
newline
|
||||
whw " /'-./\_" -f white; newline
|
||||
whw " : " -f white; whw -f darkred "||"; whw ",>" -f white; newline
|
||||
whw " \.-'" -f white; whw -f darkred "||"; newline
|
||||
whw " ||" -f darkred; whw -f green " BURIED"; newline
|
||||
whw " ||" -f darkred; whw -f green " HATCHET"; newline
|
||||
whw " ||" -f darkred; newline
|
||||
newline
|
||||
}
|
||||
|
||||
function Show-AsciiMetroid {
|
||||
$EE = "$([char]926)$([char]926)"
|
||||
whw -f green " .---."; newline
|
||||
whw -f green " / "; whw -f red "@" ; whw -f green " \"; newline
|
||||
whw -f green " \ "; whw -f red "@ @"; whw -f green " /"; newline
|
||||
whw -f yellow " {'"; whw -f green "^"; whw -f yellow "'}"; newline
|
||||
whw -f white " -- SQU$EE!!"; newline
|
||||
}
|
||||
|
||||
function Show-AsciiBWWindowsLogo {
|
||||
# Originally from http://www.asciiworld.com/-Logos,50-.html
|
||||
write-host ' ,-~¨^ ^¨-, _,'
|
||||
write-host ' / / ;^-._...,¨/'
|
||||
write-host ' / / / /'
|
||||
write-host ' / / / /'
|
||||
write-host ' / / / /'
|
||||
write-host " /,.-:''-,_ / / /"
|
||||
write-host ' _,.-:--._ ^ ^:-._ __../'
|
||||
write-host ' /^ / /¨:.._¨__.;'
|
||||
write-host ' / / / ^ /'
|
||||
write-host ' / / / /'
|
||||
write-host ' / / / /'
|
||||
write-host ' /_,.--:^-._/ / /'
|
||||
write-host '^ ^¨¨-.___.:^'
|
||||
}
|
||||
|
||||
function Show-AsciiCurvyWindowsLogo {
|
||||
newline
|
||||
whw -f red ' ,-~ ~-,' ; whw -f green ' ,_~ ~-, ' ; newline
|
||||
whw -f red ' / /' ; whw -f green ' / / ' ; newline
|
||||
whw -f red ' /,- -,/' ; whw -f green ' /,- -,/ ' ; whw $psv ; newline
|
||||
whw -f blue ' ,-~ ~-,' ; whw -f yellow ' ,_~ ~-, ' ; newline
|
||||
whw -f blue ' / /' ; whw -f yellow ' / / ' ; whw $osv ; newline
|
||||
whw -f blue ' /,- -,/' ; whw -f yellow ' /,- -,/ ' ; newline
|
||||
newline
|
||||
}
|
||||
|
||||
function Show-AsciiSquareWindowsLogo {
|
||||
$spaces = ' '
|
||||
whw ' '; whw -b red $spaces; whw -b green $spaces ; newline
|
||||
whw ' '; whw -b red $spaces; whw -b green $spaces ; whw "$psv" ; newline
|
||||
whw ' '; whw -b blue $spaces; whw -b yellow $spaces ; whw "$osv" ; newline
|
||||
whw ' '; whw -b blue $spaces; whw -b yellow $spaces ; newline
|
||||
}
|
||||
|
||||
Export-ModuleMember -function Show-Ascii*
|
Loading…
Reference in new issue