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

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