Basic i3 setup

This commit is contained in:
2025-01-17 21:54:48 -05:00
parent d405f264db
commit 5c098bd26d
14 changed files with 234 additions and 69 deletions

View File

@@ -15,6 +15,9 @@ case $1 in
x1 )
backup_dest="$mount_dir/laptop"
;;
ubuntu )
backup_dest="$mount_dir/ubuntu"
;;
esac
exclude_dirs_list="/home/kevin/txt/exclude-dirs-backup.txt"
exclude_dirs_list_full="/home/kevin/txt/exclude-dirs-backup-full.txt"

View File

@@ -7,12 +7,22 @@ price=$(echo "$raw" | jq -r ".pairs | .[] | .priceUsd")
# printf "%0.4f\n" "$price" | cut -c 4-
# elif (( $(echo "$price < .1" | bc -l) )); then
# printf "%0.3f\n" "$price" | cut -c 4-
if (( $(echo "$price < .09" | bc -l) )); then
#if (( $(echo "$price < .09" | bc -l) )); then
#printf "%0.4f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < .1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 4-
#elif (( $(echo "$price < 1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif (( $(echo "$price < 10" | bc -l) )); then
#printf "%0.2f\n" "$price"
#fi
if [ $(echo "$price < 0.09" | bc -l) -eq 1 ]; then
printf "%0.4f\n" "$price" | cut -c 4-
elif (( $(echo "$price < .1" | bc -l) )); then
elif [ $(echo "$price < 0.1" | bc -l) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 4-
elif (( $(echo "$price < 1" | bc -l) )); then
elif [ $(echo "$price < 1" | bc -l) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 10" | bc -l) )); then
elif [ $(echo "$price < 10" | bc -l) -eq 1 ]; then
printf "%0.2f\n" "$price"
fi

View File

@@ -7,16 +7,30 @@ else
price=$(echo "$raw" | jq -r ".result.$1.b[0]")
fi
# echo "$price"
if (( $(echo "$price < 1" | bc -l) )); then
#if (( $(echo "$price < 1" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif (( $(echo "$price < 10" | bc -l) )); then
#printf "%0.3f\n" "$price" | cut -c 3-
#elif (( $(echo "$price < 1000" | bc -l) )); then
#printf "%'0.1f\n" "$price" | sed 's/,//'
#elif (( $(echo "$price < 10000" | bc -l) )); then
#printf "%'0.0f\n" "$price" | sed 's/,//'
#elif (( $(echo "$price > 100000" | bc -l) )); then
#printf "%'0.0f\n" "$price" | sed 's/,//' | cut -c -4
#else
#echo "$price" | cut -c -3
#fi
if [ $(echo "$price < 1" | bc -l) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 10" | bc -l) )); then
elif [ $(echo "$price < 10" | bc -l) -eq 1 ]; then
printf "%0.3f\n" "$price" | cut -c 3-
elif (( $(echo "$price < 1000" | bc -l) )); then
printf "%'0.1f\n" "$price" | sed 's/,//'
elif (( $(echo "$price < 10000" | bc -l) )); then
printf "%'0.0f\n" "$price" | sed 's/,//'
elif (( $(echo "$price > 100000" | bc -l) )); then
printf "%'0.0f\n" "$price" | sed 's/,//' | cut -c -4
else
echo "$price" | cut -c -3
elif [ $(echo "$price < 100" | bc -l) -eq 1 ]; then
echo "$price" | numfmt --grouping | cut -c -2
elif [ $(echo "$price < 1000" | bc -l) -eq 1 ]; then
echo "$price" | numfmt --grouping | cut -c -3
elif [ $(echo "$price < 10000" | bc -l) -eq 1 ]; then
echo "$price" | numfmt --grouping
elif [ $(echo "$price > 100000" | bc -l) -eq 1 ]; then
echo "$price" | numfmt --grouping | cut -c -3
fi