dotfiles/i3/scripts/uptime

14 lines
230 B
Plaintext
Raw Normal View History

2016-09-10 18:18:41 +02:00
#!/bin/bash
#
# Author: Raphael P. Ribeiro <raphaelpr01@gmail.com>
uptime=$(</proc/uptime)
uptime=${uptime%%.*}
s=$(( uptime%60 ))
m=$(( uptime/60%60 ))
h=$(( uptime/60/60%24 ))
d=$(( uptime/60/60/24 ))
echo ""$d"d"$h"h"$m"m"