Skip to content

Instantly share code, notes, and snippets.

View darakeon's full-sized avatar
🖊️
Writing in Saturn

Dara Keon darakeon

🖊️
Writing in Saturn
View GitHub Profile
@darakeon
darakeon / ps1.sh
Last active October 18, 2024 22:21
PS1: variable to what your bash will print before each interaction with you
# Add this to your ~/.bashrc
# With docker running machines counter:
export PS1="\n\n[\[\033[01;30m\]\A\[\033[00m\]] 🐳\$(docker ps -q | wc -l) \[\033[01;31m\]\u\[\033[00m\]@\[\033[01;35m\]\`if [[ \$PWD = /mnt/c* ]]; then echo \"#\"; else echo \"&\"; fi\`/\W\[\033[00m\]$ "
# With docker running machines / stopped machines counter:
export PS1="\n\n[\[\033[01;30m\]\A\[\033[00m\]] 🐳\$(docker ps -q | wc -l)/\$(docker ps -a -q | wc -l) \[\033[01;31m\]\u\[\033[00m\]@\[\033[01;35m\]\`if [[ \$PWD = /mnt/c* ]]; then echo \"#\"; else echo \"&\"; fi\`/\W\[\033[00m\]$ "
# No docker counters:
export PS1="\n\n[\[\033[01;30m\]\A\[\033[00m\]] \[\033[01;31m\]\u\[\033[00m\]@\[\033[01;35m\]\`if [[ \$PWD = /mnt/c* ]]; then echo \"#\"; else echo \"&\"; fi\`/\W\[\033[00m\]$ "
@echo off
set current=%cd%\
set folder=%1
set batpath=%2
cd %folder% > NUL
if "%folder%" neq "" (
set current=%current%%folder%\