summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc7
-rwxr-xr-x.local/bin/prompt2
-rwxr-xr-x.local/bin/xdg-open3
3 files changed, 8 insertions, 4 deletions
diff --git a/.bashrc b/.bashrc
index 40db5eb..59e36f0 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,7 +1,7 @@
[ -n "$ENV" ] && . "$ENV" || [ -e ~/.env ] && . ~/.env
# Prompt for Bash
-export PS1="\[\033[1;33m\]\u@\h:\W\$ \[\033[0m\]"
+export PS1='\[\033[1;33m\]$(prompt)\[\033[0m\]'
# Verify before running history command
shopt -s histverify
@@ -29,3 +29,8 @@ _direnv_hook() {
if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then
PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
fi
+
+alias gl='git pull'
+alias gcm='git checkout master'
+alias gco='git checkout'
+alias gst='git status'
diff --git a/.local/bin/prompt b/.local/bin/prompt
index 90e3a17..0118ae8 100755
--- a/.local/bin/prompt
+++ b/.local/bin/prompt
@@ -1,7 +1,7 @@
#!/bin/sh
BRANCH=$(git branch --show-current 2>/dev/null)
BRANCH=$(test -d .git && test -n $BRANCH && echo "($BRANCH)")
-PROMPT="[$(hostname):$(basename "$PWD")$BRANCH]"
+PROMPT="$USER@$(hostname):$( test $PWD = $HOME && echo '~' || basename "$PWD")$BRANCH"
case $(id -u) in
0) echo "$PROMPT# " ;;
*) echo "$PROMPT$ " ;;
diff --git a/.local/bin/xdg-open b/.local/bin/xdg-open
index 206fb96..be0f8e1 100755
--- a/.local/bin/xdg-open
+++ b/.local/bin/xdg-open
@@ -1,8 +1,7 @@
#!/bin/sh
-# Courtesy of https://drewdevault.com/2019/12/30/dotfiles.html
case "${1%%:*}" in
http|https|*.pdf)
- exec qutebrowser "$1"
+ exec firefox "$1"
;;
mailto)
exec aerc "$1"