Skip to content

Instantly share code, notes, and snippets.

@mygeekdaddy
Created August 10, 2014 18:21
Show Gist options
  • Save mygeekdaddy/606e76a937d45b2f6394 to your computer and use it in GitHub Desktop.
Save mygeekdaddy/606e76a937d45b2f6394 to your computer and use it in GitHub Desktop.
Coffeescript widget for Übersicht to monitor available HD space
command: "df -Hl | grep 'disk1' | awk '{print $4\" used/\"$2 \" free (\"$5\" used )\"}'"
refreshFrequency: 60000000
style: """
bottom: 350px
left: 15px
color: #fff
font-family: Helvetica Neue
div
display: block
border: 1px solid #fff
text-shadow: 0 0 1px rgba(#000, 0.5)
background: rgba(#000, 0.2)
font-size: 18px
font-weight: 100
padding: 4px 6px 4px 6px
&:after
content: 'HD Space'
position: absolute
left: 0
top: -14px
font-size: 10px
font-weight: 500
"""
render: -> """
<div class='hd_space'></div>
"""
update: (output, domEl) ->
$(domEl).find('.hd_space').html(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment