From 8cb589fa44926b341e71373ed8f815528cfb67cc Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Wed, 19 Aug 2020 01:21:35 +0200 Subject: Fixing typos, cleaning webview, allowing comments in emoji file. --- i3blocks/i3date.sh | 16 +++++++++++++++- i3blocks/i3disk.sh | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'i3blocks') diff --git a/i3blocks/i3date.sh b/i3blocks/i3date.sh index a54a135..0461323 100755 --- a/i3blocks/i3date.sh +++ b/i3blocks/i3date.sh @@ -9,4 +9,18 @@ esac #dayofyear=$(date +%j) #perc=$(echo "scale=1; ($dayofyear*100)/365" | bc) #echo $(date +"%A, %y/%m/%d ($perc%) - %T") -echo $(date +"%y/%m/%d %H:%M") + +day="$(date +"%y/%m/%d")" +hour="$(date +"%H:%M")" + +min=${hour#*:} +baseHour=${hour/:*} +[ $baseHour -gt 11 ] && baseHour=$((baseHour-12)) + +clocks=(🕛 🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕧 🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦) +clockIndex=$baseHour +[ $min -gt 29 ] && clockIndex=$((clockIndex+12)) +clock="${clocks[clockIndex]}" + +echo $clock $day $hour +echo $clock $hour diff --git a/i3blocks/i3disk.sh b/i3blocks/i3disk.sh index a1aae81..158982f 100755 --- a/i3blocks/i3disk.sh +++ b/i3blocks/i3disk.sh @@ -9,3 +9,4 @@ $home" ;; esac df -h | grep "/home$" | awk '{print $3"/"$2}' +df -h | grep "/home$" | awk '{print $3}' -- cgit v1.2.1