Skip to content

Instantly share code, notes, and snippets.

@pca2
Created January 9, 2022 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pca2/472da21e655c0f95445b5db0fbf50710 to your computer and use it in GitHub Desktop.
Save pca2/472da21e655c0f95445b5db0fbf50710 to your computer and use it in GitHub Desktop.
Generic Monitor datetime display for xfce
#! /bin/bash
# if it's before 7 only display the minute
# full time always available in tooltip
hour=$(date +%H)
day=$(date "+%a %m/%d |" )
shorttime=$(date +%M)
fulltime=$(date +%I:%M)
if [ $hour -le 6 ]; then
txt="$day $shorttime"
else
txt="$day $fulltime"
fi
echo "<txt> $txt </txt>"
echo "<tool> $fulltime </tool>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment