This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { css, run } from "uebersicht"; | |
| export const refreshFrequency = 5000; | |
| export const command = dispatch => { | |
| run("curl -s sentir1.local/co2").then(output => | |
| dispatch({ type: "CO2_FETCHED", output }) | |
| ); | |
| run("curl -s sentir1.local/temp").then(output => | |
| dispatch({ type: "TEMP_FETCHED", output }) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const refreshFrequency = 1000; | |
| export const command = `ps axro \"%cpu,ucomm,pid\" \ | |
| | sed -e 's/^[ \\t]*//g' -e 's/\\([0-9][0-9]*\\.[0-9][0-9]*\\)\\ /\\1\\%\\,/g' -e 's/\\ \\ *\\([0-9][0-9]*$\\)/\\,\\1/g' -e's/\\ \\ */\\_/g' \ | |
| | awk 'FNR>1' \ | |
| | head -n 3 \ | |
| | awk -F',' '{ printf \"%s,%s,%d\\n\", $1, $2, $3}' \ | |
| | sed -e 's/\\_/\\ /g'`; | |
| const style = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command: "top -R -l2 | grep 'CPU usage' | tail -n1 | awk '{ print $3+$5 }'" | |
| refreshFrequency: 1000 | |
| style: """ | |
| top: 50% | |
| left: 80% | |
| width: 208px | |
| margin: 0 0 0 -104px | |
| text-align: left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| colors = | |
| low : "rgb(60, 160, 189)" | |
| normal : "rgb(88, 189, 60)" | |
| high : "rgb(243, 255, 134)" | |
| higher : "rgb(255, 168, 80)" | |
| highest: "rgb(255, 71, 71)" | |
| settings: | |
| background: true | |
| color : true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command: "echo blurz" | |
| refreshFrequency: 1000000000 | |
| style: """ | |
| top: 30% | |
| left: 50% | |
| width: 200px | |
| height: 125px | |
| margin-left: -(@width / 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command: "echo Hello World!", | |
| refreshFrequency: 5000, | |
| render: function (output) { | |
| return "<div><h1>" + output + "</h1></div>"; | |
| }, | |
| style: " \n\ | |
| top: 20px \n\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% with_tooltip "I am a tooltip" do %> | |
| The tooltip will appear for this entire section, but only when hovered over | |
| <span class="TooltipTrigger">this element</span> | |
| <% end -%> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .Tooltip { | |
| background: transparent url(/images/dark-pointer.png) no-repeat scroll 10px bottom; | |
| font-size: 10px; | |
| line-height: 12px; | |
| margin-left: -5px; | |
| padding: 0 5px; | |
| position: absolute; | |
| z-index: 100; | |
| left: 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function showTooltip(tooltip) { | |
| tooltip = $(tooltip); | |
| tooltip.setStyle({zIndex: -1}); | |
| tooltip.show(); | |
| tooltip.setStyle({top: "-"+(tooltip.offsetHeight)+"px"}); | |
| tooltip.setStyle({zIndex: 100}); | |
| } |
NewerOlder