~mehdix/dotfiles

ref: 86c3a2253e8761846e79bbf4164766a73bdfd732 dotfiles/.local/bin/prompt -rwxr-xr-x 280 bytes
86c3a225Mehdi Sadeghi Adjust KB layout. Add xdg desktop portal config. 3 months ago
                                                                                
1
2
3
4
5
6
7
8
#!/bin/sh
BRANCH=$(git branch --show-current 2>/dev/null)
BRANCH=$(test -n "$BRANCH" && echo "($BRANCH)")
PROMPT="$USER@$(cat /proc/sys/kernel/hostname):$( test "$PWD" = $HOME && echo '~' || echo "$PWD")$BRANCH"
case $(id -u) in
0) echo "$PROMPT# " ;;
*) echo "$PROMPT$ " ;;
esac