Quantcast
Channel: Recent Gists from 84adam
Viewing all articles
Browse latest Browse all 35

Green $PS1 with $USD bitcoin price from wink.sh

$
0
0
$PS1 with BTC price from wink.sh
from your home folder, type"vim .bashrc"
type"i" to edit; add the following section to your bashrc file under "# User specific aliases and functions":
you can use `SHIFT+INSERT` to paste text into the terminal
---
# (optional)
# Limit directory path shown in prompt to only display current and one parent directory
# Example: user@hostname ../firstparent/currentdir/ $
export PROMPT_DIRTRIM=2
# Create and export DOLAMT USD value variable
# Make sure you have run wink.sh at least once already
export DOLAMT="$(cat $HOME/bin/wink/dolamt.log)"
# Original $PS1
# export PS1='[\u@\h \W]\ '
# New PS1 - Green Color with USD btc value:
export PS1='\[\e[1;32m\]\u@\h \$$DOLAMT: \w${text}$\[\e[m\] '
# run "$ source ~/.bashrc" to load changes w/o logging out
# example output: user@hostname $1000: ~$
# gist URL: https://gist.github.com/84adam/f3ac53ea1ce783440b946fa48e22c87d
---
save and quit: ":wq"
run "source ~/.bashrc" to load the new changes
# If you notice the Price ($USDBTC) not updating, run wink.sh again first...
# Or set a cron/anacron job to auto-update this.

Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>