2022-01-14 04:57:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-01-15 05:33:32 +00:00
|
|
|
# display arvelie/neralie or gregorian time depending on toggle
|
|
|
|
|
2022-01-14 04:57:24 +00:00
|
|
|
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")
|
2023-03-08 06:28:56 +00:00
|
|
|
echo "[$(neralie)]"
|
2022-01-14 04:57:24 +00:00
|
|
|
;;
|
|
|
|
*)
|
2024-09-26 04:15:43 +00:00
|
|
|
echo "[$(/sbin/date +"%F %H:%M")]"
|
2022-01-14 04:57:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|