+ Use dwmblocks on dwm
+ Added free disks indicator to polybar + Trying out lfimg (Buggy) + Rework rateUSD + Rework PATH, now detect any subdir inside .local/bin + lf now can be accessed inside vim
This commit is contained in:
parent
5d3f85eb80
commit
57c06d99ce
7 changed files with 49 additions and 16 deletions
16
.scripts/rateUSD.sh
Normal file → Executable file
16
.scripts/rateUSD.sh
Normal file → Executable file
|
@ -1,12 +1,4 @@
|
|||
if [ ! -f /tmp/rate.html ]; then
|
||||
curl -s "https://www.cnbcindonesia.com/market-data/currencies/IDR=/USD-IDR" > /tmp/rate.html
|
||||
fi
|
||||
if [ ! -f /tmp/rateUSD.txt ]; then
|
||||
cat /tmp/rate.html | grep -A1 'class="mark_val"' | cut -d'"' -f2 | cut -d'<' -f2 | cut -d'>' -f2 > /tmp/rateUSD.txt
|
||||
sed -i "s/mark_val/Kurs USD -> IDR:/g" /tmp/rateUSD.txt
|
||||
cat /tmp/rateUSD.txt
|
||||
echo "Sumber: CNBC Indonesia"
|
||||
else
|
||||
cat /tmp/rateUSD.txt
|
||||
echo "Sumber: CNBC Indonesia"
|
||||
fi
|
||||
# get rate value from cnbcindonesia.com
|
||||
curl -s "https://www.cnbcindonesia.com/market-data/currencies/IDR=/USD-IDR" | grep -A1 'class="mark_val"' | cut -d'"' -f2 | cut -d'<' -f2 | cut -d'>' -f2 > /tmp/rateUSD.txt
|
||||
# if rateUSD.txt exist then display it while replace mark_val with Kurs USD -> IDR:
|
||||
[ -f /tmp/rateUSD.txt ] && sed 's/mark_val/Kurs USD -> IDR:/' /tmp/rateUSD.txt; echo "Sumber: CNBC Indonesia"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue