29 lines
497 B
Bash
Executable file
29 lines
497 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# display arvelie/neralie or gregorian time depending on toggle
|
|
# Derek Stevens <nilix@nilfm.cc>
|
|
# MIT License
|
|
|
|
if [ "$1" = "-t" ]; then
|
|
current=$(cat ~/.time_mode)
|
|
case ${current} in
|
|
"common")
|
|
echo "regular" > ~/.time_mode
|
|
;;
|
|
*)
|
|
echo "common" > ~/.time_mode
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
if [ -z "$1" ]; then
|
|
mode=$(cat ~/.time_mode)
|
|
case ${mode} in
|
|
"regular")
|
|
echo "[$(neralie)]"
|
|
;;
|
|
*)
|
|
echo "[$(date +"%F %H:%M")]"
|
|
;;
|
|
esac
|
|
fi
|