Skip to content

Instantly share code, notes, and snippets.

@jugyo
Last active December 28, 2015 07:19
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 jugyo/7463279 to your computer and use it in GitHub Desktop.
Save jugyo/7463279 to your computer and use it in GitHub Desktop.
# clock plugin
# ====
def update_clock_prompt
hour = Time.now.hour % 12
clock = Earthquake.config[:clock_prompt][:clocks][hour]
Earthquake.config[:prompt] = clock + ' '
end
Earthquake.init do
Earthquake.config[:clock_prompt] = {
:clocks => [
"\u{1F55B}",
"\u{1F550}",
"\u{1F551}",
"\u{1F552}",
"\u{1F553}",
"\u{1F554}",
"\u{1F555}",
"\u{1F556}",
"\u{1F557}",
"\u{1F558}",
"\u{1F559}",
"\u{1F55A}",
]
}
output do |items|
update_clock_prompt
end
update_clock_prompt
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment