Skip to content

Instantly share code, notes, and snippets.

@cwill747
Created December 15, 2015 20:38
Show Gist options
  • Save cwill747/e94d5d14e7d411919626 to your computer and use it in GitHub Desktop.
Save cwill747/e94d5d14e7d411919626 to your computer and use it in GitHub Desktop.
--Battery Widget
batt = wibox.widget.textbox()
function get_batterystatus()
local filedescriptor = io.popen("/<location-to-script>/<whatever-you-called-it>.sh")
local value = filedescriptor:read()
filedescriptor:close()
return {value}
end
vicious.register(batt, get_batterystatus, '$1', 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment