1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-08 09:53:13 +00:00
Dotfiles/.config/polybar/themes/spacefull-dracula/polybar-scripts/info-hexdate/info-hexdate.sh

12 lines
404 B
Bash
Raw Normal View History

2020-07-27 04:59:00 +00:00
#!/bin/sh
day=$(timedatectl | grep "Local" | cut -d ":" -f2 | cut -d " " -f3 | cut -d "-" -f3)
month=$(timedatectl | grep "Local" | cut -d ":" -f2 | cut -d " " -f3 | cut -d "-" -f2)
year=$(timedatectl | grep "Local" | cut -d ":" -f2 | cut -d " " -f3 | cut -d "-" -f1)
day=$(echo "obase=16; $day" | bc)
month=$(echo "obase=16; $month" | bc)
year=$(echo "obase=16; $year" | bc)
echo "$day-$month-$year"