Full powerline version for ash
This commit is contained in:
@@ -16,7 +16,7 @@ Customize the variables (e.g., label and color). You can use the `bash/colors.sh
|
|||||||
|
|
||||||
Add the contents of the `ash/powerline.sh` script to your `~/.profile` file.
|
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.
|
Customize the variables (e.g., label and color). You can use the `bash/colors.sh` script to select a color.
|
||||||
|
|
||||||
### PowerShell
|
### PowerShell
|
||||||
|
|
||||||
|
|||||||
5
ash/powerline-mini.sh
Normal file
5
ash/powerline-mini.sh
Normal 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\] "
|
||||||
@@ -1,5 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# 30 is the color you may want to modify, \h is the label
|
prompt() {
|
||||||
|
local label="\h"
|
||||||
|
local color=30 # 30 green, 131 red
|
||||||
|
local bold=1
|
||||||
|
|
||||||
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\] "
|
prompt_part() { printf "\[\e[$2;38;5;$3;48;5;${4}m\] $1 \[\e[;38;5;$4${5+;48;5;$5}m\]"; }
|
||||||
|
|
||||||
|
printf "\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
|
||||||
|
printf "\[\e[m\] "
|
||||||
|
}
|
||||||
|
|
||||||
|
PS1="$(prompt)"
|
||||||
|
|||||||
Reference in New Issue
Block a user