diff options
author | 2024-03-25 16:43:09 +0530 | |
---|---|---|
committer | 2024-03-25 16:43:09 +0530 | |
commit | a62114c91f2070c8c8453d117f3d81dc113e41ff (patch) | |
tree | f266e87af29a08c01f82bc32dd7d463d8ec4441a /zsh/oh-my-zsh/plugins/emoji-clock | |
parent | af120ab348f2e1a5a39dec035ed9dcf84189a64e (diff) | |
download | dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.gz dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.tar.bz2 dotfiles-a62114c91f2070c8c8453d117f3d81dc113e41ff.zip |
dotfile update
Diffstat (limited to 'zsh/oh-my-zsh/plugins/emoji-clock')
-rw-r--r-- | zsh/oh-my-zsh/plugins/emoji-clock/README.md | 14 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh | 33 |
2 files changed, 0 insertions, 47 deletions
diff --git a/zsh/oh-my-zsh/plugins/emoji-clock/README.md b/zsh/oh-my-zsh/plugins/emoji-clock/README.md deleted file mode 100644 index 4934f38..0000000 --- a/zsh/oh-my-zsh/plugins/emoji-clock/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# emoji-clock - -The plugin displays current time as an emoji symbol with half hour accuracy. - -To use it, add `emoji-clock` to the plugins array of your zshrc file: -``` -plugins=(... emoji-clock) -``` - -## Features - -| Function | Description | -|-------------------|----------------------------------------------------------------------| -| `emoji-clock` | Displays current time in clock emoji symbol with half hour accuracy | diff --git a/zsh/oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh b/zsh/oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh deleted file mode 100644 index bdd606f..0000000 --- a/zsh/oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh +++ /dev/null @@ -1,33 +0,0 @@ -# ------------------------------------------------------------------------------ -# FILE: emoji-clock.plugin.zsh -# DESCRIPTION: The current time with half hour accuracy as an emoji symbol. -# Inspired by Andre Torrez' "Put A Burger In Your Shell" -# https://notes.torrez.org/2013/04/put-a-burger-in-your-shell.html -# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) -# VERSION: 1.0.0 -# ----------------------------------------------------------------------------- - -function emoji-clock() { - # Add 15 minutes to the current time and save the value as $minutes. - (( minutes = $(date '+%M') + 15 )) - (( hour = $(date '+%I') + minutes / 60 )) - # make sure minutes and hours don't exceed 60 nor 12 respectively - (( minutes %= 60 )); (( hour %= 12 )) - - case $hour in - 0) clock="🕛"; [ $minutes -ge 30 ] && clock="🕧";; - 1) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";; - 2) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";; - 3) clock="🕒"; [ $minutes -ge 30 ] && clock="🕞";; - 4) clock="🕓"; [ $minutes -ge 30 ] && clock="🕟";; - 5) clock="🕔"; [ $minutes -ge 30 ] && clock="🕠";; - 6) clock="🕕"; [ $minutes -ge 30 ] && clock="🕡";; - 7) clock="🕖"; [ $minutes -ge 30 ] && clock="🕢";; - 8) clock="🕗"; [ $minutes -ge 30 ] && clock="🕣";; - 9) clock="🕘"; [ $minutes -ge 30 ] && clock="🕤";; - 10) clock="🕙"; [ $minutes -ge 30 ] && clock="🕥";; - 11) clock="🕚"; [ $minutes -ge 30 ] && clock="🕦";; - *) clock="⌛";; - esac - echo $clock -} |