From 60402f641f7e5ffd4a51190a1c0f538cddfb7525 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Fri, 4 Dec 2020 14:39:48 +0100 Subject: [PATCH] more fixed environment and simplify prompt --- profile | 9 ++------- yashrc | 10 +++------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/profile b/profile index ca4a207..b595da5 100755 --- a/profile +++ b/profile @@ -7,6 +7,7 @@ export XDG_CACHE_HOME="$HOME/.cache" export XDG_RUNTIME_DIR="/tmp/runtime-$(whoami)" mkdir -p "$XDG_RUNTIME_DIR" chmod 0700 "$XDG_RUNTIME_DIR" +export XDG_DOWNLOAD_DIR="/tmp" # Local scripts export CABAL_HOME="$HOME/.cabal" @@ -25,6 +26,7 @@ export FZF_DEFAULT_COMMAND='(git ls-files -co --exclude-standard || rg --files) export SKIM_DEFAULT_COMMAND='(git ls-files -co --exclude-standard || rg --files) 2> /dev/null' export LC_ALL=en_US.utf8 export BOGOFILTER_DIR="$XDG_DATA_HOME/bogofilter" +export TERMINAL=st # Select Dock sound card if it's there #(it's broken) @@ -33,10 +35,3 @@ if [ -e /proc/asound/Dock ]; then fi #stty -ixon # disable - -# Start X if we're in tty1 -if tty | grep -q '/dev/tty1'; then - startx 2>&1 || vlock - #sudo poweroff - #sleep infinity -fi diff --git a/yashrc b/yashrc index 1232b4c..7573c5e 100644 --- a/yashrc +++ b/yashrc @@ -21,8 +21,8 @@ prompt_git() { porcelain="$(git status --branch --porcelain 2>/dev/null)" if test "$?" = 0; then local branch="$(printf '%s' "$porcelain" | sed -n 's/\.\.\..*//;1s/## //p')" - local behind="$(printf '%s' "$porcelain" | sed -n '1s/## .*behind \([0-9]*\).*/⇃\1/p')" - local ahead="$(printf '%s' "$porcelain" | sed -n '1s/## .*ahead \([0-9]*\).*/↿\1/p')" + local behind="$(printf '%s' "$porcelain" | sed -n '1s/## .*behind \([0-9]*\).*/-\1/p')" + local ahead="$(printf '%s' "$porcelain" | sed -n '1s/## .*ahead \([0-9]*\).*/+\1/p')" local status="$({ echo OK; printf '%s' "$porcelain" | sed '/##/d;s/\(..\).*/\1/'; } | tail -1)" echo " (${branch}${behind}${ahead}|${status})" @@ -34,10 +34,6 @@ prompt_pwd() { prompt_agent() { [ -z "$SSH_AGENT_PID" ] || echo " (A)" } -prompt_mail() { - unread="$(notmuch count tag:unread)" - [ "$unread" = "0" ] || echo " ($unread mails)" -} prompt_status() { if [ "$?" = "0" ] then echo "$" @@ -50,7 +46,7 @@ prompt_date() { BOLD="\fo." GREEN="\fg." RESET="\fD." -PS1="$BOLD[\$(ks prompt_date)]$RESET $GREEN\$(ks prompt_pwd)$RESET\$(ks prompt_git)\$(ks prompt_agent)\$(ks prompt_mail) \$(prompt_status) " +PS1="$BOLD[\$(ks prompt_date)]$RESET $GREEN\$(ks prompt_pwd)$RESET\$(ks prompt_git)\$(ks prompt_agent) \$(prompt_status) " unset BOLD unset GREEN unset RESET