Initial commit

This commit is contained in:
2025-04-29 20:54:26 +03:00
commit bf7f6c29be
11 changed files with 291 additions and 0 deletions

19
.editorconfig Normal file
View File

@@ -0,0 +1,19 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[*.ps1]
charset = utf-8-bom
end_of_line = crlf
[*.{cmd,bat}]
end_of_line = crlf
[*.md]
trim_trailing_whitespace = false

21
LICENSE.md Normal file
View File

@@ -0,0 +1,21 @@
# MIT License
Copyright (c) 2025 Yuri Plashenkov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

60
README.md Normal file
View File

@@ -0,0 +1,60 @@
# Powerline scripts for bash, ash, PowerShell, and cmd
![Powerline for bash, ash, PowerShell, and cmd](powerline.svg)
Ensure you use a font that supports Powerline characters, such as [JetBrains Mono](https://www.jetbrains.com/lp/mono/).
## Bash
Add the contents of the `bash/powerline.sh` script to your `~/.bashrc` file.
Customize the variables (e.g., label and color). You can use the `bash/colors.sh` script to select a color.
## Ash (e.g., OpenWrt)
Add the contents of the `ash/powerline.sh` script to your `~/.profile` file.
Customize the label and color. You can use the `bash/colors.sh` script to select a color.
## PowerShell
First, enable the execution of PowerShell scripts (including profiles) by running the following command as an administrator:
```powershell
Set-ExecutionPolicy RemoteSigned
```
Next, locate your PowerShell profile file by running:
```powershell
$PROFILE
```
Copy the contents of the `powershell\powerline.ps1` file into your PowerShell profile file.
For older PowerShell versions (e.g., PowerShell 5), ensure the profile script is saved in UTF-8 *with BOM* encoding.
Customize the variables (e.g., label, color, adminColor). You can run the `powershell\colors.ps1` script to select colors.
To suppress system information on PowerShell startup, add the `-NoLogo` switch to the command line in your `PowerShell` profiles within your Terminal application:
```ps1
pwsh -NoLogo # newer PowerShell
powershell -NoLogo # legacy PowerShell
```
## cmd
Save the `cmd\prompt.cmd` file somewhere on your disk. Then, update the command line in your `cmd` profile within your Terminal application as follows:
```ps1
cmd /k "C:\path\to\prompt.cmd"
```
## Credits
- [Yuri Plashenkov](https://plashenkov.com)
## License
This package is licensed under the [MIT license](LICENSE.md).

5
ash/powerline.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
# 30 is the color you may want to modify, \h is the label
PS1="\n\[\e[1;48;5;30;38;5;231m\] \h \[\e[;38;5;30;48;5;240m\]\[\e[38;5;252m\] \w \[\e[;38;5;240m\]\[\e[m\] "

13
bash/colors.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
label="localhost"
bold=1
prompt_part() { printf "\e[$2;38;5;$3;48;5;${4}m $1 \e[;38;5;$4${5+;48;5;$5}m"; }
for color in {0..255}; do
printf "\n"
prompt_part "$label" $bold 231 $color 240
prompt_part "~" 0 252 240
printf "\e[m $color\n"
done

21
bash/powerline.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
prompt() {
local label="\h"
local color=30 # 30 green, 131 red
local bold=1
prompt_part() { PS1+="\[\e[$2;38;5;$3;48;5;${4}m\] $1 \[\e[;38;5;$4${5+;48;5;$5}m\]"; }
PS1="\n"
if [ -n "$MC_SID" ]; then
prompt_part "$label" $bold 231 $color 237
prompt_part "mc" $bold 231 237 240
else
prompt_part "$label" $bold 231 $color 240
fi
prompt_part "\w" 0 252 240
PS1+="\[\e[m\] "
}
PROMPT_COMMAND=prompt

11
cmd/prompt.cmd Normal file
View File

@@ -0,0 +1,11 @@
@echo off
chcp 65001 >nul
set label=cmd
set color=67
set adminColor=88
set bold=1
net session >nul 2>nul && set color=%adminColor%
prompt $e[%bold%;48;5;%color%;38;5;231m %label% $e[;38;5;%color%;48;5;240m$e[38;5;252m $p $e[;38;5;240m$e[m

BIN
powerline.afdesign Normal file

Binary file not shown.

115
powerline.svg Normal file
View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 509 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,-110,-48)">
<path d="M315,48L351,98L315,148L110,148L110,48L315,48Z" style="fill:rgb(0,135,175);"/>
</g>
<g transform="matrix(0.456432,0,0,1,154.793,-48)">
<path d="M315.945,48L394.818,98L315.945,148L125.336,148L204.209,98L125.336,48L315.945,48Z" style="fill:rgb(83,85,84);"/>
</g>
<g transform="matrix(0.456432,0,0,1,248.793,-48)">
<path d="M491.218,48L570.091,98L491.218,148L125.336,148L204.209,98L125.336,48L491.218,48Z" style="fill:rgb(83,85,84);"/>
</g>
<g transform="matrix(1,0,0,1,226.875,-59.6442)">
<g transform="matrix(18.6667,0,0,18.6667,131.485,82.7642)">
<path d="M0.347,0.01C0.307,0.01 0.274,0 0.248,-0.019C0.222,-0.038 0.206,-0.066 0.199,-0.101L0.199,-0L0.077,-0L0.077,-0.73L0.202,-0.73L0.202,-0.576L0.198,-0.445C0.204,-0.481 0.22,-0.509 0.247,-0.53C0.273,-0.55 0.306,-0.56 0.347,-0.56C0.402,-0.56 0.447,-0.541 0.48,-0.503C0.513,-0.465 0.53,-0.414 0.53,-0.349L0.53,-0.2C0.53,-0.135 0.513,-0.084 0.48,-0.047C0.447,-0.009 0.402,0.01 0.347,0.01ZM0.303,-0.098C0.335,-0.098 0.36,-0.107 0.378,-0.126C0.396,-0.145 0.405,-0.171 0.405,-0.206L0.405,-0.344C0.405,-0.379 0.396,-0.405 0.378,-0.424C0.36,-0.443 0.335,-0.452 0.303,-0.452C0.271,-0.452 0.246,-0.443 0.229,-0.424C0.211,-0.405 0.202,-0.378 0.202,-0.344L0.202,-0.206C0.202,-0.172 0.211,-0.146 0.229,-0.127C0.246,-0.108 0.271,-0.098 0.303,-0.098Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,142.685,82.7642)">
<path d="M0.239,0.01C0.182,0.01 0.138,-0.005 0.105,-0.035C0.072,-0.064 0.056,-0.105 0.056,-0.156C0.056,-0.21 0.075,-0.252 0.112,-0.282C0.149,-0.311 0.201,-0.326 0.268,-0.326L0.4,-0.326L0.4,-0.372C0.4,-0.399 0.391,-0.419 0.374,-0.434C0.357,-0.449 0.332,-0.456 0.301,-0.456C0.272,-0.456 0.249,-0.45 0.231,-0.438C0.212,-0.426 0.202,-0.41 0.2,-0.39L0.081,-0.39C0.084,-0.441 0.106,-0.483 0.147,-0.514C0.188,-0.545 0.24,-0.56 0.305,-0.56C0.373,-0.56 0.427,-0.543 0.466,-0.51C0.505,-0.477 0.525,-0.431 0.525,-0.373L0.525,-0L0.404,-0L0.404,-0.093L0.402,-0.093C0.395,-0.061 0.377,-0.036 0.348,-0.018C0.319,0.001 0.283,0.01 0.239,0.01ZM0.28,-0.083C0.315,-0.083 0.344,-0.092 0.367,-0.11C0.389,-0.127 0.4,-0.151 0.4,-0.18L0.4,-0.246L0.271,-0.246C0.243,-0.246 0.221,-0.239 0.205,-0.225C0.189,-0.21 0.181,-0.191 0.181,-0.166C0.181,-0.14 0.19,-0.12 0.208,-0.105C0.225,-0.09 0.249,-0.083 0.28,-0.083Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,153.885,82.7642)">
<path d="M0.279,0.009C0.237,0.009 0.2,0.003 0.168,-0.011C0.136,-0.023 0.111,-0.042 0.094,-0.066C0.076,-0.09 0.067,-0.118 0.067,-0.151L0.193,-0.151C0.193,-0.132 0.201,-0.117 0.217,-0.107C0.232,-0.096 0.253,-0.091 0.28,-0.091L0.323,-0.091C0.354,-0.091 0.378,-0.097 0.393,-0.108C0.408,-0.119 0.416,-0.135 0.416,-0.155C0.416,-0.193 0.388,-0.216 0.331,-0.225L0.254,-0.235C0.139,-0.252 0.081,-0.307 0.081,-0.4C0.081,-0.452 0.098,-0.492 0.134,-0.519C0.169,-0.546 0.219,-0.559 0.286,-0.559L0.324,-0.559C0.386,-0.559 0.436,-0.545 0.474,-0.518C0.511,-0.49 0.53,-0.453 0.53,-0.408L0.404,-0.408C0.404,-0.424 0.397,-0.436 0.383,-0.446C0.369,-0.455 0.349,-0.459 0.323,-0.459L0.285,-0.459C0.23,-0.459 0.203,-0.439 0.203,-0.4C0.203,-0.366 0.227,-0.345 0.276,-0.338L0.354,-0.326C0.416,-0.317 0.462,-0.299 0.493,-0.272C0.523,-0.245 0.538,-0.207 0.538,-0.158C0.538,-0.105 0.52,-0.064 0.484,-0.035C0.447,-0.006 0.394,0.009 0.323,0.009L0.279,0.009Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,165.085,82.7642)">
<path d="M0.077,-0L0.077,-0.73L0.202,-0.73L0.202,-0.55L0.199,-0.445L0.201,-0.445C0.207,-0.481 0.223,-0.509 0.248,-0.53C0.273,-0.55 0.306,-0.56 0.347,-0.56C0.401,-0.56 0.444,-0.542 0.477,-0.506C0.509,-0.47 0.525,-0.422 0.525,-0.361L0.525,-0L0.4,-0L0.4,-0.348C0.4,-0.381 0.391,-0.407 0.374,-0.425C0.356,-0.443 0.332,-0.452 0.302,-0.452C0.271,-0.452 0.246,-0.443 0.229,-0.424C0.211,-0.405 0.202,-0.379 0.202,-0.344L0.202,-0L0.077,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,131.485,105.164)">
<path d="M0.239,0.01C0.182,0.01 0.138,-0.005 0.105,-0.035C0.072,-0.064 0.056,-0.105 0.056,-0.156C0.056,-0.21 0.075,-0.252 0.112,-0.282C0.149,-0.311 0.201,-0.326 0.268,-0.326L0.4,-0.326L0.4,-0.372C0.4,-0.399 0.391,-0.419 0.374,-0.434C0.357,-0.449 0.332,-0.456 0.301,-0.456C0.272,-0.456 0.249,-0.45 0.231,-0.438C0.212,-0.426 0.202,-0.41 0.2,-0.39L0.081,-0.39C0.084,-0.441 0.106,-0.483 0.147,-0.514C0.188,-0.545 0.24,-0.56 0.305,-0.56C0.373,-0.56 0.427,-0.543 0.466,-0.51C0.505,-0.477 0.525,-0.431 0.525,-0.373L0.525,-0L0.404,-0L0.404,-0.093L0.402,-0.093C0.395,-0.061 0.377,-0.036 0.348,-0.018C0.319,0.001 0.283,0.01 0.239,0.01ZM0.28,-0.083C0.315,-0.083 0.344,-0.092 0.367,-0.11C0.389,-0.127 0.4,-0.151 0.4,-0.18L0.4,-0.246L0.271,-0.246C0.243,-0.246 0.221,-0.239 0.205,-0.225C0.189,-0.21 0.181,-0.191 0.181,-0.166C0.181,-0.14 0.19,-0.12 0.208,-0.105C0.225,-0.09 0.249,-0.083 0.28,-0.083Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,142.685,105.164)">
<path d="M0.279,0.009C0.237,0.009 0.2,0.003 0.168,-0.011C0.136,-0.023 0.111,-0.042 0.094,-0.066C0.076,-0.09 0.067,-0.118 0.067,-0.151L0.193,-0.151C0.193,-0.132 0.201,-0.117 0.217,-0.107C0.232,-0.096 0.253,-0.091 0.28,-0.091L0.323,-0.091C0.354,-0.091 0.378,-0.097 0.393,-0.108C0.408,-0.119 0.416,-0.135 0.416,-0.155C0.416,-0.193 0.388,-0.216 0.331,-0.225L0.254,-0.235C0.139,-0.252 0.081,-0.307 0.081,-0.4C0.081,-0.452 0.098,-0.492 0.134,-0.519C0.169,-0.546 0.219,-0.559 0.286,-0.559L0.324,-0.559C0.386,-0.559 0.436,-0.545 0.474,-0.518C0.511,-0.49 0.53,-0.453 0.53,-0.408L0.404,-0.408C0.404,-0.424 0.397,-0.436 0.383,-0.446C0.369,-0.455 0.349,-0.459 0.323,-0.459L0.285,-0.459C0.23,-0.459 0.203,-0.439 0.203,-0.4C0.203,-0.366 0.227,-0.345 0.276,-0.338L0.354,-0.326C0.416,-0.317 0.462,-0.299 0.493,-0.272C0.523,-0.245 0.538,-0.207 0.538,-0.158C0.538,-0.105 0.52,-0.064 0.484,-0.035C0.447,-0.006 0.394,0.009 0.323,0.009L0.279,0.009Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,153.885,105.164)">
<path d="M0.077,-0L0.077,-0.73L0.202,-0.73L0.202,-0.55L0.199,-0.445L0.201,-0.445C0.207,-0.481 0.223,-0.509 0.248,-0.53C0.273,-0.55 0.306,-0.56 0.347,-0.56C0.401,-0.56 0.444,-0.542 0.477,-0.506C0.509,-0.47 0.525,-0.422 0.525,-0.361L0.525,-0L0.4,-0L0.4,-0.348C0.4,-0.381 0.391,-0.407 0.374,-0.425C0.356,-0.443 0.332,-0.452 0.302,-0.452C0.271,-0.452 0.246,-0.443 0.229,-0.424C0.211,-0.405 0.202,-0.379 0.202,-0.344L0.202,-0L0.077,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,131.485,127.564)">
<path d="M0.077,-0L0.077,-0.73L0.32,-0.73C0.369,-0.73 0.411,-0.721 0.448,-0.702C0.484,-0.683 0.512,-0.657 0.532,-0.624C0.552,-0.59 0.562,-0.55 0.562,-0.505C0.562,-0.46 0.552,-0.42 0.532,-0.387C0.512,-0.353 0.484,-0.327 0.448,-0.308C0.411,-0.289 0.369,-0.28 0.32,-0.28L0.202,-0.28L0.202,-0L0.077,-0ZM0.202,-0.39L0.32,-0.39C0.355,-0.39 0.383,-0.401 0.404,-0.422C0.425,-0.443 0.435,-0.471 0.435,-0.505C0.435,-0.539 0.425,-0.567 0.404,-0.588C0.383,-0.609 0.355,-0.62 0.32,-0.62L0.202,-0.62L0.202,-0.39Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,142.685,127.564)">
<path d="M0.3,0.009C0.229,0.009 0.173,-0.011 0.132,-0.05C0.091,-0.089 0.07,-0.141 0.07,-0.207L0.07,-0.343C0.07,-0.409 0.091,-0.462 0.132,-0.501C0.173,-0.54 0.229,-0.559 0.3,-0.559C0.371,-0.559 0.427,-0.54 0.468,-0.501C0.509,-0.462 0.53,-0.409 0.53,-0.344L0.53,-0.207C0.53,-0.141 0.509,-0.089 0.468,-0.05C0.427,-0.011 0.371,0.009 0.3,0.009ZM0.3,-0.1C0.333,-0.1 0.359,-0.109 0.378,-0.128C0.396,-0.146 0.405,-0.172 0.405,-0.207L0.405,-0.343C0.405,-0.378 0.396,-0.404 0.378,-0.423C0.359,-0.441 0.333,-0.45 0.3,-0.45C0.267,-0.45 0.241,-0.441 0.223,-0.423C0.204,-0.404 0.195,-0.378 0.195,-0.343L0.195,-0.207C0.195,-0.172 0.204,-0.146 0.223,-0.128C0.241,-0.109 0.267,-0.1 0.3,-0.1Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,153.885,127.564)">
<path d="M0.104,-0L0.02,-0.55L0.12,-0.55L0.166,-0.213C0.169,-0.194 0.171,-0.172 0.173,-0.149C0.174,-0.126 0.176,-0.106 0.177,-0.091L0.182,-0.091C0.183,-0.106 0.185,-0.126 0.188,-0.149C0.191,-0.171 0.193,-0.193 0.196,-0.213L0.249,-0.55L0.353,-0.55L0.404,-0.213C0.407,-0.194 0.409,-0.172 0.412,-0.149C0.415,-0.125 0.417,-0.105 0.418,-0.09L0.423,-0.09C0.424,-0.106 0.426,-0.126 0.428,-0.149C0.43,-0.171 0.432,-0.193 0.435,-0.213L0.483,-0.55L0.58,-0.55L0.494,-0L0.365,-0L0.317,-0.339C0.314,-0.358 0.312,-0.379 0.309,-0.402C0.306,-0.425 0.303,-0.443 0.302,-0.458L0.298,-0.458C0.296,-0.443 0.294,-0.425 0.291,-0.402C0.288,-0.379 0.286,-0.358 0.283,-0.339L0.233,-0L0.104,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,165.085,127.564)">
<path d="M0.301,0.01C0.254,0.01 0.214,0.001 0.179,-0.017C0.144,-0.035 0.118,-0.06 0.099,-0.093C0.08,-0.125 0.07,-0.163 0.07,-0.206L0.07,-0.344C0.07,-0.387 0.08,-0.425 0.099,-0.458C0.118,-0.49 0.144,-0.515 0.179,-0.533C0.214,-0.551 0.254,-0.56 0.301,-0.56C0.347,-0.56 0.387,-0.551 0.422,-0.533C0.456,-0.515 0.483,-0.49 0.502,-0.458C0.521,-0.425 0.53,-0.387 0.53,-0.344L0.53,-0.245L0.191,-0.245L0.191,-0.206C0.191,-0.128 0.228,-0.089 0.302,-0.089C0.359,-0.089 0.393,-0.108 0.403,-0.146L0.526,-0.146C0.517,-0.099 0.492,-0.061 0.451,-0.033C0.409,-0.004 0.36,0.01 0.301,0.01ZM0.191,-0.344L0.191,-0.323L0.409,-0.324L0.409,-0.345C0.409,-0.383 0.4,-0.412 0.382,-0.433C0.364,-0.453 0.337,-0.463 0.301,-0.463C0.264,-0.463 0.237,-0.453 0.219,-0.432C0.2,-0.411 0.191,-0.382 0.191,-0.344Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,176.285,127.564)">
<path d="M0.093,-0L0.093,-0.55L0.215,-0.55L0.215,-0.445L0.218,-0.445C0.223,-0.481 0.239,-0.509 0.266,-0.53C0.293,-0.55 0.327,-0.56 0.368,-0.56C0.425,-0.56 0.47,-0.542 0.504,-0.505C0.538,-0.468 0.555,-0.417 0.555,-0.353L0.555,-0.308L0.424,-0.308L0.424,-0.344C0.424,-0.378 0.415,-0.405 0.398,-0.424C0.38,-0.443 0.354,-0.452 0.321,-0.452C0.252,-0.452 0.218,-0.414 0.218,-0.337L0.218,-0L0.093,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,187.485,127.564)">
<path d="M0.302,0.01C0.252,0.01 0.209,0.002 0.173,-0.016C0.136,-0.033 0.108,-0.057 0.088,-0.088C0.067,-0.119 0.057,-0.155 0.057,-0.197L0.182,-0.197C0.182,-0.167 0.193,-0.143 0.215,-0.126C0.237,-0.108 0.266,-0.099 0.303,-0.099C0.339,-0.099 0.367,-0.108 0.388,-0.125C0.408,-0.142 0.418,-0.166 0.418,-0.196C0.418,-0.221 0.411,-0.242 0.397,-0.26C0.383,-0.277 0.364,-0.289 0.339,-0.296L0.251,-0.32C0.194,-0.335 0.15,-0.362 0.119,-0.4C0.088,-0.437 0.072,-0.483 0.072,-0.536C0.072,-0.598 0.093,-0.648 0.134,-0.685C0.175,-0.721 0.231,-0.74 0.301,-0.74C0.372,-0.74 0.428,-0.722 0.47,-0.686C0.511,-0.649 0.532,-0.6 0.532,-0.539L0.407,-0.539C0.407,-0.567 0.398,-0.589 0.379,-0.606C0.36,-0.623 0.333,-0.631 0.3,-0.631C0.267,-0.631 0.242,-0.623 0.224,-0.607C0.205,-0.59 0.196,-0.567 0.196,-0.538C0.196,-0.515 0.203,-0.496 0.217,-0.479C0.23,-0.462 0.25,-0.451 0.276,-0.444L0.365,-0.419C0.422,-0.404 0.466,-0.377 0.497,-0.34C0.528,-0.302 0.543,-0.255 0.543,-0.2C0.543,-0.158 0.533,-0.121 0.513,-0.09C0.493,-0.058 0.465,-0.033 0.429,-0.016C0.393,0.001 0.351,0.01 0.302,0.01Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,198.685,127.564)">
<path d="M0.077,-0L0.077,-0.73L0.202,-0.73L0.202,-0.55L0.199,-0.445L0.201,-0.445C0.207,-0.481 0.223,-0.509 0.248,-0.53C0.273,-0.55 0.306,-0.56 0.347,-0.56C0.401,-0.56 0.444,-0.542 0.477,-0.506C0.509,-0.47 0.525,-0.422 0.525,-0.361L0.525,-0L0.4,-0L0.4,-0.348C0.4,-0.381 0.391,-0.407 0.374,-0.425C0.356,-0.443 0.332,-0.452 0.302,-0.452C0.271,-0.452 0.246,-0.443 0.229,-0.424C0.211,-0.405 0.202,-0.379 0.202,-0.344L0.202,-0L0.077,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,209.885,127.564)">
<path d="M0.301,0.01C0.254,0.01 0.214,0.001 0.179,-0.017C0.144,-0.035 0.118,-0.06 0.099,-0.093C0.08,-0.125 0.07,-0.163 0.07,-0.206L0.07,-0.344C0.07,-0.387 0.08,-0.425 0.099,-0.458C0.118,-0.49 0.144,-0.515 0.179,-0.533C0.214,-0.551 0.254,-0.56 0.301,-0.56C0.347,-0.56 0.387,-0.551 0.422,-0.533C0.456,-0.515 0.483,-0.49 0.502,-0.458C0.521,-0.425 0.53,-0.387 0.53,-0.344L0.53,-0.245L0.191,-0.245L0.191,-0.206C0.191,-0.128 0.228,-0.089 0.302,-0.089C0.359,-0.089 0.393,-0.108 0.403,-0.146L0.526,-0.146C0.517,-0.099 0.492,-0.061 0.451,-0.033C0.409,-0.004 0.36,0.01 0.301,0.01ZM0.191,-0.344L0.191,-0.323L0.409,-0.324L0.409,-0.345C0.409,-0.383 0.4,-0.412 0.382,-0.433C0.364,-0.453 0.337,-0.463 0.301,-0.463C0.264,-0.463 0.237,-0.453 0.219,-0.432C0.2,-0.411 0.191,-0.382 0.191,-0.344Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,221.085,127.564)">
<path d="M0.389,-0C0.334,-0 0.291,-0.016 0.258,-0.049C0.225,-0.082 0.208,-0.125 0.208,-0.178L0.208,-0.617L0.027,-0.617L0.027,-0.73L0.333,-0.73L0.333,-0.181C0.333,-0.16 0.339,-0.144 0.351,-0.132C0.362,-0.119 0.378,-0.113 0.398,-0.113L0.559,-0.113L0.559,-0L0.389,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,232.285,127.564)">
<path d="M0.389,-0C0.334,-0 0.291,-0.016 0.258,-0.049C0.225,-0.082 0.208,-0.125 0.208,-0.178L0.208,-0.617L0.027,-0.617L0.027,-0.73L0.333,-0.73L0.333,-0.181C0.333,-0.16 0.339,-0.144 0.351,-0.132C0.362,-0.119 0.378,-0.113 0.398,-0.113L0.559,-0.113L0.559,-0L0.389,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,131.485,149.964)">
<path d="M0.303,0.01C0.256,0.01 0.216,0.001 0.181,-0.017C0.146,-0.034 0.118,-0.059 0.099,-0.092C0.08,-0.124 0.07,-0.162 0.07,-0.206L0.07,-0.344C0.07,-0.388 0.08,-0.426 0.099,-0.459C0.118,-0.491 0.146,-0.516 0.181,-0.534C0.216,-0.551 0.256,-0.56 0.303,-0.56C0.372,-0.56 0.428,-0.542 0.469,-0.507C0.51,-0.471 0.532,-0.422 0.534,-0.361L0.412,-0.361C0.41,-0.39 0.399,-0.412 0.38,-0.428C0.36,-0.443 0.334,-0.451 0.303,-0.451C0.27,-0.451 0.243,-0.442 0.224,-0.424C0.205,-0.405 0.195,-0.379 0.195,-0.345L0.195,-0.206C0.195,-0.172 0.205,-0.146 0.224,-0.127C0.243,-0.108 0.27,-0.099 0.303,-0.099C0.335,-0.099 0.361,-0.107 0.38,-0.123C0.399,-0.138 0.41,-0.16 0.412,-0.189L0.534,-0.189C0.532,-0.128 0.51,-0.079 0.469,-0.044C0.428,-0.008 0.372,0.01 0.303,0.01Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,142.685,149.964)">
<path d="M0.049,-0L0.049,-0.55L0.151,-0.55L0.151,-0.476L0.156,-0.476C0.159,-0.501 0.169,-0.522 0.186,-0.537C0.203,-0.552 0.223,-0.56 0.248,-0.56C0.271,-0.56 0.29,-0.552 0.307,-0.537C0.324,-0.522 0.335,-0.501 0.341,-0.476L0.344,-0.476C0.348,-0.501 0.359,-0.522 0.376,-0.537C0.393,-0.552 0.414,-0.56 0.439,-0.56C0.472,-0.56 0.498,-0.547 0.52,-0.521C0.541,-0.494 0.551,-0.46 0.551,-0.419L0.551,-0L0.443,-0L0.443,-0.41C0.443,-0.449 0.427,-0.468 0.395,-0.468C0.363,-0.468 0.347,-0.449 0.347,-0.41L0.347,-0L0.253,-0L0.253,-0.41C0.253,-0.449 0.237,-0.468 0.205,-0.468C0.174,-0.468 0.158,-0.449 0.158,-0.41L0.158,-0L0.049,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(18.6667,0,0,18.6667,153.885,149.964)">
<path d="M0.25,0.01C0.197,0.01 0.153,-0.009 0.12,-0.047C0.087,-0.085 0.07,-0.136 0.07,-0.2L0.07,-0.349C0.07,-0.414 0.087,-0.465 0.12,-0.503C0.153,-0.541 0.196,-0.56 0.25,-0.56C0.288,-0.56 0.32,-0.551 0.346,-0.532C0.372,-0.513 0.39,-0.486 0.4,-0.451L0.402,-0.451L0.398,-0.576L0.398,-0.73L0.523,-0.73L0.523,-0L0.401,-0L0.401,-0.099L0.4,-0.099C0.39,-0.064 0.372,-0.038 0.347,-0.019C0.321,0.001 0.289,0.01 0.25,0.01ZM0.297,-0.098C0.329,-0.098 0.354,-0.108 0.372,-0.127C0.389,-0.146 0.398,-0.174 0.398,-0.209L0.398,-0.341C0.398,-0.376 0.389,-0.404 0.372,-0.423C0.354,-0.442 0.329,-0.452 0.297,-0.452C0.265,-0.452 0.24,-0.443 0.222,-0.424C0.204,-0.405 0.195,-0.379 0.195,-0.344L0.195,-0.206C0.195,-0.171 0.204,-0.145 0.222,-0.126C0.24,-0.107 0.265,-0.098 0.297,-0.098Z" style="fill:white;fill-rule:nonzero;"/>
</g>
</g>
<g transform="matrix(1,0,0,1,54.9149,-24.6342)">
<g transform="matrix(30,0,0,30,203.485,82.7642)">
<path d="M0.205,-0L0.205,-0.376L0.054,-0.376L0.054,-0.489L0.205,-0.489L0.205,-0.572C0.205,-0.62 0.221,-0.658 0.253,-0.687C0.285,-0.716 0.327,-0.73 0.38,-0.73L0.541,-0.73L0.541,-0.62L0.383,-0.62C0.367,-0.62 0.354,-0.616 0.345,-0.607C0.335,-0.598 0.33,-0.585 0.33,-0.57L0.33,-0.489L0.541,-0.489L0.541,-0.376L0.33,-0.376L0.33,-0L0.205,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,221.485,82.7642)">
<path d="M0.3,0.009C0.229,0.009 0.173,-0.011 0.132,-0.05C0.091,-0.089 0.07,-0.141 0.07,-0.207L0.07,-0.343C0.07,-0.409 0.091,-0.462 0.132,-0.501C0.173,-0.54 0.229,-0.559 0.3,-0.559C0.371,-0.559 0.427,-0.54 0.468,-0.501C0.509,-0.462 0.53,-0.409 0.53,-0.344L0.53,-0.207C0.53,-0.141 0.509,-0.089 0.468,-0.05C0.427,-0.011 0.371,0.009 0.3,0.009ZM0.3,-0.1C0.333,-0.1 0.359,-0.109 0.378,-0.128C0.396,-0.146 0.405,-0.172 0.405,-0.207L0.405,-0.343C0.405,-0.378 0.396,-0.404 0.378,-0.423C0.359,-0.441 0.333,-0.45 0.3,-0.45C0.267,-0.45 0.241,-0.441 0.223,-0.423C0.204,-0.404 0.195,-0.378 0.195,-0.343L0.195,-0.207C0.195,-0.172 0.204,-0.146 0.223,-0.128C0.241,-0.109 0.267,-0.1 0.3,-0.1Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,239.485,82.7642)">
<path d="M0.093,-0L0.093,-0.55L0.215,-0.55L0.215,-0.445L0.218,-0.445C0.223,-0.481 0.239,-0.509 0.266,-0.53C0.293,-0.55 0.327,-0.56 0.368,-0.56C0.425,-0.56 0.47,-0.542 0.504,-0.505C0.538,-0.468 0.555,-0.417 0.555,-0.353L0.555,-0.308L0.424,-0.308L0.424,-0.344C0.424,-0.378 0.415,-0.405 0.398,-0.424C0.38,-0.443 0.354,-0.452 0.321,-0.452C0.252,-0.452 0.218,-0.414 0.218,-0.337L0.218,-0L0.093,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
</g>
<g transform="matrix(1,0,0,1,-111.275,-23.8092)">
<g transform="matrix(30,0,0,30,140.485,82.7642)">
<path d="M0.077,0.18L0.077,-0.55L0.199,-0.55L0.199,-0.451L0.201,-0.451C0.211,-0.486 0.229,-0.513 0.255,-0.532C0.28,-0.551 0.312,-0.56 0.35,-0.56C0.404,-0.56 0.448,-0.541 0.481,-0.503C0.514,-0.465 0.53,-0.414 0.53,-0.35L0.53,-0.201C0.53,-0.136 0.514,-0.085 0.481,-0.047C0.448,-0.009 0.404,0.01 0.35,0.01C0.313,0.01 0.281,0.001 0.255,-0.019C0.229,-0.038 0.211,-0.064 0.201,-0.099L0.199,-0.099L0.202,0.026L0.202,0.18L0.077,0.18ZM0.304,-0.098C0.336,-0.098 0.361,-0.107 0.379,-0.126C0.396,-0.145 0.405,-0.171 0.405,-0.206L0.405,-0.344C0.405,-0.379 0.396,-0.405 0.379,-0.424C0.361,-0.443 0.336,-0.452 0.304,-0.452C0.272,-0.452 0.247,-0.442 0.229,-0.423C0.211,-0.404 0.202,-0.376 0.202,-0.341L0.202,-0.209C0.202,-0.174 0.211,-0.146 0.229,-0.127C0.247,-0.108 0.272,-0.098 0.304,-0.098Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,158.485,82.7642)">
<path d="M0.3,0.009C0.229,0.009 0.173,-0.011 0.132,-0.05C0.091,-0.089 0.07,-0.141 0.07,-0.207L0.07,-0.343C0.07,-0.409 0.091,-0.462 0.132,-0.501C0.173,-0.54 0.229,-0.559 0.3,-0.559C0.371,-0.559 0.427,-0.54 0.468,-0.501C0.509,-0.462 0.53,-0.409 0.53,-0.344L0.53,-0.207C0.53,-0.141 0.509,-0.089 0.468,-0.05C0.427,-0.011 0.371,0.009 0.3,0.009ZM0.3,-0.1C0.333,-0.1 0.359,-0.109 0.378,-0.128C0.396,-0.146 0.405,-0.172 0.405,-0.207L0.405,-0.343C0.405,-0.378 0.396,-0.404 0.378,-0.423C0.359,-0.441 0.333,-0.45 0.3,-0.45C0.267,-0.45 0.241,-0.441 0.223,-0.423C0.204,-0.404 0.195,-0.378 0.195,-0.343L0.195,-0.207C0.195,-0.172 0.204,-0.146 0.223,-0.128C0.241,-0.109 0.267,-0.1 0.3,-0.1Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,176.485,82.7642)">
<path d="M0.104,-0L0.02,-0.55L0.12,-0.55L0.166,-0.213C0.169,-0.194 0.171,-0.172 0.173,-0.149C0.174,-0.126 0.176,-0.106 0.177,-0.091L0.182,-0.091C0.183,-0.106 0.185,-0.126 0.188,-0.149C0.191,-0.171 0.193,-0.193 0.196,-0.213L0.249,-0.55L0.353,-0.55L0.404,-0.213C0.407,-0.194 0.409,-0.172 0.412,-0.149C0.415,-0.125 0.417,-0.105 0.418,-0.09L0.423,-0.09C0.424,-0.106 0.426,-0.126 0.428,-0.149C0.43,-0.171 0.432,-0.193 0.435,-0.213L0.483,-0.55L0.58,-0.55L0.494,-0L0.365,-0L0.317,-0.339C0.314,-0.358 0.312,-0.379 0.309,-0.402C0.306,-0.425 0.303,-0.443 0.302,-0.458L0.298,-0.458C0.296,-0.443 0.294,-0.425 0.291,-0.402C0.288,-0.379 0.286,-0.358 0.283,-0.339L0.233,-0L0.104,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,194.485,82.7642)">
<path d="M0.301,0.01C0.254,0.01 0.214,0.001 0.179,-0.017C0.144,-0.035 0.118,-0.06 0.099,-0.093C0.08,-0.125 0.07,-0.163 0.07,-0.206L0.07,-0.344C0.07,-0.387 0.08,-0.425 0.099,-0.458C0.118,-0.49 0.144,-0.515 0.179,-0.533C0.214,-0.551 0.254,-0.56 0.301,-0.56C0.347,-0.56 0.387,-0.551 0.422,-0.533C0.456,-0.515 0.483,-0.49 0.502,-0.458C0.521,-0.425 0.53,-0.387 0.53,-0.344L0.53,-0.245L0.191,-0.245L0.191,-0.206C0.191,-0.128 0.228,-0.089 0.302,-0.089C0.359,-0.089 0.393,-0.108 0.403,-0.146L0.526,-0.146C0.517,-0.099 0.492,-0.061 0.451,-0.033C0.409,-0.004 0.36,0.01 0.301,0.01ZM0.191,-0.344L0.191,-0.323L0.409,-0.324L0.409,-0.345C0.409,-0.383 0.4,-0.412 0.382,-0.433C0.364,-0.453 0.337,-0.463 0.301,-0.463C0.264,-0.463 0.237,-0.453 0.219,-0.432C0.2,-0.411 0.191,-0.382 0.191,-0.344Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,212.485,82.7642)">
<path d="M0.093,-0L0.093,-0.55L0.215,-0.55L0.215,-0.445L0.218,-0.445C0.223,-0.481 0.239,-0.509 0.266,-0.53C0.293,-0.55 0.327,-0.56 0.368,-0.56C0.425,-0.56 0.47,-0.542 0.504,-0.505C0.538,-0.468 0.555,-0.417 0.555,-0.353L0.555,-0.308L0.424,-0.308L0.424,-0.344C0.424,-0.378 0.415,-0.405 0.398,-0.424C0.38,-0.443 0.354,-0.452 0.321,-0.452C0.252,-0.452 0.218,-0.414 0.218,-0.337L0.218,-0L0.093,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,230.485,82.7642)">
<path d="M0.389,-0C0.334,-0 0.291,-0.016 0.258,-0.049C0.225,-0.082 0.208,-0.125 0.208,-0.178L0.208,-0.617L0.027,-0.617L0.027,-0.73L0.333,-0.73L0.333,-0.181C0.333,-0.16 0.339,-0.144 0.351,-0.132C0.362,-0.119 0.378,-0.113 0.398,-0.113L0.559,-0.113L0.559,-0L0.389,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,248.485,82.7642)">
<path d="M0.076,-0L0.076,-0.113L0.264,-0.113L0.264,-0.437L0.096,-0.437L0.096,-0.55L0.389,-0.55L0.389,-0.113L0.558,-0.113L0.558,-0L0.076,-0ZM0.318,-0.642C0.293,-0.642 0.273,-0.649 0.258,-0.662C0.243,-0.675 0.236,-0.692 0.236,-0.714C0.236,-0.736 0.243,-0.753 0.258,-0.767C0.273,-0.78 0.293,-0.786 0.318,-0.786C0.343,-0.786 0.363,-0.78 0.378,-0.767C0.393,-0.753 0.4,-0.736 0.4,-0.714C0.4,-0.692 0.393,-0.675 0.378,-0.662C0.363,-0.649 0.343,-0.642 0.318,-0.642Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,266.485,82.7642)">
<path d="M0.077,-0L0.077,-0.55L0.199,-0.55L0.199,-0.445L0.201,-0.445C0.207,-0.481 0.223,-0.509 0.248,-0.53C0.273,-0.55 0.306,-0.56 0.347,-0.56C0.401,-0.56 0.444,-0.542 0.477,-0.506C0.509,-0.47 0.525,-0.422 0.525,-0.361L0.525,-0L0.4,-0L0.4,-0.348C0.4,-0.381 0.391,-0.407 0.374,-0.425C0.356,-0.443 0.332,-0.452 0.302,-0.452C0.271,-0.452 0.246,-0.443 0.229,-0.424C0.211,-0.405 0.202,-0.379 0.202,-0.344L0.202,-0L0.077,-0Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(30,0,0,30,284.485,82.7642)">
<path d="M0.301,0.01C0.254,0.01 0.214,0.001 0.179,-0.017C0.144,-0.035 0.118,-0.06 0.099,-0.093C0.08,-0.125 0.07,-0.163 0.07,-0.206L0.07,-0.344C0.07,-0.387 0.08,-0.425 0.099,-0.458C0.118,-0.49 0.144,-0.515 0.179,-0.533C0.214,-0.551 0.254,-0.56 0.301,-0.56C0.347,-0.56 0.387,-0.551 0.422,-0.533C0.456,-0.515 0.483,-0.49 0.502,-0.458C0.521,-0.425 0.53,-0.387 0.53,-0.344L0.53,-0.245L0.191,-0.245L0.191,-0.206C0.191,-0.128 0.228,-0.089 0.302,-0.089C0.359,-0.089 0.393,-0.108 0.403,-0.146L0.526,-0.146C0.517,-0.099 0.492,-0.061 0.451,-0.033C0.409,-0.004 0.36,0.01 0.301,0.01ZM0.191,-0.344L0.191,-0.323L0.409,-0.324L0.409,-0.345C0.409,-0.383 0.4,-0.412 0.382,-0.433C0.364,-0.453 0.337,-0.463 0.301,-0.463C0.264,-0.463 0.237,-0.453 0.219,-0.432C0.2,-0.411 0.191,-0.382 0.191,-0.344Z" style="fill:white;fill-rule:nonzero;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,19 @@
function Prompt {
$label = "PowerShell"
$color = 12
$adminColor = 88
$bold = 1
$principal = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent())
if ($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$color = $adminColor
}
$path = $pwd.Path
if ($path.StartsWith($HOME)) {
$path = "~" + $path.Substring($HOME.Length)
}
$e = $([char]27)
return "`n$e[$bold;48;5;$color;38;5;231m $label $e[;38;5;$color;48;5;240m$e[38;5;252m $path $e[;38;5;240m$e[m "
}

7
powershell/colors.ps1 Normal file
View File

@@ -0,0 +1,7 @@
$label = "PowerShell"
$bold = 1
$e = $([char]27)
foreach ($color in (0..255)) {
Write-Host "`n$e[$bold;48;5;$color;38;5;231m $label $e[;38;5;$color;48;5;240m$e[38;5;252m ~ $e[;38;5;240m$e[m $color"
}