aboutsummaryrefslogtreecommitdiffstats
path: root/tmux/date.sh
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-05-14 18:14:50 +0000
committerterminaldweller <thabogre@gmail.com>2021-05-14 18:14:50 +0000
commit6e528248414e330c9e25e81596ab47b8b8a5b701 (patch)
treee1aa41a7f3198eeac187e6177ec7d4a33db229d3 /tmux/date.sh
downloadscripts-master.tar.gz
scripts-master.zip
first commitmaster
Diffstat (limited to 'tmux/date.sh')
-rwxr-xr-xtmux/date.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tmux/date.sh b/tmux/date.sh
new file mode 100755
index 0000000..1c08e47
--- /dev/null
+++ b/tmux/date.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# source common.sh
+SEPARATOR_LEFT_BOLD=""
+SEPARATOR_LEFT_THIN=""
+
+RESULT=$(date +"%a %D %H:%M")
+
+DAY="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $1}')
+DATE="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $2}')
+TIME="#[fg=colour255 bg=colour31]"$(echo $RESULT | gawk '{print $3}')
+UTC_TIME="#[fg=colour255 bg=colour75]"$(date -u +"%H:%I")
+# JDATE="#[fg=colour255 bg=colour29]"$(jdate | gawk '{print $2" "$3}')
+JDATE="#[fg=colour255 bg=colour29]"$(jdate | gawk '{print $2" "$3}')
+
+echo "#[fg=colour29 bg=colour16]$SEPARATOR_LEFT_BOLD$JDATE #[fg=colour31 bg=colour29]$SEPARATOR_LEFT_BOLD$DAY $SEPARATOR_LEFT_THIN $DATE $SEPARATOR_LEFT_THIN $TIME #[fg=colour75 bg=colour31]$SEPARATOR_LEFT_BOLD$UTC_TIME "