Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
99e74b04
Commit
99e74b04
authored
Aug 09, 2014
by
Cherry NG
Browse files
rounding to emoji clock
parent
1b7a3ea9
Changes
1
Show whitespace changes
Inline
Side-by-side
plugins/emoji-clock/emoji-clock.plugin.zsh
View file @
99e74b04
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
function
emoji-clock
()
{
function
emoji-clock
()
{
hour
=
$(
date
'+%I'
)
hour
=
$(
date
-v
'+15M'
'+%I'
)
minutes
=
$(
date
'+%M'
)
minutes
=
$(
date
-v
'+15M'
'+%M'
)
case
$hour
in
case
$hour
in
01
)
clock
=
"🕐"
;
[
$minutes
-ge
30
]
&&
clock
=
"🕜"
;;
01
)
clock
=
"🕐"
;
[
$minutes
-ge
30
]
&&
clock
=
"🕜"
;;
02
)
clock
=
"🕑"
;
[
$minutes
-ge
30
]
&&
clock
=
"🕝"
;;
02
)
clock
=
"🕑"
;
[
$minutes
-ge
30
]
&&
clock
=
"🕝"
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment